Commit 8c9e3a9
module: remove dynamicInstantiate loader hook
The dynamicInstantiate loader hook requires that the hooks run in the
same global scope as the code being loaded. We don't want to commit to
this being true in the future. It stops us from sharing hooks between
multiple worker threads or isolating loader hook from the application
code.
Using `getSource` and `getGlobalPreloadCode` the same use cases should
be covered.
PR-URL: #33501
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>1 parent da5e970 commit 8c9e3a9Copy full SHA for 8c9e3a9
File tree
Expand file treeCollapse file tree
7 files changed
+60
-111
lines changedOpen diff view settings
Filter options
- doc/api
- lib/internal
- modules/esm
- test
- es-module
- fixtures/es-module-loaders
Expand file treeCollapse file tree
7 files changed
+60
-111
lines changedOpen diff view settings
Collapse file
-14Lines changed: 0 additions & 14 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1570 | 1570 | |
1571 | 1571 | |
1572 | 1572 | |
1573 | | - |
1574 | | - |
1575 | | - |
1576 | | - |
1577 | | - |
1578 | | - |
1579 | | - |
1580 | | - |
1581 | 1573 | |
1582 | 1574 | |
1583 | 1575 | |
| ||
2519 | 2511 | |
2520 | 2512 | |
2521 | 2513 | |
2522 | | - |
2523 | | - |
2524 | | - |
2525 | | - |
2526 | | - |
2527 | | - |
2528 | 2514 | |
2529 | 2515 | |
2530 | 2516 | |
|
Collapse file
-35Lines changed: 0 additions & 35 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1204 | 1204 | |
1205 | 1205 | |
1206 | 1206 | |
1207 | | - |
1208 | 1207 | |
1209 | 1208 | |
1210 | 1209 | |
| ||
1345 | 1344 | |
1346 | 1345 | |
1347 | 1346 | |
1348 | | - |
1349 | | - |
1350 | | - |
1351 | | - |
1352 | | - |
1353 | | - |
1354 | | - |
1355 | | - |
1356 | | - |
1357 | | - |
1358 | | - |
1359 | | - |
1360 | | - |
1361 | | - |
1362 | | - |
1363 | | - |
1364 | | - |
1365 | | - |
1366 | | - |
1367 | | - |
1368 | | - |
1369 | | - |
1370 | | - |
1371 | | - |
1372 | | - |
1373 | | - |
1374 | | - |
1375 | | - |
1376 | | - |
1377 | | - |
1378 | | - |
1379 | | - |
1380 | 1347 | |
1381 | 1348 | |
1382 | 1349 | |
| ||
1846 | 1813 | |
1847 | 1814 | |
1848 | 1815 | |
1849 | | - |
1850 | 1816 | |
1851 | 1817 | |
1852 | 1818 | |
| ||
1859 | 1825 | |
1860 | 1826 | |
1861 | 1827 | |
1862 | | - |
1863 | 1828 | |
1864 | 1829 | |
1865 | 1830 | |
|
Collapse file
-3Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1258 | 1258 | |
1259 | 1259 | |
1260 | 1260 | |
1261 | | - |
1262 | | - |
1263 | | - |
1264 | 1261 | |
1265 | 1262 | |
1266 | 1263 | |
|
Collapse file
lib/internal/modules/esm/loader.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/loader.js+5-36Lines changed: 5 additions & 36 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | | - |
15 | 14 | |
16 | 15 | |
17 | 16 | |
| ||
28 | 27 | |
29 | 28 | |
30 | 29 | |
31 | | - |
32 | | - |
33 | 30 | |
34 | 31 | |
35 | 32 | |
36 | 33 | |
37 | | - |
38 | | - |
39 | 34 | |
40 | 35 | |
41 | 36 | |
| ||
68 | 63 | |
69 | 64 | |
70 | 65 | |
71 | | - |
72 | | - |
73 | 66 | |
74 | 67 | |
75 | 68 | |
76 | 69 | |
77 | 70 | |
78 | 71 | |
79 | 72 | |
80 | | - |
81 | | - |
82 | | - |
83 | | - |
84 | | - |
85 | | - |
86 | | - |
87 | | - |
88 | 73 | |
89 | 74 | |
90 | 75 | |
| ||
138 | 123 | |
139 | 124 | |
140 | 125 | |
141 | | - |
142 | 126 | |
143 | 127 | |
144 | 128 | |
| ||
193 | 177 | |
194 | 178 | |
195 | 179 | |
196 | | - |
197 | | - |
| 180 | + |
| 181 | + |
198 | 182 | |
199 | 183 | |
200 | 184 | |
| ||
248 | 232 | |
249 | 233 | |
250 | 234 | |
251 | | - |
252 | | - |
253 | | - |
254 | | - |
255 | | - |
256 | | - |
257 | | - |
258 | | - |
259 | | - |
260 | | - |
261 | | - |
262 | | - |
263 | | - |
264 | | - |
265 | | - |
266 | | - |
| 235 | + |
| 236 | + |
267 | 237 | |
268 | | - |
269 | | - |
| 238 | + |
270 | 239 | |
271 | 240 | |
272 | 241 | |
|
Collapse file
test/es-module/test-esm-loader-missing-dynamic-instantiate-hook.mjs
Copy file name to clipboardExpand all lines: test/es-module/test-esm-loader-missing-dynamic-instantiate-hook.mjs-8Lines changed: 0 additions & 8 deletions
This file was deleted.
Collapse file
test/es-module/test-esm-named-exports.mjs
Copy file name to clipboard+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | | - |
| 3 | + |
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | 7 | |
8 | 8 | |
| 9 | + |
Collapse file
test/fixtures/es-module-loaders/builtin-named-exports-loader.mjs
Copy file name to clipboard+53-14Lines changed: 53 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | | - |
4 | | - |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
5 | 29 | |
6 | | - |
| 30 | + |
| 31 | + |
7 | 32 | |
8 | 33 | |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
9 | 41 | |
10 | 42 | |
11 | 43 | |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
23 | 62 | |
0 commit comments