You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running npm version in npm > 7 there are 3 places to change the version now instead of the 2 in npm < 7 (this is related to lockfile v2) and lerna version only hits 2 of them
Expected Behavior
Run lerna version and the package.json version property gets updated, the package-lock.json version property gets updated, and the package-lock.json "packages".""."version" gets updated
Current Behavior
Only the package.json version property and the package-lock.json version property gets updated
Possible Solution
Use the --no-commit-hooks and --no-git-tag-version in conjunction with npm version to set the version for each package or adjust the existing version script to set the 3rd version property
Steps to Reproduce (for bugs)
create a lerna repo with 1 package using npm 7+
run lerna version to upgrade (any upgrade, doesn't matter)
check the package-lock file to see the 3rd version identifier not updated
You may or may not know that lerna is now under the stewardship of Nrwl (announcement here #3121), a company with a long history of not just producing valuable open-source software (OSS), but also backing others (at the time of writing, Nrwl has donated over $50,000 to OSS it hasn't created, see https://opencollective.com/nx for full details).
Quite simply, Nrwl ❤️ OSS, and is committed to making lerna the best it can be. We use it ourselves.
We hope you will continue to be a part of this community as we look to take things forward from here!
Please see #3140 for more details on our plans for 2022.
In the case of this specific issue, I'm please to say that a fix for it was just merged in #3091 and will go out in the next release of lerna.
When running
npm version
innpm > 7
there are 3 places to change the version now instead of the 2 innpm < 7
(this is related to lockfile v2) andlerna version
only hits 2 of themExpected Behavior
Run
lerna version
and the package.jsonversion
property gets updated, the package-lock.jsonversion
property gets updated, and the package-lock.json"packages".""."version"
gets updatedCurrent Behavior
Only the package.json
version
property and the package-lock.jsonversion
property gets updatedPossible Solution
Use the
--no-commit-hooks
and--no-git-tag-version
in conjunction withnpm version
to set the version for each package or adjust the existing version script to set the 3rd version propertySteps to Reproduce (for bugs)
lerna.json
Context
I have to go in and update this 3rd version prop after each version and then manually delete and re-create the version tag
Your Environment
lerna --version
npm --version
node --version
The text was updated successfully, but these errors were encountered: