Skip to content

Commit 26e338a

Browse files
committed
feat(#146): implement major-zero behavior for Nova version bumps
- Maintain breaking-change bumps on the 0.y.z line for stable versions. - Plan the next minor version instead of jumping to 1.0.0. - Print guidance for manually setting 1.0.0 once the software is stable.
1 parent c978ff3 commit 26e338a

16 files changed

Lines changed: 455 additions & 91 deletions

CHANGELOG.md

Lines changed: 32 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
# Changelog
22

3-
All notable changes to this project will be documented in this file and **PreReleased/UNRELEASED** changes will be
4-
included in the
5-
next **stable** release!
3+
All notable changes to this project will be documented in this file and **PREVIEW / UNRELEASED** changes will be
4+
included in the next **stable** release!
65

76
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
87
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
98

109
## [Unreleased]
11-
1210
### Added
1311

14-
### Fixed
15-
1612
### Changed
1713

18-
### Documentation
14+
- Keep stable `Update-NovaModuleVersion` / `% nova bump` releases on the SemVer major-zero development line.
15+
- When the current stable version is `0.y.z` and commit history implies a breaking change, Nova now plans the next
16+
minor version instead of auto-jumping to `1.0.0`.
17+
- The bump result still reports the detected `Major` label and now prints guidance about manually setting `1.0.0`
18+
once the software is stable.
19+
- `-Preview` behavior is unchanged.
20+
21+
### Deprecated
1922

2023
### Removed
2124

22-
## [2.1.0] - 2026-04-29
25+
### Fixed
2326

24-
### Added
27+
### Security
2528

29+
## [2.1.0] - 2026-04-29
30+
### Added
2631
- Add `Install-NovaCli` and a packaged `nova` launcher so macOS and Linux users can install and run `nova` directly
2732
from zsh or bash.
2833
- `nova` now remains the launcher-facing CLI surface, while `Invoke-NovaCli` stays the explicit PowerShell cmdlet
@@ -108,22 +113,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
108113
- `nova bump --what-if` and `% run.ps1` now surface a predictable summary for previous version, new version, label,
109114
and commit count.
110115

111-
### Fixed
112-
113-
- Fix unsupported `nova` help invocations so they now return Nova's structured CLI validation error instead of a
114-
PowerShell parameter-binding failure.
115-
- Keep manifest/package helper edge cases aligned with their intended behavior.
116-
- Manifest settings resolution now accepts ordered dictionary metadata shapes in addition to plain hashtables.
117-
- `New-NovaPackageArtifacts` now accepts an empty metadata list and returns an empty artifact result instead of
118-
failing during parameter binding.
119-
- Fix configuration and validation errors so empty `project.json` files and unsupported `Manifest` keys fail fast with
120-
clear messages.
121-
- Fix semantic-release PSGallery publishing on fresh CI runners by bootstrapping the PSResourceGet repository store
122-
before
123-
`Publish-PSResource` runs.
124-
125116
### Changed
126-
127117
- Change the project to a Nova command model, replacing the previous mixed MT/Nova workflow.
128118
- All public commands are now Nova commands, and the `nova` CLI / `Invoke-NovaCli` command surface is the primary
129119
entry point for all operations.
@@ -143,35 +133,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
143133
- Change `Publish-NovaModule -Local` and `% nova publish --local` so a successful local publish also reloads the
144134
published module from the local install path into the active PowerShell session.
145135

146-
### Documentation
147-
148-
- Split documentation into contributor-focused repository docs and task-oriented GitHub Pages user guides.
149-
- Expand the public site into a fuller developer end-user manual with rewritten getting started, core workflows, working
150-
with modules, troubleshooting, concepts, release notes, and license pages plus new reference-style pages for
151-
commands, `project.json`, packaging/delivery, and versioning/update behavior.
152-
- The guides now let readers switch between PowerShell and command-line examples, including the local-publish-plus-
153-
`pwsh` handoff for `Get-ExampleGreeting` and fresh-process `pwsh`
154-
- Clean the generated PowerShell cmdlet help so `Get-Help` pages no longer mix in `nova` launcher syntax or GNU-style
155-
CLI options.
156-
- Refresh public `Get-Help` content and examples for the Nova commands, including CLI usage and preview/confirmation
157-
scenarios.
158-
- Simplify `Invoke-NovaCli` help so it matches the launcher-vs-cmdlet split cleanly and PlatyPS can generate command
159-
help without failing during local builds.
160-
- Update the `nova` CLI documentation and help text to use POSIX/GNU-style long and short options while keeping
161-
PowerShell cmdlet examples in their native PowerShell form.
162-
163136
### Removed
164-
165137
- **BREAKING CHANGE**: Remove the legacy `MT` commands and MT-branded command documentation in favor of the Nova command
166138
model.
167139
- All public commands are now Nova commands, and the `nova` CLI / `Invoke-NovaCli` command surface is the primary
168140
entry point for all
169141
operations.
170142

171-
## [1.9.0] - 2026-04-10
143+
### Fixed
172144

173-
### Added
145+
- Fix unsupported `nova` help invocations so they now return Nova's structured CLI validation error instead of a
146+
PowerShell parameter-binding failure.
147+
- Keep manifest/package helper edge cases aligned with their intended behavior.
148+
- Manifest settings resolution now accepts ordered dictionary metadata shapes in addition to plain hashtables.
149+
- `New-NovaPackageArtifacts` now accepts an empty metadata list and returns an empty artifact result instead of
150+
failing during parameter binding.
151+
- Fix configuration and validation errors so empty `project.json` files and unsupported `Manifest` keys fail fast with
152+
clear messages.
153+
- Fix semantic-release PSGallery publishing on fresh CI runners by bootstrapping the PSResourceGet repository store
154+
before
155+
`Publish-PSResource` runs.
174156

157+
## [1.9.0] - 2026-04-10
158+
### Added
175159
- Nova command model and CLI entrypoint:
176160
- New root command: `nova`
177161
- New public commands: `Get-NovaProjectInfo`, `Invoke-NovaBuild`, `Invoke-NovaCli`, `Invoke-NovaRelease`,
@@ -182,21 +166,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
182166
- New GitHub workflow: PowerShell code quality (`.github/workflows/powershell.yml`).
183167

184168
### Changed
185-
186169
- Updated test workflow triggers in `.github/workflows/Tests.yml` to improve branch/PR coverage.
187170
- Updated README module naming references to `NovaModuleTools`.
188171
- Source alignment updates to match installed `NovaModuleTools` v`1.8.0` behavior for compatibility.
189172

190-
### Fixed
191-
192-
- Resource lookup compatibility in `Get-ResourceFilePath` for source/dist execution contexts.
173+
### Deprecated
193174

194-
### Documentation
175+
- `MT` commands and MT-branded command documentation in favor of the Nova command model.
195176

196-
- Added documentation and release notes context for the Nova command model and workflow/security updates.
177+
### Fixed
178+
- Resource lookup compatibility in `Get-ResourceFilePath` for source/dist execution contexts.
197179

198180
## [1.8.0] - 2026-04-08
199-
200181
### Added
201182
- Project settings:
202183
- `BuildRecursiveFolders` (default `true`): recursive discovery for `src/classes`, `src/private` and `tests`.
@@ -210,15 +191,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
210191
### Changed
211192
- Build determinism: files are processed in a deterministic order by relative path (case-insensitive), and load order is always `classes → public → private`.
212193

213-
### Documentation
214-
- README: document enterprise defaults, deterministic load order, and duplicate-function validation.
215-
216194
## [1.3.0] - 2025-09-23
217-
218195
- Added support for `ps1xml1` format data. Place it in resources folder with `Name.format.ps1xml` to be automatically added as format file and imported in module manifest
219196

220197
## [1.2.0] - 2025-09-17
221-
222198
### Added
223199
- Added support for classes directory inside src
224200
- Initialize-NovaModule generates classes directory during fresh project
@@ -228,74 +204,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
228204
- Version upgrade using update-mtmoduleversion now support build tags. Improvements to semver versioning.
229205

230206
## [1.1.3] - 2025-09-14
231-
232207
### Added
233-
234208
- Now supports preview tag in Update-NovaModuleVersion
235209
- Now supports semver naming in both project.json and modulemanifest
236210
- Module build supports `preview` or `prerelease` tag
237211
- Preview version looks like `1.2.3-preview`
238212

239213
## [1.1.0] - 2025-08-28
240-
241214
## Added
242-
243215
- Now Module manifest includes `AliasesToExport`. This helps loading aliases without explicitly importing modules to
244216
session.
245217
- thanks to @djs-zmtc for suggesting the feature
246218

247219
## [1.0.0] - 2025-03-11
248-
249220
### Added
250-
251221
- New optional project setting `CopyResourcesToModuleRoot`. Setting to true places resource files in the root directory
252222
of module. Default is `false` to provide backward compatibility. Thanks to @[BrooksV](https://github.com/BrooksV)
253223

254224
### Fixed
255-
256225
- **BREAKING CHANGE**: Typo corrected: ProjecUri to ProjectUri. Existing projects require manual update.
257226

258227
## [0.0.9] - 2024-07-17
259-
260228
### Fixed
261-
262229
- Fixed #7, Invoke build should not through for empty tags
263230

264231
## [0.0.7] - 2024-07-17
265-
266232
### Added
267-
268233
- Now "Manifest" section of project JSON supports all Manifest parameters, use exact name of parameter (from New-ModuleManifest) as key in JSON
269234

270235
## Fixed
271-
272236
- Fixed the example project README so it no longer suggests that `example/` includes a `run.ps1` helper script; it now
273237
points users to building `NovaModuleTools` from the repository root or using the Gallery workflow.
274238
- Corrected typo in ProjectUri from `ProjecUri` to correct spelling.
275239

276240
## [0.0.6] - 2024-07-08
277241

278242
### Added
279-
280243
- `Test-NovaBuild` now supports including and excluding tags
281244

282245
### Fixed
283-
284246
- Code cleanup
285247

286248
## [0.0.5] - 2024-07-05
287-
288249
### Added
289-
290250
- More verbose info during MTModule creation
291251

292252
### Fixed
293-
294253
- Issue #2 : Git initialization implemented
295254
- Issue #1 : Doesn't create empty `tests` folder when user chooses `no` to tests
296255

297256
## [0.0.4] - 2024-06-25
298-
299257
### Added
300258
- First release to `psgallery`
301259
- All basic functionality of Module is ready
@@ -339,4 +297,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
339297
[0.0.6]: https://github.com/stiwicourage/NovaModuleTools/compare/Version_0.0.5...Version_0.0.6
340298
[0.0.5]: https://github.com/stiwicourage/NovaModuleTools/compare/Version_0.0.4...Version_0.0.5
341299
[0.0.4]: https://github.com/stiwicourage/NovaModuleTools/compare/Version_0.0.3...Version_0.0.4
342-

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,16 @@ These switches keep the behavior explicit and opt-in:
212212
- `Update-NovaModuleVersion -ContinuousIntegration` also falls back to a patch bump when the current `HEAD` already
213213
matches the latest tag, so release automation can seed the next prerelease line without requiring an extra commit
214214
first
215+
- `Update-NovaModuleVersion` and `% nova bump` treat stable `0.y.z` versions as the SemVer initial-development phase,
216+
so breaking-change bumps stay on the `0.y.z` line by planning the next minor version instead of jumping to `1.0.0`
215217
- `Publish-NovaModule -ContinuousIntegration` restores the built module after publish completes
216218
- `Invoke-NovaRelease -ContinuousIntegration` forwards that CI intent through the nested build/bump boundaries and then
217219
restores the built module again after publish
218220

221+
When Nova reports that a breaking-change bump was detected while the current stable version is still `0.y.z`, it also
222+
prints guidance about manually setting `1.0.0` once the software is stable. Preview bumps keep their current behavior
223+
and are not remapped by this rule.
224+
219225
Useful local helper:
220226

221227
```powershell

docs/NovaModuleTools/en-US/Update-NovaModuleVersion.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ The release label is inferred from the commit set:
4242
- `Minor` for `feat:` commits
4343
- `Patch` for `fix:` commits and all other cases
4444

45+
When the current stable version is still on `0.y.z` and the inferred label is `Major`, Nova keeps the release on the
46+
initial-development line and plans the next minor version instead of jumping straight to `1.0.0`. The result still
47+
reports the detected `Major` label so you can see that the commit set contained a breaking change, and Nova prints
48+
guidance about manually setting `1.0.0` once the software is stable. `-Preview` behavior stays unchanged.
49+
4550
When Git tags exist, only commits since the latest tag are considered. If the folder is not a Git repository, the
4651
command falls back to a patch bump.
4752

@@ -162,6 +167,23 @@ PS> Update-NovaModuleVersion -ContinuousIntegration
162167

163168
Re-imports the built `dist/<ProjectName>/<ProjectName>.psd1` first and then runs the normal version bump workflow.
164169

170+
### EXAMPLE 9
171+
172+
```text
173+
PS> Update-NovaModuleVersion -WhatIf
174+
175+
What if: Performing the operation "Update module version using Major release label" on target "project.json".
176+
WARNING: Major version zero (0.y.z) is for initial development, so Nova keeps breaking-change bumps on the 0.y.z line and plans the next minor version instead of 1.0.0. Set 1.0.0 manually once the software is stable; after that, automatic major-version bumps work normally.
177+
178+
PreviousVersion: 0.1.0
179+
NewVersion: 0.2.0
180+
Label: Major
181+
CommitCount: 34
182+
```
183+
184+
Shows how breaking-change commits stay on the `0.y.z` initial-development line for stable bumps, while still warning
185+
that `1.0.0` should be set manually when the API becomes stable.
186+
165187
## PARAMETERS
166188

167189
### -Path

docs/commands.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,10 @@ <h3><code>Update-NovaModuleVersion</code> / <code>% nova bump</code></h3>
476476
<li><strong>Notable behavior:</strong> falls back to a patch bump when the folder is not a
477477
Git repository, but throws when the repository exists and has no commits yet
478478
</li>
479+
<li><strong>Major-zero rule:</strong> stable <code>0.y.z</code> projects keep
480+
breaking-change
481+
bumps on the initial-development line, so a detected <code>Major</code> bump plans the
482+
next minor version until you manually set <code>1.0.0</code></li>
479483
<li><strong>Prerelease rule:</strong> finalizes matching prerelease targets like
480484
<code>2.0.0-preview7 -&gt; 2.0.0</code> instead of carrying the old prerelease label
481485
into

docs/versioning-and-updates.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ <h3>How Nova chooses the bump label</h3>
165165
<li><strong>Minor</strong> for <code>feat:</code> commits</li>
166166
<li><strong>Patch</strong> for <code>fix:</code> commits and all other cases</li>
167167
</ul>
168+
<p>While your project is still on a stable <code>0.y.z</code> version, Nova treats SemVer major zero as
169+
the initial-development phase. A breaking-change bump still reports the detected
170+
<strong>Major</strong> label, but the planned stable version stays on the <code>0.y.z</code> line by
171+
advancing to the next minor version instead of jumping to <code>1.0.0</code>. Nova also prints a
172+
reminder to set <code>1.0.0</code> manually once the API is stable. Preview mode stays unchanged.
173+
</p>
174+
<pre><code>0.0.1 + Patch -> 0.0.2
175+
0.1.0 + Minor -> 0.2.0
176+
0.1.0 + Major -> 0.2.0</code></pre>
168177
<p>When Git tags exist, Nova uses commits since the latest tag. When the folder is not a Git repository,
169178
Nova falls back to a patch bump. When the repository exists but has no commits yet, Nova stops with
170179
a clear error.</p>

src/private/cli/FormatNovaCliCommandResult.ps1

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,29 @@ function Format-NovaCliVersionUpdateResult {
4747
'Version plan:'
4848
}
4949

50-
return "$summaryPrefix $( $Result.PreviousVersion ) -> $( $Result.NewVersion ) | Label: $( $Result.Label ) | Commits: $( $Result.CommitCount )"
50+
$summary = "$summaryPrefix $( $Result.PreviousVersion ) -> $( $Result.NewVersion ) | Label: $( $Result.Label ) | Commits: $( $Result.CommitCount )"
51+
$advisoryMessage = Get-NovaCliVersionUpdateAdvisoryMessage -Result $Result
52+
if ( [string]::IsNullOrWhiteSpace($advisoryMessage)) {
53+
return $summary
54+
}
55+
56+
return @(
57+
$summary
58+
$advisoryMessage
59+
) -join [Environment]::NewLine
60+
}
61+
62+
function Get-NovaCliVersionUpdateAdvisoryMessage {
63+
[CmdletBinding()]
64+
param(
65+
[Parameter(Mandatory)][object]$Result
66+
)
67+
68+
if ($Result.PSObject.Properties.Name -notcontains 'AdvisoryMessage') {
69+
return $null
70+
}
71+
72+
return $Result.AdvisoryMessage
5173
}
5274

5375
function Format-NovaCliCommandResult {

0 commit comments

Comments
 (0)