Skip to content

feat(intl-messageformat)!: convert to esm#5456

Closed
longlho wants to merge 1 commit into12-14-feat_formatjs_editor_convert_to_esmfrom
12-14-feat_intl-messageformat_convert_to_esm
Closed

feat(intl-messageformat)!: convert to esm#5456
longlho wants to merge 1 commit into12-14-feat_formatjs_editor_convert_to_esmfrom
12-14-feat_intl-messageformat_convert_to_esm

Conversation

@longlho
Copy link
Copy Markdown
Member

@longlho longlho commented Dec 14, 2025

TL;DR

Convert intl-messageformat package to ESM-only format with proper .js extensions.

What changed?

  • Updated package.json to specify "type": "module" and added proper exports field
  • Added explicit .js extensions to all import/export statements
  • Removed CommonJS output by setting skip_cjs = True in Bazel build config
  • Removed main and module fields from package.json as they're no longer needed

How to test?

  1. Build the package with yarn build
  2. Import the package in an ESM environment to verify it works correctly
  3. Run tests to ensure functionality remains the same
  4. Verify that the package can be properly imported in projects using ESM

Why make this change?

This change modernizes the package to use native ES modules, which provides better tree-shaking and aligns with the direction of the JavaScript ecosystem. Using explicit .js extensions in imports ensures compatibility with ESM's stricter module resolution rules, while removing CommonJS output simplifies the package structure and maintenance.

@longlho longlho marked this pull request as ready for review December 14, 2025 17:10
Copy link
Copy Markdown
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.

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Dec 14, 2025

Merge activity

  • Dec 14, 5:12 PM UTC: longlho added this pull request to the Graphite merge queue.
  • Dec 14, 5:13 PM UTC: CI is running for this pull request on a draft pull request (#5460) due to your merge queue CI optimization settings.
  • Dec 14, 5:15 PM UTC: Merged by the Graphite merge queue via draft PR: #5460.

graphite-app Bot pushed a commit that referenced this pull request Dec 14, 2025
### TL;DR

Convert `intl-messageformat` package to ESM-only format with proper `.js` extensions.

### What changed?

- Updated `package.json` to specify `"type": "module"` and added proper exports field
- Added explicit `.js` extensions to all import/export statements
- Removed CommonJS output by setting `skip_cjs = True` in Bazel build config
- Removed `main` and `module` fields from package.json as they're no longer needed

### How to test?

1. Build the package with `yarn build`
2. Import the package in an ESM environment to verify it works correctly
3. Run tests to ensure functionality remains the same
4. Verify that the package can be properly imported in projects using ESM

### Why make this change?

This change modernizes the package to use native ES modules, which provides better tree-shaking and aligns with the direction of the JavaScript ecosystem. Using explicit `.js` extensions in imports ensures compatibility with ESM's stricter module resolution rules, while removing CommonJS output simplifies the package structure and maintenance.
@graphite-app graphite-app Bot closed this Dec 14, 2025
@graphite-app graphite-app Bot deleted the 12-14-feat_intl-messageformat_convert_to_esm branch December 14, 2025 17:15
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