Skip to content

feat(@formatjs/intl,@formatjs/fast-memoize,@formatjs/icu-messageformat-parser,@formatjs/intl-displaynames,@formatjs/intl-listformat,intl-messageformat,@formatjs/ecma402-abstract,@formatjs/intl-numberformat,@formatjs/icu-skeleton-parser): esm conditional exports#4109

Merged
pyrocat101 merged 1 commit intomainfrom
conditionalExports
May 22, 2023

Conversation

@pyrocat101
Copy link
Member

Fix #4013

Add exports to @formatjs/intl and its transitive dependencies to support dual ESM / CJS package distribution.

Why is this not a breaking change?

Anything not exported here never appeared in the documentation and therefore are considered internal implementation of the library. Therefore not exporting them is not a breaking change.

@pyrocat101 pyrocat101 requested a review from longlho May 22, 2023 02:36
@pyrocat101 pyrocat101 force-pushed the conditionalExports branch from 573a58a to 259d9b6 Compare May 22, 2023 02:47
@pyrocat101 pyrocat101 changed the title feat(@formatjs/intl,@formatjs/fast-memoize,@formatjs/icu-messageformat-parser,@formatjs/intl-displaynames,@formatjs/intl-listformat,intl-messageformat,@formatjs/ecma402-abstract): esm conditional exports feat(@formatjs/intl,@formatjs/fast-memoize,@formatjs/icu-messageformat-parser,@formatjs/intl-displaynames,@formatjs/intl-listformat,intl-messageformat,@formatjs/ecma402-abstract,@formatjs/intl-numberformat,@formatjs/icu-skeleton-parser): esm conditional exports May 22, 2023
…t-parser,@formatjs/intl-displaynames,@formatjs/intl-listformat,intl-messageformat,@formatjs/ecma402-abstract,@formatjs/intl-numberformat,@formatjs/icu-skeleton-parser): esm conditional exports
@pyrocat101 pyrocat101 force-pushed the conditionalExports branch from 259d9b6 to 8dd002f Compare May 22, 2023 02:51
@pyrocat101 pyrocat101 merged commit e0d593c into main May 22, 2023
@pyrocat101 pyrocat101 deleted the conditionalExports branch May 22, 2023 02:53
unional pushed a commit to unional/formatjs that referenced this pull request Jun 7, 2023
…t-parser,@formatjs/intl-displaynames,@formatjs/intl-listformat,intl-messageformat,@formatjs/ecma402-abstract,@formatjs/intl-numberformat,@formatjs/icu-skeleton-parser): esm conditional exports (formatjs#4109)

Fix formatjs#4013

Add `exports` to `@formatjs/intl` and its transitive dependencies to support dual ESM / CJS package distribution.

## Why is this not a breaking change?

Anything not exported here never appeared in the documentation and therefore are considered internal implementation of the library. Therefore not exporting them is not a breaking change.
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.

Add "exports" map to package.json (proper ESM support)

1 participant