Skip to content

fix(path): expose _makeLong alias#2793

Merged
proggeramlug merged 9 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-2683-path-makelong
May 30, 2026
Merged

fix(path): expose _makeLong alias#2793
proggeramlug merged 9 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-2683-path-makelong

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

@andrewtdiz andrewtdiz commented May 29, 2026

Closes #2683.

Summary

  • Add node:path _makeLong to the API manifest and generated docs.
  • Route _makeLong through the same lowering, runtime binding, and dispatch path as toNamespacedPath for path, path.posix, and path.win32.
  • Add a parity fixture covering enumerable keys, named/default alias equality, and POSIX/Windows results.

Repro

On origin/main (94bbda1a), the new fixture exposed the missing alias as runtime-visible undefined values:

keys top: false
keys posix: false
keys win32: false
typeof top: undefined
named equality: true
default equality: true
posix equality: true
win32 equality: true
named result: undefined
default result: undefined
posix result: undefined
win32 result: undefined

Node 24 oracle output:

keys top: true
keys posix: true
keys win32: true
typeof top: function
named equality: true
default equality: true
posix equality: true
win32 equality: true
named result: /tmp/a
default result: /tmp/a
posix result: /tmp/a
win32 result: \\?\C:\tmp\a

Fixed Perry output now matches the Node oracle.

Verification

  • PATH=/home/github-runner/actions-runner/externals/node24/bin:$PATH node --experimental-strip-types test-parity/node-suite/path/toNamespacedPath/make-long-alias.ts
  • RUSTC_WRAPPER= target/release/perry test-parity/node-suite/path/toNamespacedPath/make-long-alias.ts -o /tmp/perry_path_makelong_2683 && /tmp/perry_path_makelong_2683
  • PATH=/home/github-runner/actions-runner/externals/node24/bin:$PATH RUSTC_WRAPPER= ./run_parity_tests.sh --suite node-suite --module path --filter make-long-alias
  • PATH=/home/github-runner/actions-runner/externals/node24/bin:$PATH RUSTC_WRAPPER= ./run_parity_tests.sh --suite node-suite --module path --filter toNamespacedPath
  • cargo fmt --all -- --check
  • git diff --check origin/main...HEAD
  • ./scripts/check_file_size.sh
  • jq empty test-parity/known_failures.json test-parity/threshold.json
  • RUSTC_WRAPPER= cargo check -p perry-api-manifest -p perry-hir -p perry-runtime
  • RUSTC_WRAPPER= cargo test -p perry-api-manifest
  • RUSTC_WRAPPER= cargo test -p perry-codegen --test manifest_consistency

@andrewtdiz andrewtdiz force-pushed the codex/node-compat-2683-path-makelong branch from 0568e26 to 07ecba0 Compare May 30, 2026 02:32
andrewtdiz and others added 2 commits May 30, 2026 03:05
# Conflicts:
#	crates/perry-runtime/src/object/native_module.rs
#	docs/api/perry.d.ts
#	docs/src/api/reference.md
@proggeramlug proggeramlug force-pushed the codex/node-compat-2683-path-makelong branch from 6d8c9a3 to ba5d7e6 Compare May 30, 2026 03:34
andrewtdiz and others added 5 commits May 30, 2026 03:35
# Conflicts:
#	docs/api/perry.d.ts
#	docs/src/api/reference.md
# Conflicts:
#	crates/perry-api-manifest/src/lib.rs
#	crates/perry-runtime/src/object/native_module.rs
#	docs/api/perry.d.ts
#	docs/src/api/reference.md
# Conflicts:
#	crates/perry-api-manifest/src/lib.rs
#	docs/api/perry.d.ts
#	docs/src/api/reference.md
@proggeramlug proggeramlug merged commit c6960bd into PerryTS:main May 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node:path: expose _makeLong legacy alias

2 participants