How-to Guides

Version your project intentionally and keep Nova up to date

NovaModuleTools separates project versioning from self-updating the tool itself. This page explains which command answers which question, how version bumps are chosen from Git history, and how stable versus prerelease self-update eligibility works.

Choose the right version command

Command What it shows When to use it
Get-NovaProjectInfo -Version or % nova version The current version stored in the active project's project.json. Use this when you want to know what your project will build and publish as.
Get-NovaProjectInfo -Installed or % nova version --installed The version installed locally for the current project/module from the module path. Use this when you want to compare the installed copy against the current working project.
Get-NovaProjectInfo -InstalledNovaVersion or % nova --version The installed NovaModuleTools version. Use this when you are troubleshooting Nova itself or checking whether the tool needs an update.

Check versions from the surface you are using

Showing: PowerShell

PS> Get-NovaProjectInfo -Version
PS> Get-NovaProjectInfo -Installed
PS> Get-NovaProjectInfo -InstalledNovaVersion

Bump project versions

Use Update-NovaModuleVersion or % nova bump when you want Nova to choose the next semantic version based on Git history.

How Nova chooses the bump label

  • Major for breaking changes
  • Minor for feat: commits
  • Patch for fix: commits and all other cases

While your project is still on a stable 0.y.z version, Nova treats SemVer major zero as the initial-development phase. Stable bumps stay on the 0.y.z line, and a breaking-change bump still reports the detected Major label while advancing to the next minor version instead of jumping to 1.0.0. Nova prints one warning that you should set 1.0.0 manually once the API is stable. Preview mode stays unchanged.

0.0.1 + Patch -> 0.0.2
0.1.0 + Minor -> 0.2.0
0.1.0 + Major -> 0.2.0

When Git tags exist, Nova uses commits since the latest tag. When Git-based inference is unavailable because the project path is not inside a Git repository, Nova stops instead of silently presenting a normal-looking patch result. Use -OverrideWarning or the CLI form % nova bump --override-warning / % nova bump -o only when you intentionally want that Patch fallback for an example/template flow outside Git. When the repository exists but has no commits yet, Nova still stops with a clear error.

Nova treats prerelease versions as previews of a specific semantic version target. That means a bump does not blindly carry prerelease labels such as preview7 into the next major, minor, or patch. If the current version is already a prerelease of the selected release line, Nova finalizes that version instead.

2.0.0-preview7 + Major -> 2.0.0
1.3.0-preview7 + Minor -> 1.3.0
1.2.4-preview7 + Patch -> 1.2.4
1.2.3-preview7 + Minor -> 1.3.0

Use -Preview or the CLI form % nova bump --preview / % nova bump -p when you want that bump to stay explicitly in prerelease mode. Stable versions first resolve the normal semantic target and then append -preview. Existing prerelease versions keep the same semantic core and preserve the current prerelease stem while appending or incrementing trailing digits instead of finalizing. Any bare prerelease stem now starts at 01, so preview becomes preview01 and SNAPSHOT becomes SNAPSHOT01.

1.5.3 + Minor + -Preview -> 1.6.0-preview
1.5.3-preview + -Preview -> 1.5.3-preview01
1.5.3-preview01 + -Preview -> 1.5.3-preview02
1.5.3-preview09 + -Preview -> 1.5.3-preview10
1.5.3-SNAPSHOT + -Preview -> 1.5.3-SNAPSHOT01
1.5.3-SNAPSHOT1 + -Preview -> 1.5.3-SNAPSHOT2
1.5.3-rc1 + -Preview -> 1.5.3-rc2
1.5.3-rc + -Preview -> 1.5.3-rc01

Preview or confirm the next version bump

Showing: PowerShell

PS> Update-NovaModuleVersion -WhatIf
PS> Update-NovaModuleVersion -Preview -WhatIf
PS> Update-NovaModuleVersion -Path ./src/resources/example -OverrideWarning -WhatIf
PS> Update-NovaModuleVersion -ContinuousIntegration

Use the continuous-integration form when the same CI/self-hosting session must first re-activate the built dist/ module before the version bump runs. This is especially useful after an earlier command changed the active module state.

Empty repository rule.

If your Git repository exists but has no commits yet, Nova throws: Cannot bump version because the repository has no commits yet. Create an initial commit first.

The standalone launcher uses a CLI-friendly confirmation flow for % nova bump --confirm or % nova bump -c. If you decline, Nova exits cleanly without writing a new version.

Self-update NovaModuleTools

Use Update-NovaModuleTool, its compatibility alias Update-NovaModuleTools, or % nova update to update the installed NovaModuleTools module itself.

What self-update does

  1. Read the stored prerelease preference.
  2. Resolve the best eligible update candidate from PowerShell Gallery.
  3. Apply the update if one is available.
  4. Print the release notes link after a successful update.

Update NovaModuleTools itself

Showing: PowerShell

PS> Update-NovaModuleTool
PS> Update-NovaModuleTools

If no newer version is available, % nova update prints a friendly “You're up to date!” message together with the installed NovaModuleTools version.

State What happens
Stable update available Nova can apply it normally without prerelease-specific confirmation.
Only prerelease update available and prerelease eligibility is enabled Nova may target the prerelease, but it always asks for explicit confirmation before updating, and that prompt defaults to No so pressing Enter cancels the update.
Prerelease eligibility disabled Nova ignores prerelease targets and stays on stable-only updates.

Manage prerelease eligibility

The update preference commands do not update the module by themselves. They only control whether prerelease self-update targets are eligible when you later run the update command.

Inspect or change prerelease eligibility

Showing: PowerShell

PS> Get-NovaUpdateNotificationPreference
PS> Set-NovaUpdateNotificationPreference -DisablePrereleaseNotifications
PS> Set-NovaUpdateNotificationPreference -EnablePrereleaseNotifications

Recommended choices

If you are… Recommended setting Why
using Nova on a stable-only workstation or CI runner Disable prerelease notifications You avoid prerelease self-update targets entirely.
testing new Nova features early Enable prerelease notifications You allow prerelease targets, but still get an explicit confirmation prompt before they run.

Get-NovaUpdateNotificationPreference and % nova notification return the current state and the settings path so you can confirm exactly what the stored preference is.