Skip to content
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

docs: Add section on workspace version bumps #8019

Open
wants to merge 3 commits into
base: latest
Choose a base branch
from

Conversation

kchindam-infy
Copy link

This PR enhances the npm version documentation by adding a dedicated section, "Version Bumps with Workspaces", to clarify the behavior of npm version -ws in the context of inter-workspace dependencies. The new section provides detailed explanations and examples to address common questions about how workspace dependency updates are handled.

References

Related to #4578

@kchindam-infy kchindam-infy marked this pull request as ready for review January 10, 2025 17:41
@kchindam-infy kchindam-infy requested a review from a team as a code owner January 10, 2025 17:41
#### Note on `--save`
By default, `npm version -ws` will bump the versions in each workspace without automatically
updating dependency references across workspaces. Including the `--save` flag triggers a
minimal reify operation that updates references **if** your semver range allows it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minima reify operation is more info that folks probably want or need here. We just need to document what it does, not how.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the "minima reify operation" and any mention of the internal npm mechanics

you must broaden the range (e.g., `">=1.0.0 <3.0.0"`, `"^1.0.0 || ^2.0.0"`, etc.) or
manually update it to allow a major bump.

It's important to note, Reify takes place even without the `--save` flag. However, in that case,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this last paragraph.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the last paragraph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants