Skip to content

Commit 1e47832

Browse files
committed
fix(#138): update no-update messages for clarity
- Simplify output for no updates available - Remove outdated information about update candidates
1 parent 538edd1 commit 1e47832

4 files changed

Lines changed: 4 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3434
usage.
3535
- Uses the stored prerelease update preference to decide whether prerelease self-updates are eligible.
3636
- Requires explicit confirmation before a prerelease self-update proceeds.
37-
- `% nova update` now reports the current `PSGallery` lookup candidate in no-update output instead of claiming the
38-
installed version is universally the newest available.
3937
- Add `% nova version --installed` / `% nova version -i` so users can compare the locally installed version of the
4038
current project/module with the current project version from `project.json`, while keeping `% nova --version` /
4139
`% nova -v` dedicated to the installed NovaModuleTools version.

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ preference to decide whether prerelease self-updates are eligible. When prerelea
107107
self-update stays on stable releases. When they are enabled, self-update may target a prerelease, but it asks for
108108
explicit confirmation before proceeding.
109109

110-
`% nova update` checks PowerShell Gallery (`PSGallery`) for its current update candidate. When no update is applied,
111-
the CLI reports the installed version together with the candidate returned from that lookup instead of claiming the
112-
installed version is universally the newest available.
113110

114111
Successful `Update-NovaModuleTool`, CLI:`% nova update`, and `Install-NovaCli` runs print the release notes link from
115112
the

src/private/cli/FormatNovaCliCommandResult.ps1

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,6 @@ function Format-NovaCliVersionUpdateResult {
5050
return "$summaryPrefix $( $Result.PreviousVersion ) -> $( $Result.NewVersion ) | Label: $( $Result.Label ) | Commits: $( $Result.CommitCount )"
5151
}
5252

53-
function Get-NovaCliNoUpdateDetail {
54-
[CmdletBinding()]
55-
param([Parameter(Mandatory)][object]$Result)
56-
57-
if (-not [string]::IsNullOrWhiteSpace($Result.LookupCandidateVersion) -and -not [string]::IsNullOrWhiteSpace($Result.LookupRepository)) {
58-
return "Installed: $( $Result.ModuleName ) $( $Result.CurrentVersion ). $( $Result.LookupRepository ) currently reports $( $Result.LookupCandidateVersion ) as the latest update candidate checked."
59-
}
60-
61-
if (-not [string]::IsNullOrWhiteSpace($Result.LookupCandidateVersion)) {
62-
return "Installed: $( $Result.ModuleName ) $( $Result.CurrentVersion ). The current update lookup reports $( $Result.LookupCandidateVersion ) as the latest candidate checked."
63-
}
64-
65-
return "Installed: $( $Result.ModuleName ) $( $Result.CurrentVersion ). No update candidate is currently available from the configured update source."
66-
}
67-
6853
function Format-NovaCliCommandResult {
6954
[CmdletBinding()]
7055
param(
@@ -74,8 +59,8 @@ function Format-NovaCliCommandResult {
7459

7560
if (Test-NovaCliNoUpdateResult -Command $Command -Result $Result) {
7661
return @(
77-
'No update was applied.'
78-
(Get-NovaCliNoUpdateDetail -Result $Result)
62+
"You're up to date!"
63+
"$( $Result.ModuleName ) $( $Result.CurrentVersion ) is currently the newest version available."
7964
)
8065
}
8166

tests/UpdateNotification.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,8 @@ Describe 'Update notification behavior' {
596596
$result = @(Invoke-NovaCli update)
597597

598598
$result | Should -HaveCount 2
599-
$result[0] | Should -Be 'No update was applied.'
600-
$result[1] | Should -Be 'Installed: NovaModuleTools 2.0.0-prerelease3. PSGallery currently reports 2.0.0-beta as the latest update candidate checked.'
599+
$result[0] | Should -Be "You're up to date!"
600+
$result[1] | Should -Be 'NovaModuleTools 2.0.0-prerelease3 is currently the newest version available.'
601601
Assert-MockCalled Update-NovaModuleTool -Times 1
602602
}
603603
}

0 commit comments

Comments
 (0)