Skip to content
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

Merged
merged 2 commits into from
Jan 11, 2023
Merged

fix: publish shrinkwrap with prod dependencies only #5359

merged 2 commits into from
Jan 11, 2023

Conversation

danez
Copy link
Contributor

@danez danez commented Jan 11, 2023

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.

@@ -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/",
Copy link
Contributor Author

@danez danez Jan 11, 2023

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
Copy link
Contributor Author

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.

@github-actions
Copy link

github-actions bot commented Jan 11, 2023

📊 Benchmark results

Comparing with c133956

Package size: 259 MB

⬆️ 0.00% increase vs. c133956

^  259 MB  259 MB  259 MB  259 MB  259 MB  259 MB  259 MB  259 MB  259 MB  259 MB  259 MB  259 MB  259 MB 
│   ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-12    T-11    T-10    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

Copy link
Collaborator

@lukasholzer lukasholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Awesome work :)

@danez danez added the automerge Add to Kodiak auto merge queue label Jan 11, 2023
@kodiakhq kodiakhq bot merged commit 65f77d9 into main Jan 11, 2023
@kodiakhq kodiakhq bot deleted the publish branch January 11, 2023 15:47
danez added a commit that referenced this pull request Jan 11, 2023
danez added a commit that referenced this pull request Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Add to Kodiak auto merge queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EBADPLATFORM from npm ci when running on netlify with >= 12.2.9
2 participants