Skip to content

Commit 2a7da11

Browse files
committed
process: make Symbol.toStringTag writable
The ecosystem broke by making it non-writable, so this is a good intermediate fix. PR-URL: #26488 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent f77555f commit 2a7da11

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/internal/bootstrap/node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function setupProcessObject() {
283283
EventEmitter.call(process);
284284
Object.defineProperty(process, Symbol.toStringTag, {
285285
enumerable: false,
286-
writable: false,
286+
writable: true,
287287
configurable: false,
288288
value: 'process'
289289
});

test/es-module/test-esm-process.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ import assert from 'assert';
44
import process from 'process';
55

66
assert.strictEqual(Object.prototype.toString.call(process), '[object process]');
7+
assert(Object.getOwnPropertyDescriptor(process, Symbol.toStringTag).writable);

0 commit comments

Comments
 (0)