Commit 94ac44f
esm: modify resolution order for specifier flag
Currently `--es-module-specifier-resolution=node` has an alternative
resolution order than the default in common.js, this causes
inconsistencies. As discussed in @nodejs/modules we want to preserve
resolution order between implementations.
PR-URL: #29974
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 5616f22 commit 94ac44fCopy full SHA for 94ac44f
File tree
Expand file treeCollapse file tree
4 files changed
+10
-7
lines changedOpen diff view settings
Filter options
- lib/internal/modules/esm
- src
- test
- es-module
- fixtures/es-module-specifiers/node_modules/implicit-main-type-module
Expand file treeCollapse file tree
4 files changed
+10
-7
lines changedOpen diff view settings
Collapse file
lib/internal/modules/esm/default_resolve.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/default_resolve.js+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
| 12 | + |
| 13 | + |
12 | 14 | |
13 | 15 | |
14 | 16 | |
| ||
110 | 112 | |
111 | 113 | |
112 | 114 | |
| 115 | + |
| 116 | + |
113 | 117 | |
114 | 118 | |
115 | 119 | |
|
Collapse file
+2-3Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
48 | 48 | |
49 | 49 | |
50 | 50 | |
51 | | - |
52 | | - |
53 | 51 | |
54 | 52 | |
55 | | - |
| 53 | + |
| 54 | + |
56 | 55 | |
57 | 56 | |
58 | 57 | |
|
Collapse file
test/es-module/test-esm-specifiers.mjs
Copy file name to clipboardExpand all lines: test/es-module/test-esm-specifiers.mjs+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
| 2 | + |
3 | 3 | |
4 | 4 | |
5 | 5 | |
| ||
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | | - |
18 | | - |
| 17 | + |
| 18 | + |
19 | 19 | |
20 | 20 | |
21 | 21 | |
|
Collapse file
test/fixtures/es-module-specifiers/node_modules/implicit-main-type-module/entry.js
Copy file name to clipboardExpand all lines: test/fixtures/es-module-specifiers/node_modules/implicit-main-type-module/entry.js+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments