Skip to content

fix(@formatjs/intl-numberformat)!: convert to ESM#5431

Closed
longlho wants to merge 1 commit intographite-base/5431from
12-13-fix_formatjs_intl-numberformat_convert_to_esm
Closed

fix(@formatjs/intl-numberformat)!: convert to ESM#5431
longlho wants to merge 1 commit intographite-base/5431from
12-13-fix_formatjs_intl-numberformat_convert_to_esm

Conversation

@longlho
Copy link
Member

@longlho longlho commented Dec 14, 2025

TL;DR

Convert intl-numberformat package to ESM format.

What changed?

  • Added "type": "module" to package.json
  • Added proper exports configuration in package.json
  • Updated all import paths to include .js extensions
  • Skipped CJS build in Bazel configuration
  • Updated import references in react-intl examples to use .js extensions

How to test?

  1. Build the package with yarn build
  2. Verify that the package works correctly in ESM environments
  3. Test the react-intl examples to ensure they still function properly
  4. Verify that polyfills can still be imported correctly

Why make this change?

This change modernizes the intl-numberformat package by converting it to use ES Modules natively. This improves compatibility with modern JavaScript tooling and bundlers while maintaining the same functionality. The change is part of a broader effort to update FormatJS packages to use ESM.

Copy link
Member Author

longlho commented Dec 14, 2025

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.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • main - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@longlho longlho marked this pull request as ready for review December 14, 2025 05:09
graphite-app bot pushed a commit that referenced this pull request Dec 14, 2025
### TL;DR

Convert `intl-numberformat` package to ESM format.

### What changed?

- Added `"type": "module"` to package.json
- Added proper exports configuration in package.json
- Updated all import paths to include `.js` extensions
- Skipped CJS build in Bazel configuration
- Updated import references in react-intl examples to use `.js` extensions

### How to test?

1. Build the package with `yarn build`
2. Verify that the package works correctly in ESM environments
3. Test the react-intl examples to ensure they still function properly
4. Verify that polyfills can still be imported correctly

### Why make this change?

This change modernizes the `intl-numberformat` package by converting it to use ES Modules natively. This improves compatibility with modern JavaScript tooling and bundlers while maintaining the same functionality. The change is part of a broader effort to update FormatJS packages to use ESM.
@graphite-app
Copy link

graphite-app bot commented Dec 14, 2025

Merge activity

  • Dec 14, 5:17 AM UTC: CI is running for this pull request on a draft pull request (#5439) due to your merge queue CI optimization settings.
  • Dec 14, 5:17 AM UTC: longlho added this pull request to the Graphite merge queue.
  • Dec 14, 5:22 AM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #5430.
  • Dec 14, 5:22 AM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #5430.
  • Dec 14, 5:26 AM UTC: longlho added this pull request to the Graphite merge queue.
  • Dec 14, 5:26 AM UTC: CI is running for this pull request on a draft pull request (#5442) due to your merge queue CI optimization settings.
  • Dec 14, 5:29 AM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #5430.
  • Dec 14, 5:46 AM UTC: longlho added this pull request to the Graphite merge queue.
  • Dec 14, 5:47 AM UTC: CI is running for this pull request on a draft pull request (#5449) due to your merge queue CI optimization settings.
  • Dec 14, 5:50 AM UTC: Merged by the Graphite merge queue via draft PR: #5449.

@graphite-app graphite-app bot changed the base branch from 12-13-fix_fix_exports to graphite-base/5431 December 14, 2025 05:24
graphite-app bot pushed a commit that referenced this pull request Dec 14, 2025
### TL;DR

Convert `intl-numberformat` package to ESM format.

### What changed?

- Added `"type": "module"` to package.json
- Added proper exports configuration in package.json
- Updated all import paths to include `.js` extensions
- Skipped CJS build in Bazel configuration
- Updated import references in react-intl examples to use `.js` extensions

### How to test?

1. Build the package with `yarn build`
2. Verify that the package works correctly in ESM environments
3. Test the react-intl examples to ensure they still function properly
4. Verify that polyfills can still be imported correctly

### Why make this change?

This change modernizes the `intl-numberformat` package by converting it to use ES Modules natively. This improves compatibility with modern JavaScript tooling and bundlers while maintaining the same functionality. The change is part of a broader effort to update FormatJS packages to use ESM.
graphite-app bot pushed a commit that referenced this pull request Dec 14, 2025
### TL;DR

Convert `intl-numberformat` package to ESM format.

### What changed?

- Added `"type": "module"` to package.json
- Added proper exports configuration in package.json
- Updated all import paths to include `.js` extensions
- Skipped CJS build in Bazel configuration
- Updated import references in react-intl examples to use `.js` extensions

### How to test?

1. Build the package with `yarn build`
2. Verify that the package works correctly in ESM environments
3. Test the react-intl examples to ensure they still function properly
4. Verify that polyfills can still be imported correctly

### Why make this change?

This change modernizes the `intl-numberformat` package by converting it to use ES Modules natively. This improves compatibility with modern JavaScript tooling and bundlers while maintaining the same functionality. The change is part of a broader effort to update FormatJS packages to use ESM.
@graphite-app graphite-app bot closed this Dec 14, 2025
@graphite-app graphite-app bot deleted the 12-13-fix_formatjs_intl-numberformat_convert_to_esm branch December 14, 2025 05:50
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.

1 participant