Skip to content
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

Regenerate package-lock #7417

Open
3 tasks done
mtrezza opened this issue Jun 5, 2021 · 3 comments
Open
3 tasks done

Regenerate package-lock #7417

mtrezza opened this issue Jun 5, 2021 · 3 comments
Labels
type:meta Non-code issue

Comments

@mtrezza
Copy link
Member

mtrezza commented Jun 5, 2021

New Feature / Enhancement Checklist

Current Limitation

It is currently undefined if and when package-lock.json should be completely regenerated.

The current approach seems to allow (partial) updates when:

  • snyk updates
  • a PR requires un-/install of a dependency

The limitations of that seem to be:

  • snyk only updates for security vulnerabilities
  • a PR requiring un-/install of a dependency comes along at irregular points in time and - if I'm not mistaken - does not regenerate the whole file.

The effect seem to be that sub-dependencies of packages that use range operators do not get updated. This is especially true for packages with low release frequency.

From a package deployment perspective, package-lock.json should be touched with care as it ensures a consistent dependency tree across deployments. However, from a package development perspective, regularly rebuilding package-lock.json seems a necessity due to the common use of range operators in dependencies.

Suggestion

Regularly completely regenerate package-lock.json in a dedicated PR. Possibly automated.

@mtrezza
Copy link
Member Author

mtrezza commented Jun 30, 2021

@dplewis @davimacedo What's your take on this?

@davimacedo
Copy link
Member

We use to manually update it every time we create a new release. Maybe we could add this step to the ci process. Updating it at each release would be probably enough, right?

@mtrezza
Copy link
Member Author

mtrezza commented Jun 30, 2021

Yes, I think so. Adding to the CI is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:meta Non-code issue
Projects
None yet
Development

No branches or pull requests

2 participants