Repository navigation
Commit 93a8f1b
committed
module: remove async module customization hooks
Remove `module.register()` (DEP0205), the `--experimental-loader` and
`--loader` flags, and the machinery that supported them: the loader
hooks worker thread, the hooks proxy, the async module customization
hook chains for resolving and loading, the internal worker class used to
run the loader thread, and the asynchronous module job linking. Module
customization is now provided only by `module.registerHooks()`, which
runs synchronously on the thread that loads the modules.
As the loader thread no longer exists, the ES module loader always loads
and links modules synchronously, so the code that handled promises and
the re-invented `require()` for imported CommonJS customized by the
async module customization hooks is removed too. `import()` still defers
evaluation of the module to a later microtask, as before.
`worker_threads.isInternalThread` is kept for compatibility and is now
always `false`; removing it is left for a future semver-major change.
The `ERR_ASYNC_LOADER_REQUEST_NEVER_SETTLED` and
`ERR_LOADER_CHAIN_INCOMPLETE` error codes are no longer used and are
documented as removed.
Tests that exist only to exercise the async module customization hooks
are removed.
Assisted-by: Claude
Signed-off-by: Geoffrey Booth <webadmin@geoffreybooth.com>1 parent b8f905a commit 93a8f1b
259 files changed
Lines changed: 263 additions & 7877 deletions
File tree
- doc
- api
- lib
- internal
- bench_runner
- main
- modules
- esm
- process
- test_runner/mock
- src
- test
- doctool
- es-module
- fixtures
- es-module-loaders
- never-settling-resolve-step
- node_modules
- load
- resolve
- es-modules
- require-after-failed-import
- require-esm-in-cjs-cache
- worker-condition
- module-hooks
- require-esm-in-hooks-thread
- sync-and-async
- module-hooks
- parallel
- typings/internalBinding
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
1518 | | - | |
1519 | | - | |
1520 | | - | |
1521 | | - | |
1522 | | - | |
1523 | | - | |
1524 | | - | |
1525 | | - | |
1526 | | - | |
1527 | | - | |
1528 | | - | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
1545 | 1518 | | |
1546 | 1519 | | |
1547 | 1520 | | |
| |||
4312 | 4285 | | |
4313 | 4286 | | |
4314 | 4287 | | |
4315 | | - | |
4316 | 4288 | | |
4317 | 4289 | | |
4318 | 4290 | | |
| |||
4996 | 4968 | | |
4997 | 4969 | | |
4998 | 4970 | | |
4999 | | - | |
5000 | 4971 | | |
5001 | 4972 | | |
5002 | 4973 | | |
| |||
5013 | 4984 | | |
5014 | 4985 | | |
5015 | 4986 | | |
5016 | | - | |
5017 | 4987 | | |
5018 | 4988 | | |
5019 | 4989 | | |
| |||
5031 | 5001 | | |
5032 | 5002 | | |
5033 | 5003 | | |
5034 | | - | |
5035 | 5004 | | |
5036 | 5005 | | |
5037 | 5006 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4615 | 4615 | | |
4616 | 4616 | | |
4617 | 4617 | | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
4618 | 4621 | | |
4619 | 4622 | | |
4620 | 4623 | | |
| |||
4625 | 4628 | | |
4626 | 4629 | | |
4627 | 4630 | | |
4628 | | - | |
| 4631 | + | |
4629 | 4632 | | |
4630 | | - | |
4631 | | - | |
| 4633 | + | |
| 4634 | + | |
4632 | 4635 | | |
4633 | | - | |
4634 | | - | |
4635 | | - | |
4636 | | - | |
4637 | | - | |
4638 | | - | |
4639 | | - | |
| 4636 | + | |
| 4637 | + | |
| 4638 | + | |
| 4639 | + | |
| 4640 | + | |
| 4641 | + | |
| 4642 | + | |
4640 | 4643 | | |
4641 | 4644 | | |
4642 | 4645 | | |
| |||
4935 | 4938 | | |
4936 | 4939 | | |
4937 | 4940 | | |
4938 | | - | |
4939 | 4941 | | |
4940 | 4942 | | |
4941 | 4943 | | |
| |||
4991 | 4993 | | |
4992 | 4994 | | |
4993 | 4995 | | |
4994 | | - | |
4995 | 4996 | | |
4996 | 4997 | | |
4997 | 4998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | 736 | | |
744 | 737 | | |
745 | 738 | | |
| |||
2364 | 2357 | | |
2365 | 2358 | | |
2366 | 2359 | | |
2367 | | - | |
2368 | | - | |
2369 | | - | |
2370 | | - | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
2375 | | - | |
2376 | | - | |
2377 | | - | |
2378 | | - | |
2379 | | - | |
2380 | 2360 | | |
2381 | 2361 | | |
2382 | 2362 | | |
| |||
3925 | 3905 | | |
3926 | 3906 | | |
3927 | 3907 | | |
| 3908 | + | |
| 3909 | + | |
| 3910 | + | |
| 3911 | + | |
| 3912 | + | |
| 3913 | + | |
| 3914 | + | |
| 3915 | + | |
| 3916 | + | |
| 3917 | + | |
| 3918 | + | |
3928 | 3919 | | |
3929 | 3920 | | |
3930 | 3921 | | |
| |||
4163 | 4154 | | |
4164 | 4155 | | |
4165 | 4156 | | |
| 4157 | + | |
| 4158 | + | |
| 4159 | + | |
| 4160 | + | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
| 4164 | + | |
| 4165 | + | |
| 4166 | + | |
| 4167 | + | |
| 4168 | + | |
| 4169 | + | |
| 4170 | + | |
4166 | 4171 | | |
4167 | 4172 | | |
4168 | 4173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
203 | | - | |
| 202 | + | |
204 | 203 | | |
205 | 204 | | |
206 | 205 | | |
| |||
493 | 492 | | |
494 | 493 | | |
495 | 494 | | |
496 | | - | |
497 | | - | |
498 | 495 | | |
499 | 496 | | |
500 | 497 | | |
| |||
1316 | 1313 | | |
1317 | 1314 | | |
1318 | 1315 | | |
1319 | | - | |
1320 | | - | |
| 1316 | + | |
| 1317 | + | |
1321 | 1318 | | |
1322 | 1319 | | |
1323 | 1320 | | |
| |||
1360 | 1357 | | |
1361 | 1358 | | |
1362 | 1359 | | |
1363 | | - | |
1364 | | - | |
1365 | 1360 | | |
1366 | 1361 | | |
1367 | 1362 | | |
| |||
0 commit comments