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

[BUG] npm --workspace [w] version [v] doesn't update root level package-lock #3756

Closed
1 task done
MustafaHaddara opened this issue Sep 14, 2021 · 1 comment
Closed
1 task done
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@MustafaHaddara
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I have a project using NPM 7 workspaces. One package is named button.

If I run npm -w button version minor, then the version number in button's package.json gets incremented as I would expect. However, the root-level package-lock.json does not get modified.

If I later run an npm -w button install then the value in packages.button.version gets updated to reflect the current version.

Expected Behavior

I would expect the value at packages.button.version in the root-level package-lock.json file to get updated at the same time as button's package.json, when the npm version command is run.

Steps To Reproduce

  1. Set up a project with one package, run npm --workspaces install to generate basic package-lock.json
  2. Run npm -w [package name] version minor
  3. See that the package's package.json has been updated but the root level package-lock.json has not
  4. Run npm -w [package name] install
  5. See that the root level package-lock.json has one change in it: the sub-package's version number.

Environment

  • OS: macOS 11.5.2
  • Node: 16.7.0
  • npm: 7.20.3
@ruyadorno
Copy link
Contributor

ruyadorno commented Jan 25, 2022

Closing: this looks to be similar if not a duplicate of an existing issue, #3403. If you believe your instance is unique, please provide further clarifying details.

@ruyadorno ruyadorno removed the Needs Triage needs review for next steps label Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants