Skip to content

Commit 94bf7c9

Browse files
authored
#238 fix: update Get-NovaProjectInfo and Update-NovaModuleTool commands to enhance version retrieval and user guidance (#239)
1 parent 144c204 commit 94bf7c9

13 files changed

Lines changed: 142 additions & 73 deletions

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
99

1010
### Changed
1111

12+
- `Get-NovaProjectInfo` now aligns its installed-version views with the existing CLI version contract.
13+
- `-Installed` now returns the installed version of the current project/module from the local module path.
14+
- `-InstalledNovaVersion` now returns the installed `NovaModuleTools` module name and version from PowerShell.
15+
- `Update-NovaModuleTool` now suggests `Get-NovaProjectInfo -InstalledNovaVersion` after a successful self-update so the PowerShell verification step checks the installed NovaModuleTools version directly.
16+
1217
### Deprecated
1318

1419
### Removed
@@ -468,4 +473,3 @@ This release was yanked because it removed the implicit `Pester` dependency, bef
468473
[0.0.6]: https://github.com/stiwicourage/NovaModuleTools/compare/Version_0.0.5...Version_0.0.6
469474
[0.0.5]: https://github.com/stiwicourage/NovaModuleTools/compare/Version_0.0.4...Version_0.0.5
470475
[0.0.4]: https://github.com/stiwicourage/NovaModuleTools/compare/Version_0.0.3...Version_0.0.4
471-

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ To inspect the current project version, the installed version of the current pro
130130
`NovaModuleTools` tool version, use:
131131

132132
```powershell
133+
PS> Get-NovaProjectInfo -Version
133134
PS> Get-NovaProjectInfo -Installed
135+
PS> Get-NovaProjectInfo -InstalledNovaVersion
134136
% nova version
135137
% nova version --installed
136138
% nova version -i
@@ -140,7 +142,9 @@ PS> Get-NovaProjectInfo -Installed
140142

141143
- `% nova version` shows the version from the current project's `project.json`
142144
- `% nova version --installed` / `% nova version -i` shows the locally installed version of the current project/module from the local module path
143-
- `Get-NovaProjectInfo -Installed` shows the installed `NovaModuleTools` module name and version from PowerShell
145+
- `Get-NovaProjectInfo -Version` shows the version from the current project's `project.json`
146+
- `Get-NovaProjectInfo -Installed` shows the locally installed version of the current project/module from PowerShell
147+
- `Get-NovaProjectInfo -InstalledNovaVersion` shows the installed `NovaModuleTools` module name and version from PowerShell
144148
- `% nova --version` / `% nova -v` shows the installed `NovaModuleTools` version
145149

146150
### CLI help

RELEASE_NOTE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ This file summarizes the release notes for NovaModuleTools. **UNRELEASED** chang
88

99
### Changed
1010

11+
- `Get-NovaProjectInfo` now matches the CLI version split on the PowerShell surface.
12+
- Use `-Installed` for the installed current project/module version.
13+
- Use `-InstalledNovaVersion` for the installed `NovaModuleTools` version.
14+
- `Update-NovaModuleTool` now suggests `Get-NovaProjectInfo -InstalledNovaVersion` after a successful self-update.
15+
1116
### Deprecated
1217

1318
### Removed
@@ -226,4 +231,3 @@ This release was yanked because it removed the implicit `Pester` dependency befo
226231
## [0.0.4] - 2024-06-25
227232
### Added
228233
- First PowerShell Gallery release of NovaModuleTools with the initial module workflow support.
229-

docs/NovaModuleTools/en-US/Get-NovaProjectInfo.md

Lines changed: 96 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
---
1+
---
22
document type: cmdlet
33
external help file: NovaModuleTools-Help.xml
4-
HelpUri: 'https://www.novamoduletools.com/project-json-reference.html'
4+
HelpUri: https://www.novamoduletools.com/project-json-reference.html
55
Locale: en-US
66
Module Name: NovaModuleTools
7-
ms.date: 05/06/2026
7+
ms.date: 05.25.2026
88
PlatyPS schema version: 2024-05-01
99
title: Get-NovaProjectInfo
1010
---
@@ -17,24 +17,32 @@ Reads `project.json` and returns resolved NovaModuleTools project metadata or a
1717

1818
## SYNTAX
1919

20-
### ProjectInfo
20+
### ProjectInfo (Default)
2121

22-
```text
23-
PS> Get-NovaProjectInfo [[-Path] <string>] [<CommonParameters>]
22+
```
23+
Get-NovaProjectInfo [[-Path] <string>] [<CommonParameters>]
2424
```
2525

