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

Request to remove "package-lock.json" to allow consumers to install the latest security fixes for all transitive dependencies based on semvers defined in "package.json" #273

Closed
mpawlow opened this issue May 16, 2024 · 1 comment

Comments

@mpawlow
Copy link

mpawlow commented May 16, 2024

Overview

  • The package-lock.json is locking down library versions for all transitive (child) dependencies in the hierarchy
  • Problem: This prevents the consuming service that is installing this library to automatically pick-up the latest security fixes based on the semvers defined in package.json and all child dependencies
    • e.g. We typically run npm update to pull in the latest library versions
    • Also, it defeats the npm tree-shaking mechanism to consolidate duplicate library versions into single version based on semver restrictions
  • Note: Including package-lock.json at the library level doesn't seem to be an industry standard or best practice based on the most popular Node libraries in the ecosystem
  • From a DevOps perspective, only top level services that include these libraries should define a package-lock.json when deploying the app to different environments (DEV, QA, PROD)
  • Solution: The request is to simply remove and do not generate the package-lock.json file

Related Issues (regarding packaging)

@mpawlow mpawlow changed the title Request to remove the "package-lock.json" to allow consumers to install the latest security fixes based on semvers defined in "package.json" and transitive dependencies Request to remove "package-lock.json" to allow consumers to install the latest security fixes for all transitive dependencies based on semvers defined in "package.json" May 16, 2024
@mpawlow
Copy link
Author

mpawlow commented May 16, 2024

Confirmed that the library is published without the package-lock.json file (in the node_modules directory)

image

Closing as Invalid

@mpawlow mpawlow closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant