Affected Packages
@changesets/cli
Maybe @changesets/assemble-release-plan @changesets/read
Noticed the result of assembleReleasePlan() always hold the full set of pre mode changesets.
Problem
Say we have two packages, @foo/a and @foo/b. Changesets is already in pre mode.
In pre.json:
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@foo/a": "1.0.0-beta.1",
"@foo/b": "1.0.0-beta.1"
},
"changesets": []
}
Now we have a changeset fifty-balloons-taste.md with the content:
---
"@foo/a": minor
---
Some update
And run:
changeset version --ignore @foo/a
Then fifty-balloons-taste.md will be added to the changesets field in pre.json.
If we commit the change then run changeset version, the changeset of @foo/a takes no effect and looks like it's lost.
However, in normal release mode, fifty-balloons-taste.md will not be removed after changeset version --ignore @foo/a; and if there's any changeset that includes the change of @foo/b, only that one will be removed and @foo/b will have version bump accordingly.
What happened in normal release mode is the desired behavior.
Proposed solution
Align pre mode's behavior with normal mode.
Additional context
We're trying to separate our packages into two groups and publish separately, since they may have different publish frequencies.
Affected Packages
@changesets/cliMaybe
@changesets/assemble-release-plan@changesets/readNoticed the result of assembleReleasePlan() always hold the full set of pre mode changesets.
Problem
Say we have two packages,
@foo/aand@foo/b. Changesets is already inpremode.In
pre.json:{ "mode": "pre", "tag": "beta", "initialVersions": { "@foo/a": "1.0.0-beta.1", "@foo/b": "1.0.0-beta.1" }, "changesets": [] }Now we have a changeset
fifty-balloons-taste.mdwith the content:And run:
Then
fifty-balloons-taste.mdwill be added to thechangesetsfield inpre.json.If we commit the change then run
changeset version, the changeset of@foo/atakes no effect and looks like it's lost.However, in normal release mode,
fifty-balloons-taste.mdwill not be removed afterchangeset version --ignore @foo/a; and if there's any changeset that includes the change of@foo/b, only that one will be removed and@foo/bwill have version bump accordingly.What happened in normal release mode is the desired behavior.
Proposed solution
Align pre mode's behavior with normal mode.
Additional context
We're trying to separate our packages into two groups and publish separately, since they may have different publish frequencies.