feat(@formatjs/intl-locale)!: convert to esm#5435
Closed
longlho wants to merge 1 commit into12-13-feat_formatjs_intl_convert_to_esmfrom
Closed
feat(@formatjs/intl-locale)!: convert to esm#5435longlho wants to merge 1 commit into12-13-feat_formatjs_intl_convert_to_esmfrom
longlho wants to merge 1 commit into12-13-feat_formatjs_intl_convert_to_esmfrom
Conversation
This was referenced Dec 14, 2025
Closed
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Dec 14, 2025
Merge activity
|
graphite-app bot
pushed a commit
that referenced
this pull request
Dec 14, 2025
### TL;DR Convert `@formatjs/intl-locale` to ESM-only package. ### What changed? - Updated `@formatjs/intl-locale` package to be ESM-only by adding `"type": "module"` to package.json - Added proper exports configuration in package.json - Updated all imports to use `.js` extension for proper ESM resolution - Removed CommonJS build by adding `skip_cjs = True` in Bazel config - Updated all imports of `@formatjs/intl-locale/polyfill` to `@formatjs/intl-locale/polyfill.js` across various packages ### How to test? 1. Build the project and verify that the `intl-locale` package works correctly as an ESM module 2. Run tests for all packages that depend on `intl-locale` to ensure they can properly import the polyfill 3. Verify that applications using `@formatjs/intl-locale` can still import it correctly with the new ESM format ### Why make this change? This change modernizes the `intl-locale` package to use ESM format, which is the standard module system for JavaScript. This improves compatibility with modern bundlers and runtimes while ensuring proper static analysis and tree-shaking capabilities. The explicit `.js` extensions in imports are required for proper ESM resolution.
graphite-app bot
pushed a commit
that referenced
this pull request
Dec 14, 2025
### TL;DR Convert `@formatjs/intl-locale` to ESM-only package. ### What changed? - Updated `@formatjs/intl-locale` package to be ESM-only by adding `"type": "module"` to package.json - Added proper exports configuration in package.json - Updated all imports to use `.js` extension for proper ESM resolution - Removed CommonJS build by adding `skip_cjs = True` in Bazel config - Updated all imports of `@formatjs/intl-locale/polyfill` to `@formatjs/intl-locale/polyfill.js` across various packages ### How to test? 1. Build the project and verify that the `intl-locale` package works correctly as an ESM module 2. Run tests for all packages that depend on `intl-locale` to ensure they can properly import the polyfill 3. Verify that applications using `@formatjs/intl-locale` can still import it correctly with the new ESM format ### Why make this change? This change modernizes the `intl-locale` package to use ESM format, which is the standard module system for JavaScript. This improves compatibility with modern bundlers and runtimes while ensuring proper static analysis and tree-shaking capabilities. The explicit `.js` extensions in imports are required for proper ESM resolution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

TL;DR
Convert
@formatjs/intl-localeto ESM-only package.What changed?
@formatjs/intl-localepackage to be ESM-only by adding"type": "module"to package.json.jsextension for proper ESM resolutionskip_cjs = Truein Bazel config@formatjs/intl-locale/polyfillto@formatjs/intl-locale/polyfill.jsacross various packagesHow to test?
intl-localepackage works correctly as an ESM moduleintl-localeto ensure they can properly import the polyfill@formatjs/intl-localecan still import it correctly with the new ESM formatWhy make this change?
This change modernizes the
intl-localepackage to use ESM format, which is the standard module system for JavaScript. This improves compatibility with modern bundlers and runtimes while ensuring proper static analysis and tree-shaking capabilities. The explicit.jsextensions in imports are required for proper ESM resolution.