Repository navigation
Commit 3aad304
test(startup): record the server's modules on Node before 22.15 too
test-startup-imports.js and the repro test-startup-heavy-imports.js failed
at client.connect ("Connection closed") on every Node before 22.15.0:
checked on 18.20.8, 20.19.5, 20.20.2 and 22.14.0.
Their preload imported registerHooks from node:module, which Node has only
from 22.15.0 / 23.5.0. On older Node the preload failed to link ("does not
provide an export named 'registerHooks'") and the server never started. The
preload now uses registerHooks() where it exists. Before 22.15 it records
imports through module.register() (record-modules-hooks.mjs) and requires
through Module._resolveFilename, in the same log format.
At the commit before, the test fails at connect on 20.20.2 and 22.14.0. Here
it passes on 18.20.8, 20.20.2, 22.14.0, 22.15.0 and 24.18.0, with the same
374 modules recorded before initialize on each.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent e4bdec9 commit 3aad304
2 files changed
Lines changed: 37 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | | - | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
| 13 | + | |
8 | 14 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments