fix!: publish shrinkwrap with prod dependencies only#5547
Merged
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
danez
commented
Mar 22, 2023
| text: 'Running `npm shrinkwrap`', | ||
| }).start() | ||
| await execa('npm', ['shrinkwrap']) | ||
| spinner.succeed() |
Contributor
Author
There was a problem hiding this comment.
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
lukasholzer
approved these changes
Apr 14, 2023
Contributor
lukasholzer
left a comment
There was a problem hiding this comment.
Should we mark it as a breaking change?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.