-
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 #5359
Conversation
@@ -38,7 +38,7 @@ | |||
"url": "https://github.com/netlify/cli/issues" | |||
}, | |||
"scripts": { | |||
"prepare": "husky install node_modules/@netlify/eslint-config-node/.husky/", | |||
"prepare": "is-ci || husky install node_modules/@netlify/eslint-config-node/.husky/", |
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.
We don't need husky in CI, it just slows done publish by running lint and stuff, which at that point should all be good.
cache-dependency-path: 'npm-shrinkwrap.json' | ||
check-latest: true | ||
node-version: lts/* | ||
cache: npm |
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.
All non-test workflows I changed to use the latest lts version instead of the latest version and not do extra requests to check for the latest. The nodejs version here does not really matter, and I think it is good to use the most stable one which is lts.
📊 Benchmark resultsComparing with c133956 Package size: 259 MB⬆️ 0.00% increase vs. c133956
Legend
|
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.
LGTM! Awesome work :)
Summary
Fixes #5323
It removes the shrinkwrap from the repo and instead uses the normal package-lock.
On publish we create the shrinkwrap, but only for prod dependencies.
Also split up the workflow into 2 jobs so we do not have to repeat the
if: ${{ steps.release.outputs.release_created }}
for every single step.