This repository has been archived by the owner on Jul 3, 2022. It is now read-only.
Publish package with npm
instead of yarn
#9747
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8358
Turns out
assets
indeed are not supposed to be included in the package.However, since so far
token-list
was being published withyarn
, it was suffering from ayarn
bug, which makes it not handle ignored and unignored files properly if there is a negative expression inpackage.json#files
(there are numerous issues with confused people in Yarn repo, one of them — yarnpkg/yarn#8332).This pull request proposes changes publishing command from
yarn publish
tonpm publish
which in itself isn't a huge change (the effect should be the same), but since we'll be using NPM to pack the tarball files will be properly included/excluded and the resulting package will be 5.6 MB unpacked instead of >200 MB.Alternative solutions:
!**/*.spec.*
frompackage.json#files
, leaveyarn publish
, ship library with tests!**/*.spec.*
frompackage.json#files
, leaveyarn publish
, figure out some other way of ignoring files that Yarn will handle correctly (some mix of.npmignore
,#files
?)