Skip to content

Commit

Permalink
process: make Symbol.toStringTag writable
Browse files Browse the repository at this point in the history
The ecosystem broke by making it non-writable, so this is a good
intermediate fix.

PR-URL: #26488
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
BridgeAR committed Mar 14, 2019
1 parent e1a55e7 commit 275a8f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ function setupProcessObject() {
EventEmitter.call(process);
Object.defineProperty(process, Symbol.toStringTag, {
enumerable: false,
writable: false,
writable: true,
configurable: false,
value: 'process'
});
Expand Down
1 change: 1 addition & 0 deletions test/es-module/test-esm-process.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ import assert from 'assert';
import process from 'process';

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

0 comments on commit 275a8f9

Please sign in to comment.