-
Notifications
You must be signed in to change notification settings - Fork 66
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
build: ignore npm scripts when installing dependencies in dependent analyzer workflow #3013
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
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 will skip running
npm prepare
which is run duringnpm ci
by default.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.
The proposed fix here makes sense to me, though I'm wondering if you also considered exploring the recommendation in the
husky
documentation here:Similar sanity-check type question: the
prepare
script inpackage.json
includeshusky install
, which seems to differ a bit from just thehusky
command from their docs above. I do see we have v8 ofhusky
installed when v9 is latest so maybe this bit is due to the version discrepancy? 🤔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.
Hmm, I haven't seen that part in their documentation, let me try that as well. And I didn't notice we are behind the latest version as well 😅 . (Thanks for the quick review!)
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.
I personally would like to see us just completely remove husky. I'm not a fan of git hooks - I find they get in the way when I just want to push something WIP up real quick (I know I can use
git push --no-verify
but still), and in general they slow down pushes. I also see them as redundant in our case considering the checks we have in CI.That's definitely a conversation that is out of scope for this PR though, so if
husky || true
works I sayThere 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.
OK, it worked, I updated husky to v9 as well (the steps to do that were pretty easy). It does log a small error
husky: command not found
now whenever you try to install dependencies in dependent-usage-analyzer directory, but I think it should be ok (they have a fix for that as well in docs, but it only works in CI environments, e.g. github actions. And it crashes if you install deps locally, but that's because we use workspaces I think...)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.
Yeah, I'm not a big fan of husky as well haha, feels like it causes more trouble than helps us
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.
Personally, I agree as well! I tend to use --no-verify out of habit in husky enabled repos lol.