2626
### ProjectVersion
2727

28-
```text
29-
PS> Get-NovaProjectInfo [[-Path] <string>] [-Version] [<CommonParameters>]
28+
```
29+
Get-NovaProjectInfo [[-Path] <string>] [-Version] [<CommonParameters>]
3030
```
3131

32-
### InstalledVersion
32+
### InstalledProjectVersion
3333

34-
```text
35-
PS> Get-NovaProjectInfo [-Installed] [<CommonParameters>]
34+
```
35+
Get-NovaProjectInfo [-Installed] [<CommonParameters>]
3636
```
3737

38+
### InstalledNovaVersion
39+
40+
```
41+
Get-NovaProjectInfo [-InstalledNovaVersion] [<CommonParameters>]
42+
```
43+
44+
## ALIASES
45+
3846
## DESCRIPTION
3947

4048
`Get-NovaProjectInfo` reads the `project.json` file in a NovaModuleTools project and returns a project information object with:
@@ -48,7 +56,11 @@ Use this command from scripts, tests, or troubleshooting when you want one objec
4856

4957
When you use `-Version`, the command returns only the project version string instead of the full project object.
5058

51-
When you use `-Installed`, the command returns the installed `NovaModuleTools` module name and version string instead of project metadata.
59+
When you use `-Installed`, the command returns the installed version of the current project/module from the local
60+
module path instead of project metadata.
61+
62+
When you use `-InstalledNovaVersion`, the command returns the installed `NovaModuleTools` module name and version
63+
string.
5264

5365
When `-Path` does not resolve to an existing project root folder, or the folder does not contain `project.json`,
5466
the command fails with an actionable error that tells you how to recover.
@@ -85,84 +97,114 @@ Returns only the version string from `project.json`.
8597
PS> Get-NovaProjectInfo -Installed
8698
```
8799

100+
Returns the installed version of the current project/module from the local module path.
101+
102+
### EXAMPLE 5
103+
104+
```text
105+
PS> Get-NovaProjectInfo -InstalledNovaVersion
106+
```
107+
88108
Returns the installed `NovaModuleTools` module name and version string.
89109

90110
## PARAMETERS
91111

92-
### -Path
112+
### -Installed
93113

94-
Project root path that contains `project.json`.
114+
Return the installed version of the current project/module from the local module path instead of project metadata.
95115

96116
```yaml
97-
Type: System.String
98-
DefaultValue: (Get-Location).Path
117+
Type: System.Management.Automation.SwitchParameter
118+
DefaultValue: False
99119
SupportsWildcards: false
100120
Aliases: []
101121
ParameterSets:
102-
- Name: ProjectInfo
103-
Position: 0
104-
IsRequired: false
105-
ValueFromPipeline: false
106-
ValueFromPipelineByPropertyName: false
107-
ValueFromRemainingArguments: false
108-
- Name: ProjectVersion
109-
Position: 0
110-
IsRequired: false
111-
ValueFromPipeline: false
112-
ValueFromPipelineByPropertyName: false
113-
ValueFromRemainingArguments: false
122+
- Name: InstalledProjectVersion
123+
Position: Named
124+
IsRequired: false
125+
ValueFromPipeline: false
126+
ValueFromPipelineByPropertyName: false
127+
ValueFromRemainingArguments: false
114128
DontShow: false
115129
AcceptedValues: []
116130
HelpMessage: ''
117131
```
118132
119-
### -Version
133+
### -InstalledNovaVersion
120134
121-
Return only the project version string instead of the full project information object.
135+
Return the installed `NovaModuleTools` module name and version string instead of project metadata.
122136

123137
```yaml
124138
Type: System.Management.Automation.SwitchParameter
125139
DefaultValue: False
126140
SupportsWildcards: false
127141
Aliases: []
128142
ParameterSets:
129-
- Name: ProjectVersion
130-
Position: Named
131-
IsRequired: false
132-
ValueFromPipeline: false
133-
ValueFromPipelineByPropertyName: false
134-
ValueFromRemainingArguments: false
143+
- Name: InstalledNovaVersion
144+
Position: Named
145+
IsRequired: false
146+
ValueFromPipeline: false
147+
ValueFromPipelineByPropertyName: false
148+
ValueFromRemainingArguments: false
135149
DontShow: false
136150
AcceptedValues: []
137151
HelpMessage: ''
138152
```
139153

140-
### -Installed
154+
### -Path
141155

142-
Return the installed `NovaModuleTools` module name and version string instead of project metadata.
156+
Project root path that contains `project.json`.
157+
158+
```yaml
159+
Type: System.String
160+
DefaultValue: (Get-Location).Path
161+
SupportsWildcards: false
162+
Aliases: []
163+
ParameterSets:
164+
- Name: ProjectVersion
165+
Position: 0
166+
IsRequired: false
167+
ValueFromPipeline: false
168+
ValueFromPipelineByPropertyName: false
169+
ValueFromRemainingArguments: false
170+
- Name: ProjectInfo
171+
Position: 0
172+
IsRequired: false
173+
ValueFromPipeline: false
174+
ValueFromPipelineByPropertyName: false
175+
ValueFromRemainingArguments: false
176+
DontShow: false
177+
AcceptedValues: []
178+
HelpMessage: ''
179+
```
180+
181+
### -Version
182+
183+
Return only the project version string instead of the full project information object.
143184

144185
```yaml
145186
Type: System.Management.Automation.SwitchParameter
146187
DefaultValue: False
147188
SupportsWildcards: false
148189
Aliases: []
149190
ParameterSets:
150-
- Name: InstalledVersion
151-
Position: Named
152-
IsRequired: false
153-
ValueFromPipeline: false
154-
ValueFromPipelineByPropertyName: false
155-
ValueFromRemainingArguments: false
191+
- Name: ProjectVersion
192+
Position: Named
193+
IsRequired: false
194+
ValueFromPipeline: false
195+
ValueFromPipelineByPropertyName: false
196+
ValueFromRemainingArguments: false
156197
DontShow: false
157198
AcceptedValues: []
158199
HelpMessage: ''
159200
```
160201

161202
### CommonParameters
162203

163-
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`,
164-
`-InformationVariable`, `-OutBuffer`, `-OutVariable`, `-PipelineVariable`, `-ProgressAction`, `-Verbose`,
165-
`-WarningAction`, and `-WarningVariable`.
204+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
205+
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
206+
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
207+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
166208

