Commit 5357a05
module: refine module type mismatch error cases
PR-URL: #35426
Backport-PR-URL: #35405
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>1 parent 65ffce1 commit 5357a05Copy full SHA for 5357a05
File tree
Expand file treeCollapse file tree
5 files changed
+58
-28
lines changedOpen diff view settings
Filter options
- lib/internal/modules
- cjs
- esm
- test
- es-module
- fixtures/es-modules
Expand file treeCollapse file tree
5 files changed
+58
-28
lines changedOpen diff view settings
Collapse file
lib/internal/modules/cjs/loader.js
Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/loader.js+1-25Lines changed: 1 addition & 25 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
105 | 105 | |
106 | 106 | |
107 | 107 | |
| 108 | + |
108 | 109 | |
109 | 110 | |
110 | 111 | |
| ||
119 | 120 | |
120 | 121 | |
121 | 122 | |
122 | | - |
123 | | - |
124 | | - |
125 | | - |
126 | | - |
127 | | - |
128 | | - |
129 | | - |
130 | | - |
131 | | - |
132 | | - |
133 | | - |
134 | | - |
135 | | - |
136 | | - |
137 | | - |
138 | | - |
139 | | - |
140 | | - |
141 | | - |
142 | | - |
143 | | - |
144 | | - |
145 | | - |
146 | | - |
147 | 123 | |
148 | 124 | |
149 | 125 | |
|
Collapse file
lib/internal/modules/esm/translators.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/translators.js+40-2Lines changed: 40 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
| 12 | + |
12 | 13 | |
13 | 14 | |
14 | 15 | |
| 16 | + |
| 17 | + |
15 | 18 | |
16 | 19 | |
17 | 20 | |
| ||
57 | 60 | |
58 | 61 | |
59 | 62 | |
| 63 | + |
60 | 64 | |
61 | 65 | |
62 | 66 | |
| ||
130 | 134 | |
131 | 135 | |
132 | 136 | |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
133 | 160 | |
134 | 161 | |
135 | 162 | |
| ||
152 | 179 | |
153 | 180 | |
154 | 181 | |
155 | | - |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
156 | 188 | |
157 | 189 | |
158 | 190 | |
| ||
190 | 222 | |
191 | 223 | |
192 | 224 | |
193 | | - |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
194 | 232 | |
195 | 233 | |
196 | 234 | |
|
Collapse file
test/es-module/test-esm-cjs-exports.js
Copy file name to clipboardExpand all lines: test/es-module/test-esm-cjs-exports.js+15-1Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
7 | 7 | |
8 | 8 | |
9 | 9 | |
10 | | - |
| 10 | + |
11 | 11 | |
12 | 12 | |
13 | 13 | |
| ||
19 | 19 | |
20 | 20 | |
21 | 21 | |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
Collapse file
test/fixtures/es-modules/cjs-exports-invalid.mjs
Copy file name to clipboard+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
Collapse file
test/fixtures/es-modules/invalid-cjs.js
Copy file name to clipboard+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
0 commit comments