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

fix(bundle): update files field for npm package #2391

Merged
merged 3 commits into from
Oct 3, 2022

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Sep 30, 2022

This PR adds lib/node_modules to the files array in package.json. By default, folders named node_modules are (understandably) not included during publish. This folder is now explicitly included. A quick test with npm publish --dry-run lists this folder and its files in the package tarball

image

Context

The node_modules folder here is only present for CommonJS and is for dependencies which are ESM-only. This is a current trade-off to allow the CommonJS bundle to work until PRC is able to move to an ESM-only package. This does not impact the ESM path for PRC.

@joshblack joshblack requested review from a team and colebemis September 30, 2022 22:38
@changeset-bot
Copy link

changeset-bot bot commented Sep 30, 2022

🦋 Changeset detected

Latest commit: 1aea651

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

@joshblack joshblack changed the title fix(bundle): add lib/node_modulels to files fix(bundle): add lib/node_modules to files Sep 30, 2022
@joshblack joshblack changed the title fix(bundle): add lib/node_modules to files fix(bundle): update files field for npm package Sep 30, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 30, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 77.1 KB (0%)
dist/browser.umd.js 77.71 KB (0%)

@joshblack joshblack temporarily deployed to github-pages September 30, 2022 22:45 Inactive
@joshblack joshblack enabled auto-merge (squash) October 3, 2022 15:18
@joshblack joshblack temporarily deployed to github-pages October 3, 2022 15:25 Inactive
@joshblack joshblack merged commit 845001b into main Oct 3, 2022
@joshblack joshblack deleted the fix/add-node-modules-to-files branch October 3, 2022 15:27
@primer-css primer-css mentioned this pull request Oct 3, 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.

None yet

2 participants