-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Discussion] How do we handle package-lock changes? #1864
Comments
How about using fixed versions for the dependencies? This would require us to manually check for updates regularly tho. |
I use Dependabot to keep the dependencies up to date on other projects. Could help here. If we keep everything up to date, then we're unlikely to get PRs with lock changes in the first place. |
Fixed version plus regular updates won't work, unfortunately. |
What I meant was set the explicit version (up to the patch digit) on all our dependencies, without any prefix. This should seal the versions of the deps until we manually change them. Or am I missing something? |
Technically, tertiary dependencies aren't subject to the restriction you're suggesting, but the lock file should keep them in place. Which honestly, the lock file should keep everything in place, so I'm not entirely sure what the issue is here. |
Apparently there's been a change in the behavior, which would explain why it didn't happen before. https://stackoverflow.com/a/45566871 |
@Golmote that was my understanding of the intended behavior. It took some time for them to settle on it and get it right. If contributors are using the latest npm version, we shouldn't see lock file changes. We should, if we're not, use |
The reason why I think that the tertiary dependencies are updated even when using fixed versions is that in the package lock here none of our direct dependencies changed. |
The reason npm does this is because it produces a flat We could switch to pnpm, which uses symlinks, hardlinks and isolated trees and therefore only updates |
We hadn't had any PRs with Should this ever become relevant again, we can reopen this or open a new issue. |
In #1862 it came up that the package-lock changed even though
package.json
didn't.After a minute of googling, I found this. Basically:
npm install
will rewritepackage-lock.json
if newer versions of dependencies (matching the version pattern) are available.This means that PR will modify the package-lock every time one of Prism's dependencies releases a new minor version.
So how do we want to handle this?
package-lock.json
into PRs.npm ci
instead ofnpm install
.@LeaVerou @mAAdhaTTah @Golmote
This only concerns the case where
package-lock.json
changes without changes topackage.json
.The text was updated successfully, but these errors were encountered: