-
Notifications
You must be signed in to change notification settings - Fork 374
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
chore: fix Husky #4041
chore: fix Husky #4041
Conversation
29a9d8b
to
a2fc602
Compare
a2fc602
to
a027952
Compare
📊 Benchmark resultsComparing with ed62e19 Package size: 448 MB⬆️ 20.88% increase vs. ed62e19
Legend
|
@@ -20,7 +20,7 @@ jobs: | |||
cache-dependency-path: 'npm-shrinkwrap.json' | |||
check-latest: true | |||
- name: Install dependencies | |||
run: npm install --production --no-audit | |||
run: npm ci --no-audit |
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.
husky
is now an indirect dependency (through @netlify/eslint-config-node
) instead of being direct.
Binaries of indirect dependencies are symlinked by npm
to the top-level node_modules/.bin/
thanks to deduping. However, this seems to only work without the --production
flag.
Also, this is more consistent with the other GitHub actions which all use npm ci --no-audit
. Please note this is only for the GitHub action which computes the package size.
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.
Doesn't this give the wrong result now, though? It now includes devDependencies :/
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.
Oh right!
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.
@ehmicky How about doing npm prune --prod
after npm ci
? It's not ideal but it should be close to what it was before :)
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.
Done in #4066
@ehmicky this breaks production installs which probably is the same reason 8.9.0 release failed :/ I tried to install the latest main version from GitHub and it fails with the same error as the release action:
Maybe it's time to reconsider reverting the husky update after all? It's been just a pain in the butt :/ |
The PR is merged now, which should fix the problem. 👍 |
I don't think that's the reason, unfortunately :/ In production you do |
You could probably try |
Great catch again! So, at the moment, I am wondering whether we could just remove those PR at #4049 |
You could probably remove them, but there must be some reason they exist. Could be they were needed in the past or something. Or they were added as a precaution measure so that the lock file is as small as possible. |
See netlify/js-client#659
This fixes how we use Husky with its latest version.
For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.