167209
## INPUTS
168210

@@ -184,14 +226,20 @@ Returned when you use `-Installed`.
184226

185227
Returned by default. The object includes project metadata, defaulted build settings, and resolved paths.
186228

229+
### System.String
230+
231+
Returned when you use `-InstalledNovaVersion`.
232+
187233
## NOTES
188234

189235
This command throws a clear error when `project.json` is missing or empty.
190236

191237
If `-Path` points to a file or a folder that does not exist, `Get-NovaProjectInfo` tells you to rerun it from a
192238
Nova project root or pass `-Path` to the folder that contains `project.json`.
193239

194-
`-Installed` does not require a project path or a `project.json` file.
240+
`-Installed` resolves the current Nova project and then reads the installed module version from the local module path.
241+
242+
`-InstalledNovaVersion` does not require a project path or a `project.json` file.
195243

196244
## RELATED LINKS
197245

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Stable updates do not require prerelease confirmation.
4040

4141
When a newer version is available, `Update-NovaModuleTool` shows progress while it installs the update and reads the release-notes link from the updated module. Every command path ends with a visible summary: up-to-date, preview, cancelled, or updated.
4242

43-
After a successful update, `Update-NovaModuleTool` prints the release notes link from the installed module manifest and suggests `Get-NovaProjectInfo -Installed` as the next verification step.
43+
After a successful update, `Update-NovaModuleTool` prints the release notes link from the installed module manifest and suggests `Get-NovaProjectInfo -InstalledNovaVersion` as the next verification step.
4444

4545
## EXAMPLES
4646

