Joyee Cheung
9e39360a09
esm: improve ERR_REQUIRE_ASYNC_MODULE
...
This brings back several improvements that were reverted by mistake when
landing https://redirect.github.com/nodejs/node/pull/64154
- Update the documentation about how the removal of side effects of
source collection
- Add non-enumerable `requireStack` and `topLevelAwaitLocations`
properties to `ERR_REQUIRE_ASYNC_MODULE`, the latter is only
populated when --experimental-print-required-tla is enabled
- Add "Required module: <url>" to the error message to identify the
required ESM entry point regardless of whether the flag is enabled
- Fix TLA caret column from 0-based to 1-based
- Store module source via a private symbol instead of a public property
- Use `hasAsyncGraph` (post-instantiation) in `throwIfAsyncGraph`
instead of walking the graph before instantiation
- Merge the require stack checking into the
`common.expectRequiredTLAError` helper.
- Removed tests that are made redundant by the snapshot tests
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/64260
Backport-PR-URL: https://github.com/nodejs/node/pull/65125
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2026-08-13 16:49:51 +02:00
..
2024-05-09 00:25:14 +00:00
2025-07-27 23:52:52 +02:00
2024-03-18 18:10:06 +08:00
2024-04-17 23:39:45 +02:00
2024-04-08 14:45:55 +00:00
2024-04-08 14:45:55 +00:00
2024-04-08 14:45:55 +00:00
2024-04-08 14:45:55 +00:00
2025-09-24 09:03:38 +02:00
2024-03-18 18:10:06 +08:00
2024-03-18 18:10:06 +08:00
2024-03-18 18:10:06 +08:00
2024-03-18 18:10:06 +08:00
2023-12-23 20:38:08 +00:00
2025-09-09 08:34:13 +02:00
2023-07-03 18:42:47 +00:00
2024-09-25 06:35:26 +00:00
2021-12-13 20:44:00 +00:00
2020-09-22 12:49:40 -04:00
2024-03-18 18:10:06 +08:00
2023-12-25 11:44:26 +00:00
2023-11-10 09:20:46 +01:00
2023-10-20 15:44:56 +00:00
2021-12-13 20:44:00 +00:00
2024-12-02 22:43:55 +00:00
2020-09-11 05:09:44 -07:00
2026-02-22 23:16:06 +01:00
2024-04-16 14:07:44 +00:00
2025-09-09 08:40:52 +02:00
2025-05-16 07:05:40 +02:00
2020-10-30 12:12:56 -04:00
2024-11-23 11:28:47 +00:00
2026-08-13 16:49:51 +02:00
2024-07-11 18:59:31 +00:00
2020-10-04 10:30:13 -07:00
2021-07-15 08:52:37 -07:00
2021-07-31 02:32:19 +00:00
2020-09-30 20:46:01 -07:00
2024-10-02 12:30:23 -07:00
2019-12-04 22:36:37 -05:00
2020-04-03 01:29:39 +02:00
2024-03-18 18:10:06 +08:00
2020-10-04 10:30:13 -07:00
2020-10-04 10:30:13 -07:00
2025-05-31 13:30:51 +02:00
2025-05-31 13:30:51 +02:00
2020-10-19 18:41:10 +00:00
2020-10-19 18:41:10 +00:00
2020-10-19 18:41:10 +00:00
2020-10-19 18:41:10 +00:00
2020-10-19 18:41:10 +00:00
2020-10-19 18:41:10 +00:00
2020-10-19 18:41:10 +00:00
2020-10-19 18:41:10 +00:00
2019-08-13 11:19:48 -07:00
2019-08-13 11:19:48 -07:00
2019-08-13 11:19:48 -07:00
2019-08-13 11:19:48 -07:00
2019-08-13 11:19:48 -07:00
2019-08-13 11:19:48 -07:00
2019-08-13 11:19:48 -07:00
2023-11-01 12:38:01 +00:00
2024-07-11 18:59:31 +00:00
2024-07-11 18:59:31 +00:00
2023-10-13 18:03:52 -03:00
2023-10-13 18:03:52 -03:00
2023-10-13 18:03:52 -03:00
2023-10-13 18:03:52 -03:00
2020-09-28 18:27:25 -07:00
2020-09-28 18:27:25 -07:00
2025-05-02 17:05:04 -03:00
2021-09-11 18:08:35 -07:00
2021-09-11 18:08:35 -07:00
2025-05-31 13:30:51 +02:00
2025-05-31 13:30:51 +02:00
2025-05-31 13:30:51 +02:00
2024-07-12 12:48:54 +00:00
2024-03-18 18:10:06 +08:00
2019-05-20 10:26:23 -04:00
2020-05-24 16:22:31 -07:00
2023-10-14 03:52:38 +00:00
2025-05-31 13:30:50 +02:00
2025-06-16 08:51:12 +02:00
2023-10-13 18:03:52 -03:00
2023-10-13 18:03:52 -03:00
2023-04-13 09:35:17 +02:00
2024-03-18 18:10:06 +08:00
2023-09-29 06:18:44 +00:00
2023-09-29 06:18:44 +00:00
2020-09-30 20:46:01 -07:00
2025-07-21 10:59:01 +02:00
2025-07-21 10:59:01 +02:00
2025-07-21 10:59:01 +02:00
2025-07-21 10:59:01 +02:00
2025-07-21 10:59:01 +02:00
2025-07-21 10:59:01 +02:00
2025-07-21 10:59:01 +02:00
2025-07-21 10:59:01 +02:00
2025-07-21 10:59:01 +02:00
2025-07-21 10:59:01 +02:00
2023-09-23 05:41:26 +00:00
2026-04-10 14:52:23 +02:00
2026-04-10 14:52:23 +02:00
2025-07-08 11:16:18 -03:00
2023-10-14 03:52:38 +00:00
2019-08-12 16:00:22 -07:00
2024-12-02 22:43:55 +00:00
2023-09-29 06:18:44 +00:00
2023-09-29 06:18:44 +00:00
2021-09-14 23:58:56 -07:00
2022-07-31 04:08:02 +01:00
2024-09-27 15:26:48 +08:00
2024-12-05 16:12:50 +00:00
2024-03-18 18:10:06 +08:00
2024-03-18 18:10:06 +08:00
2024-06-25 10:08:44 +00:00
2024-10-29 18:29:27 +01:00
2024-03-18 18:10:06 +08:00
2024-03-18 18:10:06 +08:00
2024-03-18 18:10:06 +08:00
2024-03-18 18:10:06 +08:00
2023-04-13 09:35:17 +02:00
2024-12-05 16:12:50 +00:00
2024-03-18 18:10:06 +08:00
2019-05-17 02:25:20 +02:00
2019-05-17 02:25:20 +02:00
2021-09-11 18:08:35 -07:00
2024-12-05 16:12:50 +00:00
2024-03-18 18:10:06 +08:00
2021-10-21 14:55:00 +00:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2026-04-10 14:52:23 +02:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2026-04-10 14:52:27 +02:00
2026-04-10 14:52:27 +02:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2025-11-13 22:44:20 +01:00
2024-03-18 18:10:06 +08:00
2025-05-02 17:05:56 -03:00
2025-05-02 17:04:39 -03:00
2019-05-17 02:25:20 +02:00
2025-05-02 17:05:56 -03:00
2019-12-04 22:36:37 -05:00
2025-05-02 17:05:56 -03:00
2025-05-02 17:04:39 -03:00
2025-05-02 17:05:56 -03:00