Repository navigation
Commit 355da9b
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 75ea128 commit 355da9b
260 files changed
Lines changed: 255 additions & 7916 deletions
File tree
- doc
- api
- lib
- internal
- bench_runner
- main
- modules
- esm
- process
- test_runner/mock
- src
- test
- 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
- import-require-cycle
- 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 | |
|---|---|---|---|
| |||
1509 | 1509 | | |
1510 | 1510 | | |
1511 | 1511 | | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
1518 | | - | |
1519 | | - | |
1520 | | - | |
1521 | | - | |
1522 | | - | |
1523 | | - | |
1524 | | - | |
1525 | | - | |
1526 | | - | |
1527 | | - | |
1528 | | - | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | 1512 | | |
1540 | 1513 | | |
1541 | 1514 | | |
| |||
4310 | 4283 | | |
4311 | 4284 | | |
4312 | 4285 | | |
4313 | | - | |
4314 | 4286 | | |
4315 | 4287 | | |
4316 | 4288 | | |
| |||
4994 | 4966 | | |
4995 | 4967 | | |
4996 | 4968 | | |
4997 | | - | |
4998 | 4969 | | |
4999 | 4970 | | |
5000 | 4971 | | |
| |||
5011 | 4982 | | |
5012 | 4983 | | |
5013 | 4984 | | |
5014 | | - | |
5015 | 4985 | | |
5016 | 4986 | | |
5017 | 4987 | | |
| |||
5029 | 4999 | | |
5030 | 5000 | | |
5031 | 5001 | | |
5032 | | - | |
5033 | 5002 | | |
5034 | 5003 | | |
5035 | 5004 | | |
| |||
| 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 | + | |
4640 | 4639 | | |
4641 | 4640 | | |
4642 | 4641 | | |
| |||
4935 | 4934 | | |
4936 | 4935 | | |
4937 | 4936 | | |
4938 | | - | |
4939 | 4937 | | |
4940 | 4938 | | |
4941 | 4939 | | |
| |||
4991 | 4989 | | |
4992 | 4990 | | |
4993 | 4991 | | |
4994 | | - | |
4995 | 4992 | | |
4996 | 4993 | | |
4997 | 4994 | | |
| |||
| 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 | | |
| |||
2354 | 2347 | | |
2355 | 2348 | | |
2356 | 2349 | | |
2357 | | - | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
2368 | | - | |
2369 | | - | |
2370 | 2350 | | |
2371 | 2351 | | |
2372 | 2352 | | |
| |||
3915 | 3895 | | |
3916 | 3896 | | |
3917 | 3897 | | |
| 3898 | + | |
| 3899 | + | |
| 3900 | + | |
| 3901 | + | |
| 3902 | + | |
| 3903 | + | |
| 3904 | + | |
| 3905 | + | |
| 3906 | + | |
| 3907 | + | |
| 3908 | + | |
3918 | 3909 | | |
3919 | 3910 | | |
3920 | 3911 | | |
| |||
4153 | 4144 | | |
4154 | 4145 | | |
4155 | 4146 | | |
| 4147 | + | |
| 4148 | + | |
| 4149 | + | |
| 4150 | + | |
| 4151 | + | |
| 4152 | + | |
| 4153 | + | |
| 4154 | + | |
| 4155 | + | |
| 4156 | + | |
| 4157 | + | |
| 4158 | + | |
| 4159 | + | |
| 4160 | + | |
4156 | 4161 | | |
4157 | 4162 | | |
4158 | 4163 | | |
| |||
| 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