test(module): expand granular Node parity coverage#6489
Conversation
📝 WalkthroughWalkthroughExpands the ChangesNode module parity lane
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test-parity/node-suite/module/methods/find-package-json.ts (1)
3-4: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd path separator normalization for cross-platform deterministic output.
The returned paths from
findPackageJSONandprocess.cwd()might contain backslashes (\) on Windows. To ensure the parity script's output is consistently portable across environments, replace backslashes with forward slashes, similar to theslashhelper used inresolve-paths.ts.♻️ Proposed refactor
-const normalize = (value: unknown) => - String(value).replace(process.cwd(), "<cwd>"); +const normalize = (value: unknown) => + String(value).replace(process.cwd(), "<cwd>").replaceAll("\\", "/");🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test-parity/node-suite/module/methods/find-package-json.ts` around lines 3 - 4, Update the normalize helper to convert backslashes to forward slashes for both the input value and process.cwd() before replacing the working-directory prefix, matching the cross-platform normalization used by the slash helper in resolve-paths.ts.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@test-parity/node-suite/module/methods/find-package-json.ts`:
- Around line 3-4: Update the normalize helper to convert backslashes to forward
slashes for both the input value and process.cwd() before replacing the
working-directory prefix, matching the cross-platform normalization used by the
slash helper in resolve-paths.ts.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7e1f399e-b787-40a5-828d-fe6e9a927ed7
⛔ Files ignored due to path filters (8)
test-parity/node-suite/module/node_modules/parity-conditions/import.mjsis excluded by!**/node_modules/**test-parity/node-suite/module/node_modules/parity-conditions/package.jsonis excluded by!**/node_modules/**test-parity/node-suite/module/node_modules/parity-conditions/require.cjsis excluded by!**/node_modules/**test-parity/node-suite/module/require/node_modules/parity-exports/feature.cjsis excluded by!**/node_modules/**test-parity/node-suite/module/require/node_modules/parity-exports/internal.cjsis excluded by!**/node_modules/**test-parity/node-suite/module/require/node_modules/parity-exports/legacy.cjsis excluded by!**/node_modules/**test-parity/node-suite/module/require/node_modules/parity-exports/package.jsonis excluded by!**/node_modules/**test-parity/node-suite/module/require/node_modules/parity-exports/root.cjsis excluded by!**/node_modules/**
📒 Files selected for processing (60)
test-parity/node-suite/module/EVIDENCE.mdtest-parity/node-suite/module/README.mdtest-parity/node-suite/module/commonjs/constructor-prototype.tstest-parity/node-suite/module/commonjs/prototype-descriptors.tstest-parity/node-suite/module/commonjs/wrap-wrapper.tstest-parity/node-suite/module/exports/builtin-modules.tstest-parity/node-suite/module/exports/constants.tstest-parity/node-suite/module/exports/default-static-identity.tstest-parity/node-suite/module/exports/descriptors.tstest-parity/node-suite/module/exports/public-surface.tstest-parity/node-suite/module/helpers/compile-cache-disabled.tstest-parity/node-suite/module/helpers/compile-cache.tstest-parity/node-suite/module/helpers/strip-options-validation.tstest-parity/node-suite/module/helpers/strip-syntax.tstest-parity/node-suite/module/imports/cjs-dynamic-identity.tstest-parity/node-suite/module/imports/cjs-namespace.tstest-parity/node-suite/module/imports/fixtures/cjs-object.cjstest-parity/node-suite/module/imports/json-attribute.tstest-parity/node-suite/module/imports/json-require-identity.tstest-parity/node-suite/module/imports/package-conditions.tstest-parity/node-suite/module/loader/register-hooks-order.tstest-parity/node-suite/module/methods/find-package-json.tstest-parity/node-suite/module/methods/function-shapes.tstest-parity/node-suite/module/methods/is-builtin-validation.tstest-parity/node-suite/module/methods/sync-builtin-exports.tstest-parity/node-suite/module/require/cache-identity-deletion.tstest-parity/node-suite/module/require/create-require-overloads.tstest-parity/node-suite/module/require/cycles.tstest-parity/node-suite/module/require/error-fields.tstest-parity/node-suite/module/require/exports-alias.tstest-parity/node-suite/module/require/extensions.tstest-parity/node-suite/module/require/fixtures/child.cjstest-parity/node-suite/module/require/fixtures/custom.exttest-parity/node-suite/module/require/fixtures/cycle-a.cjstest-parity/node-suite/module/require/fixtures/cycle-b.cjstest-parity/node-suite/module/require/fixtures/data.jsontest-parity/node-suite/module/require/fixtures/exports-alias.cjstest-parity/node-suite/module/require/fixtures/find-package/nested/probe.cjstest-parity/node-suite/module/require/fixtures/find-package/package.jsontest-parity/node-suite/module/require/fixtures/metadata.cjstest-parity/node-suite/module/require/fixtures/parent.cjstest-parity/node-suite/module/require/fixtures/pkg-main/lib/entry.cjstest-parity/node-suite/module/require/fixtures/pkg-main/package.jsontest-parity/node-suite/module/require/fixtures/value.cjstest-parity/node-suite/module/require/function-descriptors.tstest-parity/node-suite/module/require/json-cache.tstest-parity/node-suite/module/require/module-load.tstest-parity/node-suite/module/require/module-metadata.tstest-parity/node-suite/module/require/package-boundaries.tstest-parity/node-suite/module/require/parent-children.tstest-parity/node-suite/module/require/resolve-paths.tstest-parity/node-suite/module/source-map/constructor-payload.tstest-parity/node-suite/module/source-map/descriptors-validation.tstest-parity/node-suite/module/source-map/find-inline.tstest-parity/node-suite/module/source-map/fixtures/inline-map.cjstest-parity/node-suite/module/source-map/getter-semantics.tstest-parity/node-suite/module/source-map/lookup-boundaries.tstest-parity/node-suite/module/source-map/malformed-indexed.tstest-parity/node-suite/module/source-map/receiver-validation.tstest-parity/node_suite_baseline.json
…le-parity # Conflicts: # test-parity/node_suite_baseline.json
Summary
node:modulelane from 28 to 69 runner-visible entries with 41 deterministic contractsModule, CommonJS loading and cache graphs,createRequire, package boundaries, CJS/ESM/JSON interop, source maps, loader-hook ordering, compile-cache state, TypeScript stripping, and builtin ESM synchronizationCoverage
Verification
85ffb7464d6c8e860fb2741cc635c2d59711636d1dfafb5a742a8355c95ab1a23eddc8e08d9e49fffe8633061efd8bb7e566e3f41e664a2e3e291d5bcda30ef6Boundaries
The exact Node 26.5.0 build rejects TypeScript transform mode, so the suite records supported stripping and validation behavior rather than borrowing output from another build. Permission-dependent compile-cache failures, custom generated loader source, runtime virtual modules, symlink/realpath matrices, workers, policies, native addons, SEA/snapshots, coverage/inspector, watch mode, races, stress, and platform-specific global paths remain separate lanes. Node remains authoritative where Deno and Bun intentionally diverge.
Summary by CodeRabbit
New Features
Documentation
Tests