-
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] Wrong behaviour of npm version
inside workspaces
#4017
Comments
Waiting for that to be fixed, for now as a work around i'm using: |
Until we have a solution for git tagging of workspace version bumps this will always have to be at least two commands. The core issue here is that If we come up with a git tagging strategy for workspaces this problem will be also fixed, as each workspace's version will get its own git commit, with an appropriate tag. Until then you need to isolate the versioning of the root workspace with its versions. If anyone has a solution for git tagging workspaces they feel would work, please sumbit an rfc so the rest of the npm community can approve it. |
Seems pretty straightforward - add |
You can work around this in one commit. Add this scrip to your package.json at the root: |
…p all packages atomically. Uses a workaround for an npm limitation found at: npm/cli#4017 (comment)
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
After running
npm version patch -m "chore: release %s " --workspaces --include-workspace-root
command in monorepo, npm doesn't add inner packages.json files into a generated commit. Thus, version commit only contains changes from the root package.json, updated package.json insideworkspace-a
andworkspace-b
haven’t been added to version commit by npm.Expected Behavior
Version commit should contain changes that were made by
npm version patch -m "chore: release %s " --workspaces --include-workspace-root
command in monorepo.Steps To Reproduce
workspace-a
folder.workspace-b
folder.npm version patch -m "chore: release %s " --workspaces --include-workspace-root
in root folderEnvironment
The text was updated successfully, but these errors were encountered: