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

feat: the update command should update to compatible versions by default #7809

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

zkochan
Copy link
Member

@zkochan zkochan commented Aug 20, 2023

Proposed Changes

  • bit update updates dependencies to their highest compatible versions by default.
    • If the dependency originates from the policy (specified via workspace.jsonc), then bit update will select the highest version that satisfies the existing version range. For instance, if "foo": "^1.0.0" is in workspace.jsonc and the latest version of foo is 2.0.0, then bit update will not update foo. However, if version 1.1.0 of foo is available in the registry, then bit update will update foo to 1.1.0 and the range will be modified to ^1.1.0.
    • If the dependency is from a component's model, the behaviour is similar, but in this case, even exact versions will be updated to newer compatible versions. For example, if a component model lists 1.0.0 as a dependency, it will be updated to 1.1.0. However, it won't be updated to 2.0.0.
  • To update to the absolute latest version, irrespective of semver, you can use the --latest flag with the update command: bit update --latest.

| 'component'
// these are dependencies from the dependencies policy in "workspace.jsonc"
| 'rootPolicy'
// the are dependencies of imported components
Copy link
Member

Choose a reason for hiding this comment

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

the -> these

Copy link
Member

Choose a reason for hiding this comment

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

Also I'm not sure this definition is accurate

@zkochan zkochan changed the title feat: add compatible flag to the update command feat: the update command should update to compatible versions by default Sep 26, 2023
@GiladShoham GiladShoham merged commit ddb346e into master Sep 27, 2023
@GiladShoham GiladShoham deleted the update-compatible branch September 27, 2023 08:04
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