2

When trying to set the version of all work-spaces I have found that only the root workspace change is committed. Steps to reproduce using Angular CLI:

  1. ng new test-workspace --create-application false
  2. cd test-workspace
  3. ng generate application test-app
  4. git add --all
  5. git commit -m "Application"
  6. ng generate library test-lib
  7. git add --all
  8. git commit -m "Library"
  9. Change root-level package.json to include:
    "workspaces": [
      "projects/test-lib"
    ]
    
  10. git add --all
  11. git commit -m "Workspaces"
  12. npm version --workspaces --include-workspace-root true --workspaces-update false 0.0.2

After the final step test-lib/package.json has been changed to the new version but has not been commited.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
D-Dᴙum
  • 7,689
  • 8
  • 58
  • 97
  • 2
    I found the same thing, and wrote https://github.com/textbook/fauxauth/blob/e0beec759973f162ae398f7622ff6d9bab913c4c/bin/version.sh. I think this is because it's built around the idea that different packages in the workspace will change versions at different rates, but you can only have one git tag for a given version, so it doesn't make sense to try to commit and tag those changes. – jonrsharpe Jun 29 '22 at 21:13
  • Yes, I suppose that makes sense if using anything other than providing an explicit version to `npm version` and to all workspaces? – D-Dᴙum Jun 29 '22 at 21:39

0 Answers0