Skip to content

[codex] Expose core Intl constructors#4254

Merged
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-intl-core
Jun 3, 2026
Merged

[codex] Expose core Intl constructors#4254
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-intl-core

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

  • Expose globalThis.Intl as a namespace and wire Intl through HIR/codegen global handling.
  • Add focused Intl.NumberFormat, Intl.DateTimeFormat, and Intl.Collator constructor/call-form support, including supportedLocalesOf, format/compare, and resolvedOptions for core locale shapes.
  • Add a Node parity fixture covering constructor shape, call forms, locale options, and instance/static methods.

Notes

This is focused compatibility coverage for the core constructors and option shapes exercised by Node parity, not a full ICU implementation.

Validation

  • cargo fmt --all -- --check
  • git diff --check HEAD~1..HEAD
  • ./scripts/check_file_size.sh
  • CARGO_BUILD_JOBS=1 CARGO_TARGET_DIR=/tmp/perry-intl-core-check cargo check -q -p perry-runtime -p perry-hir -p perry-codegen
  • npx -y node@25 --experimental-strip-types test-parity/node-suite/globals/intl-core.ts
  • NODE25_DIR=$(dirname "$(npx -y node@25 -p 'process.execPath')") PATH="$NODE25_DIR:$PATH" CARGO_BUILD_JOBS=1 PERRY_NO_AUTO_OPTIMIZE=1 ./run_parity_tests.sh --suite node-suite --module globals --filter intl-core

Closes #2850.

@proggeramlug proggeramlug force-pushed the codex/node-compat-intl-core branch from ce89c5f to f064a76 Compare June 3, 2026 13:07
@proggeramlug proggeramlug marked this pull request as ready for review June 3, 2026 13:07
@proggeramlug proggeramlug merged commit ab030c0 into PerryTS:main Jun 3, 2026
1 check 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.

runtime: expose Intl namespace and core locale constructors

2 participants