You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 608768c
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(scripts): standardize on .mts and bump the Node floor
Convert the three remaining scripts/**/*.mjs files (binding_pins,
fp_fuzz, node_compat_matrix) to TypeScript .mts, standardizing onto
the same module + type-stripping convention the soak scripts already
use. Add reasonable types (function signatures, interfaces, typed
collections) without a deep typing pass — `any` where inference is
unclear.
Node floor: declare engines.node >= 22.18.0 in package.json (the
minimum for native .mts type stripping). The repo's .node-version pin
(26.5.1) is well above this, and every CI workflow already uses
node-version-file: .node-version, so no workflow Node-version bump
was needed.
3 files converted. Invocation sites updated:
- .github/workflows/test.yml (binding_pins --check)
- .github/workflows/node-compat-matrix.yml (node_compat_matrix --check + comments)
- scripts/soak/external-tools.mts (string reference)
- external-tools.json (description fields)
- test-parity/node-compat-matrix.baseline.json (description)
- test-parity/node-compat-matrix.skip.json (description)
- docs/src/cli/fast-math.md, docs/src/native-libraries/upstream-pins.md,
docs/src/testing/node-compat-matrix.md
- CLAUDE.md, llms.txt, .gitignore
- crates/perry/src/commands/compile/well_known.rs (comments)
- gc-handoff/NODE26-NOTES.md
- docs/po/*.po + docs/po/messages.pot (translation strings)
- In-script help/usage text in all three converted files
No files left as .mjs — all scripts/**/*.mjs are now .mts.
CHANGELOG.md and historical changelog.d fragments left untouched
(frozen archive / per-PR records of past releases).
Verified: binding_pins --check passes, node_compat_matrix --help runs,
fp_fuzz runs (trivial invocation), npm run soak / tools:check /
test:scripts all pass, CI YAML validated.
Breadth sweep over EVERY `require("module").builtinModules` entry, both import forms (`M` and `node:M`), against a **pinned, SRI-verified Node** (the "latest stable" oracle, pinned in `external-tools.json``tools.node.version` — currently **26.5.1**, independent of the `.node-version` gap-suite oracle). It compares Perry's export-SHAPE fingerprint (sorted `name:typeof` over the module namespace + the default export's typeof) to the oracle's. This is the systematic version of the #812 "42-module behavioral matrix" — shape, not deep behavior (behavioral cases stay in the node-suite).
35
35
36
36
```bash
37
37
# FAST LOOP — reach for this first when iterating on ONE builtin:
38
-
node scripts/node_compat_matrix.mjs --module fs # one module, both forms
39
-
node scripts/node_compat_matrix.mjs --module fs,path,crypto # a few
40
-
node scripts/node_compat_matrix.mjs --module fs --method readFileSync,promises # only these exports
41
-
node scripts/node_compat_matrix.mjs --only fs.readFileSync,path.join # combined mod.export form
38
+
node scripts/node_compat_matrix.mts --module fs # one module, both forms
39
+
node scripts/node_compat_matrix.mts --module fs,path,crypto # a few
40
+
node scripts/node_compat_matrix.mts --module fs --method readFileSync,promises # only these exports
41
+
node scripts/node_compat_matrix.mts --only fs.readFileSync,path.join # combined mod.export form
42
42
# (the pinned Node download is skipped once cached under .cache/node-pin/)
A `--module` selector scopes `--check`/`--update-baseline` to just that slice (a single-module refresh never rewrites the whole baseline). A `--method`/`--only` subset is a print-only fast diagnostic (it narrows the fingerprint, so it is refused for `--check`/`--update-baseline`). **Bump the pinned Node** by editing `tools.node.version` in `external-tools.json` (add per-platform sha512 SRI), then `--update-baseline` and review the diff. Needs the release binary (`cargo build --release -p perry`). Full page: `docs/src/testing/node-compat-matrix.md`.
Converted the three remaining `scripts/**/*.mjs` files (`binding_pins`, `fp_fuzz`, `node_compat_matrix`) to TypeScript `.mts`, standardizing onto the same module + type-stripping convention the soak scripts already use. Declared `engines.node >= 22.18.0` in `package.json` (the floor for native `.mts` type stripping; the repo's `.node-version` pin of 26.5.1 is well above it). All invocation sites — CI workflows, docs, config JSON, in-script help text, Rust comments — updated to reference the new `.mts` paths.
0 commit comments