docs/commands.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ <h3>Inspect the current project</h3>
268268
<li><strong>Use when:</strong> you need to confirm what Nova resolved from
269269
<code>project.json</code></li>
270270
<li data-command-visibility="powershell"><strong>Extra views:</strong>
271-
<code>-Version</code> and <code>-Installed</code></li>
271+
<code>-Version</code>, <code>-Installed</code>, and <code>-InstalledNovaVersion</code></li>
272272
</ul>
273273
<div class="surface-example" data-command-example>
274274
<div class="surface-example__meta">
@@ -282,8 +282,9 @@ <h3>Inspect the current project</h3>
282282
<div class="surface-example__surface" data-command-surface="powershell">
283283
<pre><code>PS&gt; Get-NovaProjectInfo
284284
PS&gt; Get-NovaProjectInfo -Version
285-
PS&gt; Get-NovaProjectInfo -Installed</code></pre>
286-
</div>
285+
PS&gt; Get-NovaProjectInfo -Installed
286+
PS&gt; Get-NovaProjectInfo -InstalledNovaVersion</code></pre>
287+
</div>
287288
</div>
288289
<p><a class="text-link" href="./project-json-reference.html">See project.json behavior</a></p>
289290
</article>
@@ -589,7 +590,8 @@ <h3>Check the version you actually mean</h3>
589590
</li>
590591
<li data-command-visibility="powershell"><strong>Use:</strong>
591592
<code>Get-NovaProjectInfo -Version</code> for <code>project.json</code> and
592-
<code>Get-NovaProjectInfo -Installed</code> for the installed NovaModuleTools tool
593+
<code>Get-NovaProjectInfo -Installed</code> for the installed current project/module and
594+
<code>Get-NovaProjectInfo -InstalledNovaVersion</code> for the installed NovaModuleTools tool
593595
version
594596
</li>
595597
</ul>
@@ -608,7 +610,8 @@ <h3>Check the version you actually mean</h3>
608610
</div>
609611
<div class="surface-example__surface" data-command-surface="powershell">
610612
<pre><code>PS&gt; Get-NovaProjectInfo -Version
611-
PS&gt; Get-NovaProjectInfo -Installed</code></pre>
613+
PS&gt; Get-NovaProjectInfo -Installed
614+
PS&gt; Get-NovaProjectInfo -InstalledNovaVersion</code></pre>
612615
</div>
613616
</div>
614617
<p><a class="text-link" href="./versioning-and-updates.html#version-views">See version view

docs/versioning-and-updates.html

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ <h2>Choose the right version command</h2>
113113
<td>Use this when you want to know what your project will build and publish as.</td>
114114
</tr>
115115
<tr>
116-
<td><code>% nova version --installed</code> or <code>% nova version -i</code></td>
116+
<td><code>Get-NovaProjectInfo -Installed</code> or <code>% nova version --installed</code></td>
117117
<td>The version installed locally for the current project/module from the module path.</td>
118118
<td>Use this when you want to compare the installed copy against the current working
119119
project.
120120
</td>
121121
</tr>
122122
<tr>
123-
<td><code>Get-NovaProjectInfo -Installed</code> or <code>% nova --version</code></td>
123+
<td><code>Get-NovaProjectInfo -InstalledNovaVersion</code> or <code>% nova --version</code></td>
124124
<td>The installed NovaModuleTools version.</td>
125125
<td>Use this when you are troubleshooting Nova itself or checking whether the tool needs an
126126
update.
@@ -137,7 +137,8 @@ <h2>Choose the right version command</h2>
137137
</div>
138138
<div class="surface-example__surface" data-command-surface="powershell">
139139
<pre><code>PS&gt; Get-NovaProjectInfo -Version
140-
PS&gt; Get-NovaProjectInfo -Installed</code></pre>
140+
PS&gt; Get-NovaProjectInfo -Installed
141+
PS&gt; Get-NovaProjectInfo -InstalledNovaVersion</code></pre>
141142
</div>
142143
<div class="surface-example__surface" data-command-surface="command-line" hidden>
143144
<pre><code>% nova version
@@ -147,12 +148,6 @@ <h2>Choose the right version command</h2>
147148
% nova -v</code></pre>
148149
</div>
149150
</div>
150-
<div class="surface-note" data-command-visibility="powershell">
151-
<p><strong>PowerShell note:</strong> project version lookup and installed-tool version lookup both
152-
have direct
153-
cmdlet forms. The installed current-project module view remains launcher-oriented on this page,
154-
as shown in the comparison table above.</p>
155-
</div>
156151
</section>
157152

158153
<section class="content-section" id="bump">

src/private/update/InvokeNovaModuleSelfUpdateWorkflow.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,6 @@ function Get-NovaModuleSelfUpdateWorkflowNextStepLine {
215215

216216
return @(
217217
'Next step:'
218-
'Get-NovaProjectInfo -Installed'
218+
'Get-NovaProjectInfo -InstalledNovaVersion'
219219
)
220220
}

0 commit comments

Comments
 (0)