-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Drop package-lock.json
#6179
Drop package-lock.json
#6179
Conversation
fbe51e6
to
f1d8d6d
Compare
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.
Two further changes are required before this can be merged:
- Remove line 7 of
.gitattributes
. - Remove the usage of
package-lock.json
from thebump-version.js
script. To test if the updated script works you can usenode ./scripts/release/bump-version.js v5.42.0
.
If we want to lock the npm version, we can specify Also my thoughts on deleting the lockfile: |
The PR now looks good if we decide to go with the no-package-lock approach 👍
That is an interesting suggestion as well. I tested it and it does work (after changing the incorrectly named "engine" field to "engines", oops 😅, ref. #6347). However, for this project I'm not quite sure if we really want to prevent people with
I still share this concern, but I don't expect this to be a big problem for use as we 1) don't have a lot of dependencies and 2) don't do anything fancy with them. For this reason I'm open to trailing the no An alternative to fix the problem we're having: we can add a pre-commit hook that reverts any changes to |
Unfortunately, I think you're right as many contributors here are new.
I think you're right, so I'm alright with experimenting with removing it.
This would be better handled in CI anyway (looks like we are correctly using |
Cool, in that case I think we can move ahead. @LitoMore can you resolve the conflicts for us?
That is a fair point, but again we don't have a lot of dependencies so I don't think our gains are big here. Not to mention the fact that it takes way more time to comment on unwanted changes and reverting said changes.
If we don't have a lockfile you do get those benefits, whereas now you don't because you can't run
I disagree. The CI can only check if a change was made to the lockfile that shouldn't be there, not revert it (at least for PRs from forks, this is difficult). I'm talking about reverting changes to the lockfile (such as upgrading to v2 or downgrading to v1) in a precommit hook to prevent the change from showing up in any commit. If we use husky for this, pretty much everyone who runs |
I was thinking that reviewers would see that CI failed and understand the issue, but I get that a precommit hook is friendlier to new contributors and just easier for everyone overall. I think this is ok to merge then. |
Just for curiosity: how renovate security updates are handled after this? Are just ignored? Additionally, if we do this, we must remove this part of the renovate configuration? |
I'm not 100% and my idea was to just merge this in an see how it goes, if we encounter problems we bring back What I'm pretty sure about is that Renovate will (should) no longer address "deep" dependencies (i.e. dependencies of our dependencies). This isn't of much concern because:
Good point. I don't think we must remove it, but we should as it is no longer relevant. @LitoMore can you take care of that? |
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.
Awesome, with 3 more-or-less approvals let's give this change a try 👍
Thank you very much for sticking with us through the discussion @LitoMore 🎊
Accidentally omitted from #6179
Accidentally omitted from #6179
Overview
pakcage-lock.json
renovate.json5
bump-version.js