Skip to content
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
merged 1 commit into from
Dec 23, 2021
Merged

Publish package with npm instead of yarn #9747

merged 1 commit into from
Dec 23, 2021

Conversation

sjchmiela
Copy link
Contributor

Fixes #8358

Turns out assets indeed are not supposed to be included in the package.

However, since so far token-list was being published with yarn, it was suffering from a yarn bug, which makes it not handle ignored and unignored files properly if there is a negative expression in package.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 to npm 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:

  • remove negative !**/*.spec.* from package.json#files, leave yarn publish, ship library with tests
  • remove negative !**/*.spec.* from package.json#files, leave yarn publish, figure out some other way of ignoring files that Yarn will handle correctly (some mix of .npmignore, #files?)
  • publish in a two step process — first pack with NPM, then publish with Yarn (what difference would it make?)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

project is now failing to publish npm package due to size
2 participants