Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Conversation

@ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Feb 17, 2021

npm 7 changed the way globbing patterns are interpreted in files in package.json. This is undocumented, so I'm not sure whether this is a bug or not. This results in all *~ files (Vim temporary files) to be published to npm, which can double the package size.

This PR fixes this. I ran npm pack --dry before and after to ensure no files were being omitted.

Before.: 199.1 KB (packed), 928.8 KB (unpacked)
After: 48.4 KB (packed), 281.1 KB (unpacked)

@ehmicky ehmicky added the type: bug code to address defects in shipped code label Feb 17, 2021
@ehmicky ehmicky requested a review from JGAntunes February 17, 2021 19:49
@ehmicky ehmicky self-assigned this Feb 17, 2021
package.json Outdated
"!*~"
"src/**/*.js",
"!src/**/*.test.js",
"dist/main.js"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to publish dist/main.js.map?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Fixed in 27f4f9f

@ehmicky ehmicky requested a review from erezrokah February 18, 2021 12:08
@ehmicky ehmicky merged commit 87476f0 into master Feb 18, 2021
@ehmicky ehmicky deleted the fix/npm-7-files branch February 18, 2021 12:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

type: bug code to address defects in shipped code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants