Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
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
- Setup a new npm workspace
- Create
/packages/packagea
:
{
"name": "packagea",
"version": "2.0.0-dev"
}
- Create ``/packages/packageb`:
{
"name": "packageb",
"version": "2.0.0-dev",
"dependencies": {
"packagea": "2.0.0-dev"
}
}
- Run
npm --no-git-tag-version --workspaces version "2.0.0-alpha1"
- notice the package versions are updated but the dependencies are not.
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:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @exceptionless/core@2.0.0-dev.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
Environment
- OS: Windows 10 latest
- Node: v16.1.0
- npm: 7.17.0