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

Update workspace versions when running bolt add on an existing dependency in the project root #251

Merged
merged 2 commits into from
Oct 2, 2019

Conversation

Blasz
Copy link
Collaborator

@Blasz Blasz commented Oct 1, 2019

We updated the bolt add command in the last version to re-run yarn add when run from the project root to allow installing new versions of an existing dependency without needing to run bolt upgrade which behaves differently (it recursively upgrades transitive deps).

As part of this work, we forgot to also update the versions of the dependency being added in each workspace in the repo. Resulting in version mismatch errors on subsequent runs of bolt until workspace versions were manually updated.

@@ -148,6 +148,10 @@ describe('utils/addDependenciesToPackages', () => {
let packages = await project.getPackages();
let fooPkg = project.getPackageByName(packages, 'foo');
let barPkg = project.getPackageByName(packages, 'bar');
if (!fooPkg || !barPkg) {
// This check is required to satisfy flow
throw new Error('missing packages');
Copy link
Member

Choose a reason for hiding this comment

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

Could we make this more descriptive? I know you should never see it anyway, but could we add that context to the message?

Edit: discussed, not really a massive issue.

@lukebatchelor lukebatchelor merged commit 02db160 into boltpkg:master Oct 2, 2019
@lukebatchelor
Copy link
Member

Released in 0.24.3

@Blasz Blasz deleted the add-upgrade-workspace-versions branch October 3, 2019 02:16
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.

3 participants