esm: fix source phase identity bug in loadCache eviction · nodejs/node@1cdd23c · GitHub
Skip to content

Commit 1cdd23c

Browse files
guybedfordaduh95
authored andcommitted
esm: fix source phase identity bug in loadCache eviction
PR-URL: #62415 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent d0ebf0e commit 1cdd23c

4 files changed

Lines changed: 42 additions & 4 deletions

File tree

lib/internal/modules/esm/module_job.js

Lines changed: 11 additions & 4 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Regression test for source phase import identity with mixed eval/source
2+
// phase imports of the same module in one parent.
3+
import '../common/index.mjs';
4+
import { spawnSyncAndAssert } from '../common/child_process.js';
5+
import * as fixtures from '../common/fixtures.mjs';
6+
7+
spawnSyncAndAssert(
8+
process.execPath,
9+
['--no-warnings', fixtures.path('es-modules/test-wasm-source-phase-identity.mjs')],
10+
{ stdout: '', stderr: '', trim: true }
11+
);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import * as mod1 from './simple.wasm';
2+
import * as mod2 from './simple.wasm';
3+
import source mod3 from './simple.wasm';
4+
import source mod4 from './simple.wasm';
5+
6+
export { mod1, mod2, mod3, mod4 };
Lines changed: 14 additions & 0 deletions

0 commit comments

Comments
 (0)