Skip to content

Update primer/behaviors for esm compatibility - #2002

Merged
dgreif merged 4 commits into
mainfrom
dg-esm-exports
Mar 31, 2022
Merged

Update primer/behaviors for esm compatibility#2002
dgreif merged 4 commits into
mainfrom
dg-esm-exports

Conversation

@dgreif

Copy link
Copy Markdown
Contributor

In v1.1.1, @primer/behaviors adds better support of imports with ESM. This resolves issues for projects attempting to import @primer/react in environments that support ESM, but do not recognize the module export type. It also allows us to remove the override that caused Jest to tranform the behaviors files before using them.

Merge checklist

  • Added/updated tests

@dgreif
dgreif requested review from a team and jfuchsMarch 28, 2022 22:06
@changeset-bot

changeset-botBot commented Mar 28, 2022

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cbc5bed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
@primer/reactPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dgreif
dgreif temporarily deployed to visual-testing March 28, 2022 22:06 Inactive
@dgreif
dgreif temporarily deployed to visual-testing March 28, 2022 22:06 Inactive
@github-actions

github-actionsBot commented Mar 28, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js65.72 KB (0%)
dist/browser.umd.js66.11 KB (0%)

@pksjce

Copy link
Copy Markdown
Contributor

Would you think its useful to add a similar imports to @primer/react as well?

@dgreif

Copy link
Copy Markdown
ContributorAuthor

I think it has default which may give you the same behavior in the end. The down-stream use case only seem to have issues with the behaviors imports, so I think we are good to go

@pksjce

Copy link
Copy Markdown
Contributor

:shipit:

@dgreif
dgreif enabled auto-merge (squash) March 31, 2022 15:02
@dgreif
dgreif merged commit 3ebc1bb into mainMar 31, 2022
@dgreif
dgreif deleted the dg-esm-exports branch March 31, 2022 15:08
@primer-cssprimer-css mentioned this pull request Mar 31, 2022
Sign up for freeto 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.

2 participants

@dgreif@pksjce