-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 version
with workspace will not write new data back to package-lock.json
#4193
Comments
Closing as a duplicate of #3403 |
My solution: move to using pnpm |
Adds a minimalistic reify step that updates the installed tree after a version change within one of the configured workspaces when using any of the workspaces config options. It's also possible to use the `--save` config option in order to auto update semver ranges of dependencies declarations accross dependent `package.json` files. Fixes: npm#3403 Relates to: npm/rfcs#556 Relates to: npm#3757 Relates to: npm#4193
Adds a minimalistic reify step that updates the installed tree after a version change within one of the configured workspaces when using any of the workspaces config options. It's also possible to use the `--save` config option in order to auto update semver ranges of dependencies declarations accross dependent `package.json` files. Fixes: npm#3403 Relates to: npm/rfcs#556 Relates to: npm#3757 Relates to: npm#4193
Adds a minimalistic reify step that updates the installed tree after a version change within one of the configured workspaces when using any of the workspaces config options. It's also possible to use the `--save` config option in order to auto update semver ranges of dependencies declarations accross dependent `package.json` files. Fixes: npm#3403 Relates to: npm/rfcs#556 Relates to: npm#3757 Relates to: npm#4193
Adds a minimalistic reify step that updates the installed tree after a version change within one of the configured workspaces when using any of the workspaces config options. It's also possible to use the `--save` config option in order to auto update semver ranges of dependencies declarations accross dependent `package.json` files. Fixes: #3403 Relates to: npm/rfcs#556 Relates to: #3757 Relates to: #4193
@wraithgar @fritzy please can this be re-opened? I don't think it is a duplicate of #3403. The bug here is that running |
~/D/n/s/ws (main|✔) $ npm version minor -w workspace-a
workspace-a
v1.1.0
added 2 packages in 469ms
~/D/n/s/ws (main|✚2) $ git diff package-lock.json
diff --git a/package-lock.json b/package-lock.json
index 119a66b..08a7625 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -32,7 +32,7 @@
"link": true
},
"workspace-a": {
- "version": "1.0.0",
+ "version": "1.1.0", It does though? |
Sorry, I forgot to try it out on the latest npm, it does indeed work. We're currently on 8.5.5 where it does not. We will update. Thanks. |
this doesn't seem to work if my packages are not published to registry. It throws error 404 not in registry. There is already a bug reported for this #3940 |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm version
for workspaces with-w <workspace>
argspackage.json
but not change lockfileExpected Behavior
run
npm version -w <workspace>
need adjust new version of workspace package inpackage-lock.json
As it said in npm cli docs:
Steps To Reproduce
npm version
for workspaces with-w <workspace>
argspackage.json
but not change lockfilenpm install
lockfile
changedEnvironment
The text was updated successfully, but these errors were encountered: