Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 030b744

Browse filesBrowse files
guybedfordBridgeAR
authored andcommitted
esm: process proxy Symbol.toString fix
PR-URL: #25963 Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent cb2cbf2 commit 030b744
Copy full SHA for 030b744

File tree

Expand file treeCollapse file tree

2 files changed

+12
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-0
lines changed
Open diff view settings
Collapse file

‎lib/internal/bootstrap/node.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,12 @@ function setupProcessObject() {
347347
const origProcProto = Object.getPrototypeOf(process);
348348
Object.setPrototypeOf(origProcProto, EventEmitter.prototype);
349349
EventEmitter.call(process);
350+
Object.defineProperty(process, Symbol.toStringTag, {
351+
enumerable: false,
352+
writable: false,
353+
configurable: false,
354+
value: 'process'
355+
});
350356
// Make process globally available to users by putting it on the global proxy
351357
global.process = process;
352358
}
Collapse file
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Flags: --experimental-modules
2+
import '../common';
3+
import assert from 'assert';
4+
import process from 'process';
5+
6+
assert.strictEqual(Object.prototype.toString.call(process), '[object process]');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.