Skip to content

v1.1.4

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Jul 21:55
8d1dac7

🪲 [Fix]: Version previews reflect the version-bump label regardless of release type (#9)

Version-bump labels (major, minor, patch) are now always evaluated when resolving a module version, so the version a run reports always matches what those labels would produce. Previously, on pull_request events (ReleaseType = None) the resolver ignored the labels and always previewed a patch prerelease, which made pull request previews misleading. ReleaseType — and the prerelease label that drives it — now only controls whether and how a version is published, never the size of the version increment.

Fixed: Pull request previews now reflect the version-bump label

The resolved version on a non-publishing run now reflects the bump label instead of always showing a patch. Publishing behavior is unchanged — only the previewed version changes for label combinations that were previously never evaluated.

Situation Before After
Open PR, minor label, no prerelease label x.y.z+1 patch preview x.(y+1).0 minor preview (still not published)
Open PR, major label, no prerelease label x.y.z+1 patch preview (x+1).0.0 major preview (still not published)
PR with prerelease label publishes a prerelease unchanged — prerelease still gates publishing
Merge to main with minor label minor release unchanged

Technical Details

  • scripts/Resolve-PSModuleVersion.Helpers.psm1 (Resolve-ReleaseDecision): the major/minor/patch label evaluation was moved out from behind the if ($shouldPublish) guard so it always runs. When no bump label is present and AutoPatching is disabled, the run still previews a patch version but sets ShouldPublish = $false. Any run that is not a published full release continues to be surfaced as a prerelease (CreatePrerelease = $true).
  • tests/Resolve-PSModuleVersion.Helpers.Tests.Data.psd1: added ReleaseDecision and EndToEnd cases for None + minor and None + major previews. All existing ReleaseDecision, EndToEnd, and NextModuleVersion cases are unchanged.
  • Validation: 157/157 Pester tests pass; PSScriptAnalyzer clean.
  • E2E: MariusStorhaug/MariusTestModule PR #34 (labelled Minor, no prerelease label) now previews v0.5.0-teste2eimporttestdata001 with ShouldPublish = False (previously v0.4.2-…).
  • Relates to PSModule/Process-PSModule#378.