Skip to content

fix(constants): expose deprecated module alias#2769

Merged
proggeramlug merged 11 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-2571-constants-alias
May 30, 2026
Merged

fix(constants): expose deprecated module alias#2769
proggeramlug merged 11 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-2571-constants-alias

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

  • add constants as a supported native module with flat fs/os/crypto constant exports Perry already supports under module-specific *.constants namespaces
  • route node:constants property reads through the existing fs/os/crypto constants tables and enumerate the supported flat keys
  • cache the constants namespace so process.getBuiltinModule("constants") matches the imported/default namespace identity
  • add focused parity coverage for default, namespace, named imports, module-specific equality, and process.getBuiltinModule

Fixes #2571

Verification

  • cargo fmt --all -- --check
  • jq empty test-parity/known_failures.json test-parity/threshold.json
  • git diff --check
  • ./scripts/check_file_size.sh
  • RUSTC_WRAPPER= cargo check -p perry-api-manifest -p perry-codegen -p perry-runtime
  • RUSTC_WRAPPER= cargo test -p perry-api-manifest
  • RUSTC_WRAPPER= cargo test -p perry-codegen --test manifest_consistency
  • PATH=/home/github-runner/actions-runner/externals/node24/bin:$PATH RUSTC_WRAPPER= ./run_parity_tests.sh --suite node-suite --module constants --filter flat-alias
  • RUSTC_WRAPPER= ./scripts/regen_api_docs.sh
  • git diff --check --cached

@andrewtdiz andrewtdiz force-pushed the codex/node-compat-2571-constants-alias branch from 47c2bf0 to a201504 Compare May 29, 2026 23:25
@andrewtdiz
Copy link
Copy Markdown
Contributor Author

Rebased onto current main (94bbda1a) and force-pushed a2015047; #2769 is now mergeable on GitHub (checks pending/blocking only). Re-resolved generated docs via RUSTC_WRAPPER= ./scripts/regen_api_docs.sh and reran verification:\n\n- RUSTC_WRAPPER= target/release/perry test-parity/node-suite/constants/imports/flat-alias.ts -o /tmp/perry_constants_alias_2571_rebased && /tmp/perry_constants_alias_2571_rebased\n- PATH=/home/github-runner/actions-runner/externals/node24/bin:/root/.codex/tmp/arg0/codex-arg0315Laj:/usr/local/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path:/root/.local/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUSTC_WRAPPER= ./run_parity_tests.sh --suite node-suite --module constants --filter flat-alias (1/1, report test-parity/reports/parity_report_20260529_232417.json)\n- cargo fmt --all -- --check\n- git diff --check origin/main...HEAD\n- ./scripts/check_file_size.sh\n- jq empty test-parity/known_failures.json test-parity/threshold.json\n- RUSTC_WRAPPER= cargo check -p perry-api-manifest -p perry-runtime\n- RUSTC_WRAPPER= cargo test -p perry-api-manifest\n- RUSTC_WRAPPER= cargo test -p perry-codegen --test manifest_consistency

@proggeramlug proggeramlug merged commit bc26b2f 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:constants: expose deprecated constants module alias

2 participants