Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 36.4k
repl / eval: CommonJS globals leak into ESM modules #30842
Copy link
Copy link
Closed as not planned
Labels
cliIssues and PRs related to the Node.js command line interface.Issues and PRs related to the Node.js command line interface.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.experimentalIssues and PRs related to experimental features.Issues and PRs related to experimental features.replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.stale
Description
Metadata
Metadata
Assignees
Labels
cliIssues and PRs related to the Node.js command line interface.Issues and PRs related to the Node.js command line interface.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.experimentalIssues and PRs related to experimental features.Issues and PRs related to experimental features.replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.stale
Linux lt2.cfware.com 5.3.11-200.fc30.x86_64 #1 SMP Tue Nov 12 19:25:25 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux--evaland--printwithout--input-type=moduleCreate
script.mjs:Running
node ./script.mjsornode --input-type=module --eval "import('./script.mjs')"both produce the correct outputscript.mjs undefined.Now run
import('./script.mjs')in repl, this produces outputscript.mjs function. Same fornode --eval "import('./script.mjs')".Using
--printin place of--evaldoes not changetypeof require.CC @nodejs/modules-active-members