Commit 8192dd6
module: include module information in require(esm) warning
When emitting the experimental warning for `require(esm)`, include
information about the parent module and the module being require()-d
to help users locate and update them.
PR-URL: #55397
Backport-PR-URL: #56927
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Refs: #526971 parent 1db210a commit 8192dd6Copy full SHA for 8192dd6
File tree
Expand file treeCollapse file tree
4 files changed
+41
-12
lines changedOpen diff view settings
Filter options
- lib/internal
- modules/cjs
- test/es-module
Expand file treeCollapse file tree
4 files changed
+41
-12
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+22-2Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1340 | 1340 | |
1341 | 1341 | |
1342 | 1342 | |
1343 | | - |
| 1343 | + |
| 1344 | + |
| 1345 | + |
| 1346 | + |
| 1347 | + |
| 1348 | + |
| 1349 | + |
| 1350 | + |
| 1351 | + |
| 1352 | + |
| 1353 | + |
| 1354 | + |
| 1355 | + |
| 1356 | + |
| 1357 | + |
| 1358 | + |
| 1359 | + |
| 1360 | + |
| 1361 | + |
| 1362 | + |
| 1363 | + |
1344 | 1364 | |
1345 | 1365 | |
1346 | 1366 | |
1347 | | - |
| 1367 | + |
1348 | 1368 | |
1349 | 1369 | |
1350 | 1370 | |
|
Collapse file
+5-2Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
255 | 255 | |
256 | 256 | |
257 | 257 | |
258 | | - |
| 258 | + |
259 | 259 | |
260 | | - |
261 | 260 | |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | + |
262 | 265 | |
263 | 266 | |
264 | 267 | |
|
Collapse file
test/es-module/test-require-module-preload.js
Copy file name to clipboardExpand all lines: test/es-module/test-require-module-preload.js+10-8Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | 7 | |
9 | 8 | |
10 | | - |
11 | | - |
| 9 | + |
12 | 10 | |
13 | 11 | |
14 | 12 | |
| ||
24 | 22 | |
25 | 23 | |
26 | 24 | |
27 | | - |
| 25 | + |
| 26 | + |
28 | 27 | |
29 | 28 | |
30 | 29 | |
| ||
44 | 43 | |
45 | 44 | |
46 | 45 | |
47 | | - |
| 46 | + |
| 47 | + |
48 | 48 | |
49 | 49 | |
50 | 50 | |
| ||
66 | 66 | |
67 | 67 | |
68 | 68 | |
69 | | - |
| 69 | + |
| 70 | + |
70 | 71 | |
71 | 72 | |
72 | 73 | |
| ||
89 | 90 | |
90 | 91 | |
91 | 92 | |
92 | | - |
| 93 | + |
| 94 | + |
93 | 95 | |
94 | 96 | |
95 | 97 | |
| ||
115 | 117 | |
116 | 118 | |
117 | 119 | |
118 | | - |
| 120 | + |
119 | 121 | |
120 | 122 | |
121 | 123 | |
|
Collapse file
test/es-module/test-require-module.js
Copy file name to clipboardExpand all lines: test/es-module/test-require-module.js+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
6 | 7 | |
| 8 | + |
7 | 9 | |
8 | 10 | |
| 11 | + |
| 12 | + |
9 | 13 | |
10 | 14 | |
11 | 15 | |
|
0 commit comments