Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bundle): add exports for test-helpers #2419

Merged
merged 19 commits into from
Oct 11, 2022
Merged

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Oct 10, 2022

Background

Certain files from utils are not included in the package, specifically if they are not imported by a file through an entrypoint (like src/utils/test-helpers.tsx)

Approach

This PR adds additional entrypoints for files expected to be in the package. Currently, files under utils will not be included in the bundle unless they are referenced/imported by existing code. In the case of test helpers, this file is now explicitly included as it's export pattern would not fall under the existing lib-esm/*.

@changeset-bot
Copy link

changeset-bot bot commented Oct 10, 2022

🦋 Changeset detected

Latest commit: 0095409

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

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 77.59 KB (0%)
dist/browser.umd.js 78.26 KB (0%)

@joshblack joshblack temporarily deployed to github-pages October 10, 2022 18:02 Inactive
@joshblack joshblack temporarily deployed to github-pages October 10, 2022 18:12 Inactive
@joshblack joshblack temporarily deployed to github-pages October 10, 2022 19:44 Inactive
Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! ship it :)

@siddharthkp
Copy link
Member

siddharthkp commented Oct 11, 2022

Update: I looked at every diff in lib and lib-esm for the output of this PR (see comments in #2421) and I don't feel very confident 😅

For a quick review + merge, can we break this PR into the immediate hotfix of shipping test-helpers and long term improvements?

rollup.config.js Outdated Show resolved Hide resolved
@joshblack joshblack temporarily deployed to github-pages October 11, 2022 15:01 Inactive
@joshblack joshblack temporarily deployed to github-pages October 11, 2022 15:26 Inactive
@joshblack joshblack temporarily deployed to github-pages October 11, 2022 15:41 Inactive
@joshblack joshblack marked this pull request as ready for review October 11, 2022 15:51
@joshblack joshblack requested review from a team and josepmartins October 11, 2022 15:51
@joshblack joshblack temporarily deployed to github-pages October 11, 2022 15:57 Inactive
Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paired and tested this, let's ship it after fixing deprecate warnings

@joshblack joshblack temporarily deployed to github-pages October 11, 2022 17:48 Inactive
@joshblack joshblack temporarily deployed to github-pages October 11, 2022 18:17 Inactive
@joshblack joshblack merged commit 64f719f into main Oct 11, 2022
@joshblack joshblack deleted the fix/update-utils-entrypoint branch October 11, 2022 18:44
@primer-css primer-css mentioned this pull request Oct 11, 2022
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.

2 participants