Skip to content

fix(node): add constants metadata tail parity#3705

Merged
proggeramlug merged 3 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-constants-tail
May 31, 2026
Merged

fix(node): add constants metadata tail parity#3705
proggeramlug merged 3 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-constants-tail

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Closes #3683.

Summary

  • Add the deprecated flat node:constants metadata tail for libuv dirent/symlink/copyfile constants, POSIX file type/permission masks, selected POSIX open flags, and defaultCoreCipherList.
  • Share the added values through the existing constants path so default import, namespace import, named imports, fs.constants, and crypto.constants.defaultCoreCipherList stay aligned.
  • Update the API manifest and generated API docs for the newly covered flat constants.

Why batched

These entries are one constants metadata cluster: they use the same native module constant table, enumeration list, manifest exports, and import/parity surface. Keeping them together avoids repeated churn through the same generated docs and manifest paths.

Tests added

  • test-parity/node-suite/constants/imports/metadata-tail.ts covers default/namespace/named import parity, enumerable keys, Linux open flag values, fs.constants alignment, Linux O_SYMLINK absence, and defaultCoreCipherList shape.

Verification

  • TMPDIR="$PWD/target/tmp" PATH=/home/github-runner/actions-runner/externals/node24/bin:$PATH ./run_parity_tests.sh --suite node-suite --module constants - PASS 2/2, report test-parity/reports/parity_report_20260531_120700.json
  • TMPDIR="$PWD/target/tmp" CARGO_BUILD_JOBS=1 RUSTC_WRAPPER= cargo check -p perry-runtime -p perry-codegen -p perry-api-manifest - PASS
  • TMPDIR="$PWD/target/tmp" CARGO_BUILD_JOBS=1 RUSTC_WRAPPER= cargo test -p perry-codegen --test manifest_consistency - PASS 4/4
  • cargo fmt --all -- --check - PASS
  • git diff --check HEAD - PASS
  • ./scripts/check_file_size.sh - PASS

Non-goals

  • No broader zlib/http2 constants enumeration changes.
  • No behavior changes outside the flat constants path, shared fs.constants values, and crypto.constants.defaultCoreCipherList.
  • Platform-absent constants remain absent on unsupported targets.

Ralph Küpper added 2 commits May 31, 2026 14:57
# Conflicts:
#	crates/perry-runtime/src/object/native_module.rs
#	docs/api/perry.d.ts
#	docs/src/api/reference.md
# Conflicts:
#	docs/api/perry.d.ts
#	docs/src/api/reference.md
@proggeramlug proggeramlug merged commit c975274 into PerryTS:main May 31, 2026
10 of 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:constants: fill POSIX file flag, libuv, and default cipher metadata tail

2 participants