-
Notifications
You must be signed in to change notification settings - Fork 11
feat: verify package-lock.json
UTD (up to date) & audited
#4598
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
base: main
Are you sure you want to change the base?
Conversation
This reverts commit eeeea2d.
This reverts commit cd63f49.
This reverts commit 52c9f51.
This reverts commit ae9a456.
This reverts commit 3e6295f.
This reverts commit 024e42e.
This reverts commit a8fd3d4.
This reverts commit b990c9f.
This reverts commit 8d59270.
This reverts commit 21dfc4e.
This reverts commit c8e1a6a.
This reverts commit 921422d.
I think this isn't a good solution. The package you used just uses Anyways I don't see the problem with Instead of adding this we should consider solving #3372 and move to pnpm. A lot of current problems would be solved with pnpm |
I agree with the idea of removing the package, but I also like the idea of an additional check before pushing. We had some more |
Pull request was converted to draft
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.
Pull Request Overview
This PR adds verification to ensure package-lock.json
files are up-to-date before pushing changes to prevent out-of-date lock files from being committed. The implementation adds both pre-push and pre-commit hooks to detect and handle package manager file changes.
- Adds a pre-push hook that detects changes to package manager files and automatically runs install commands to verify lock files are current
- Adds a lint-staged rule to run
npm audit fix
on package-lock.json changes during pre-commit - Supports both npm and pnpm package managers with automatic detection based on lock file presence
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
.husky/pre-push | New pre-push hook script that detects package manager files and runs install commands to verify lock files are up-to-date |
.config/.lintstagedrc.js | Adds npm audit fix rule for package-lock.json files during pre-commit |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
package-lock.json
UTD (up to date)package-lock.json
UTD (up to date) & audited
Proposed changes
From time to time we experience out of date
package-lock.json
files. To prevent that those are resulting out of our local development (as they are unlikely based on dependabot updates), we should enforce that those are quickly checked ingit push
lifecycle phase.Additionally running
npm audit fix
would ensure that some of the easy dependency fixes would get adapted directly.Types of changes
Further comments