-
Notifications
You must be signed in to change notification settings - Fork 507
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
Add linked option/lockstep #27
Conversation
@@ -0,0 +1,88 @@ | |||
/* | |||
Hey, welcome to the changeset config! This file has been generated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds like you didn't want this config file from the replacement readme text?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or was that from a different fixture?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, the readme text is wrong, I just copied this fixture from another one and updated the part of the config I needed to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Just had one question about double-iteration.
@@ -0,0 +1,88 @@ | |||
/* | |||
Hey, welcome to the changeset config! This file has been generated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or was that from a different fixture?
for (let linkedPackages of allLinkedPackages) { | ||
let highestVersion; | ||
for (let linkedPackage of linkedPackages) { | ||
let version = currentVersions.get(linkedPackage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use 'let' again in our code. I could cry. In sadness. About having obeyed bad lint rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a support group for people who have been affected by prefer-const
eslint rule.
Closes #7
I think we ended up deciding on calling the option
linked
, not sure if I'm remembering correctly though.The behavior here is that nothing changes for adding changesets. You still write changesets for individual packages. During bumping, for each set of linked packages, it'll find the highest bump type and the highest current version of all the packages in the set and and set the new version for all the packages in the set that are being released to highest current version + highest bump type.
An example
I have three packages,
pkg-a
,pkg-b
andpkg-c
.pkg-a
andpkg-b
are linked butpkg-c
is not so the config looks like this.pkg-a
is at1.0.0
pkg-b
is at1.0.0
pkg-c
is at1.0.0
I have a changeset with a patch for
pkg-a
, minor forpkg-b
and major forpkg-c
and I do a release, the resulting versions will be:pkg-a
is at1.1.0
pkg-b
is at1.1.0
pkg-c
is at2.0.0
I now have another changeset with a minor for
pkg-a
and I do a release, the resulting versions will be:pkg-a
is at1.2.0
pkg-b
is at1.1.0
pkg-c
is at2.0.0
I now have another changeset with a minor for
pkg-b
and I do a release, the resulting versions will be:pkg-a
is at1.2.0
pkg-b
is at1.3.0
pkg-c
is at2.0.0
I now have another changeset with patches for all three packages and I do a release, the resulting versions will be:
pkg-a
is at1.3.1
pkg-b
is at1.3.1
pkg-c
is at2.0.1
I'm pretty sure this example shows all the cases for lockstep and it's the behavior I'm pretty sure I want for emotion.