-
Notifications
You must be signed in to change notification settings - Fork 365
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!: publish shrinkwrap with prod dependencies only #5547
Conversation
📊 Benchmark resultsComparing with 7215229 Package size: 302 MB⬇️ 0.00% decrease vs. 7215229
Legend
|
a40e99e
to
caf4c02
Compare
caf4c02
to
6b3d743
Compare
6b3d743
to
ce5f2e6
Compare
text: 'Running `npm shrinkwrap`', | ||
}).start() | ||
await execa('npm', ['shrinkwrap']) | ||
spinner.succeed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change. This script will run before publishing (see package.json).
Thanks for the work on this! |
a38b954
to
ac48a98
Compare
ac48a98
to
89fcffe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mark it as a breaking change?
Summary
Ref #5323
This is a reattempt of #5359 which fixes the problems that occurred last time.
It removes the shrinkwrap from the repo and instead uses the normal package-lock.
On publish we remove devDependencies, scripts & ava properties from package.json and then create the shrinkwrap. This new way ensures that all optional dependencies are present in the shrinkwrap file. (Last time the optional dependencies were missing)
Also split up the release workflow into 2 jobs so we do not have to repeat the if:
${{ steps.release.outputs.release_created }}
for every single step.