diff options
-rw-r--r-- | src/bun.js/bindings/Process.cpp | 2 | ||||
-rw-r--r-- | test/bun.js/process.test.js | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/bun.js/bindings/Process.cpp b/src/bun.js/bindings/Process.cpp index a93132111..2071cfa05 100644 --- a/src/bun.js/bindings/Process.cpp +++ b/src/bun.js/bindings/Process.cpp @@ -348,7 +348,7 @@ void Process::finishCreation(JSC::VM& vm) JSC::JSValue(JSC::jsNumber(0))); this->putDirect(this->vm(), clientData->builtinNames().versionPublicName(), - JSC::jsString(this->vm(), makeAtomString(REPORTED_NODE_VERSION))); + JSC::jsString(this->vm(), makeString("v", REPORTED_NODE_VERSION))); // this gives some way of identifying at runtime whether the SSR is happening in node or not. // this should probably be renamed to what the name of the bundler is, instead of "notNodeJS" diff --git a/test/bun.js/process.test.js b/test/bun.js/process.test.js index e221375d1..4e79716db 100644 --- a/test/bun.js/process.test.js +++ b/test/bun.js/process.test.js @@ -87,3 +87,7 @@ it("process.env", () => { delete process.env["LOL SMILE latin1 <abc>"]; expect(process.env["LOL SMILE latin1 <abc>"]).toBe(undefined); }); + +it("process.version starts with v", () => { + expect(process.version.startsWith("v")).toBeTruthy(); +}); |