Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1708,6 +1708,8 @@ static void ContainsModuleSyntax(const FunctionCallbackInfo<Value>& args) {
resource_name = args[2].As<String>();
}
// Argument 4: flag to indicate if CJS variables should not be in scope
// (they should be for normal CommonJS modules, but not for the
// CommonJS eval scope).
bool cjs_var = !args[3]->IsString();

bool cache_rejected = false;
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-esm-detect-ambiguous.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ describe('Wrapping a `require` of an ES module while using `--abort-on-uncaught-
});

describe('when working with Worker threads', () => {
it('should work', async () => {
it('should evaluate a CommonJS worker as valid sloppy script where the CommonJS wrapper variables do not exist', async () => {
const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [
'--experimental-detect-module',
'--eval',
Expand Down