Skip to content

Keep prerelease id when applying deferred version bumps - #7277

Open
Hashim1999164 wants to merge 2 commits into
yarnpkg:masterfrom
Hashim1999164:fix/version-apply-prerelease
Open

Hashim1999164 wants to merge 2 commits into
yarnpkg:masterfrom
Hashim1999164:fix/version-apply-prerelease

Conversation

@Hashim1999164

Copy link
Copy Markdown

Fixes #7275

After the 4.18 version rewrite, yarn version apply --prerelease=alpha.0 bumped the deferred patch but dropped the prerelease suffix and never wrote stableVersion.

Regular strategies (major / minor / patch) now run the prerelease pattern through applyPrerelease, same as before. Prerelease bumps also keep stableVersion again, and deferred records stay in place when --prerelease is set so the next stable apply can still consume them.

Test plan

  • yarn test:unit packages/plugin-version/sources/versionUtils.test.ts
  • unit coverage for patch/minor/major plus a prerelease pattern

Fixes yarn version apply dropping the prerelease id after the 4.18 rewrite, and keeps stableVersion while on a prerelease.
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.

# [Bug?]: yarn version apply --prerelease=<id> drops the prerelease identifier in 4.18.0

1 participant