-
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 --workspaces version doesn't update dependencies #3403
Labels
Bug
thing that needs fixing
Priority 1
high priority issue
Release 7.x
work is associated with a specific npm 7 release
Comments
niemyjski
added
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 7.x
work is associated with a specific npm 7 release
labels
Jun 11, 2021
niemyjski
added a commit
to exceptionless/Exceptionless.JavaScript
that referenced
this issue
Jun 14, 2021
niemyjski
added a commit
to exceptionless/Exceptionless.JavaScript
that referenced
this issue
Jun 22, 2021
1 task
1 task
ruyadorno
added
Priority 1
high priority issue
and removed
Needs Triage
needs review for next steps
labels
Jan 24, 2022
1 task
This was referenced Mar 16, 2022
ruyadorno
added a commit
to ruyadorno/cli
that referenced
this issue
Mar 17, 2022
When declaring dependencies to workspaces the common practice is to refer to their version numbers, currently the cli adds a link reference instead of the proper semver range when trying to install/declare as a direct direct dependency one of its own workspaces. This change fixes it by adding a new condition for handling workspace edges when saving the current ideal tree. Relates to: npm#3403
ruyadorno
added a commit
to ruyadorno/cli
that referenced
this issue
Mar 17, 2022
When declaring dependencies to workspaces the common practice is to refer to their version numbers, currently the cli adds a link reference instead of the proper semver range when trying to install/declare as a direct direct dependency one of its own workspaces. This change fixes it by adding a new condition for handling workspace edges when saving the current ideal tree. Relates to: npm#3403
nlf
pushed a commit
that referenced
this issue
Mar 17, 2022
When declaring dependencies to workspaces the common practice is to refer to their version numbers, currently the cli adds a link reference instead of the proper semver range when trying to install/declare as a direct direct dependency one of its own workspaces. This change fixes it by adding a new condition for handling workspace edges when saving the current ideal tree. Relates to: #3403
ruyadorno
added a commit
to ruyadorno/cli
that referenced
this issue
Mar 17, 2022
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
ruyadorno
added a commit
to ruyadorno/cli
that referenced
this issue
Mar 17, 2022
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
ruyadorno
added a commit
to ruyadorno/cli
that referenced
this issue
Mar 21, 2022
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
fritzy
pushed a commit
that referenced
this issue
Mar 24, 2022
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
I came across this issue as well so wrote a script to fix it: just add:
to your root package.json scripts to update all child package json versions, update depenendency versions of siblings and add modified files to git (that's the |
8 tasks
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
thing that needs fixing
Priority 1
high priority issue
Release 7.x
work is associated with a specific npm 7 release
Is there an existing issue for this?
Current Behavior
The
npm --no-git-tag-version --workspaces version <version>
command doesn't update package devDependencies or dependencies with the new version. I'd expect that workspace dependencies would be updated to match the new versions that were set.Expected Behavior
npm --no-git-tag-version --workspaces version "2.0.0-alpha1" should update all workspace package versions (currently does) and also update the package dependency versions
Steps To Reproduce
/packages/packagea
:npm --no-git-tag-version --workspaces version "2.0.0-alpha1"
I have an existing setup located here: https://github.com/exceptionless/Exceptionless.JavaScript/tree/feature/workspaces that reproduces it (but package names are changed...)
I noticed this after getting the following error:
Environment
The text was updated successfully, but these errors were encountered: