-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversioning-and-updates.html
More file actions
429 lines (412 loc) · 23.3 KB
/
Copy pathversioning-and-updates.html
File metadata and controls
429 lines (412 loc) · 23.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>NovaModuleTools — Versioning, self-update, and notification preferences</title>
<meta content="Learn how NovaModuleTools handles semantic version bumps, version display commands, self-update workflows, prerelease eligibility, and notification preferences."
name="description">
<meta content="index,follow,max-image-preview:large" name="robots">
<meta content="#0b1020" name="theme-color">
<link href="https://www.novamoduletools.com/versioning-and-updates.html" rel="canonical">
<link href="./assets/icon.png" rel="icon" type="image/png">
<link href="./assets/icon.png" rel="apple-touch-icon">
<meta content="article" property="og:type">
<meta content="NovaModuleTools — Versioning, self-update, and notification preferences" property="og:title">
<meta content="Use this guide to understand nova bump, version display commands, self-update behavior, and stable versus prerelease update eligibility."
property="og:description">
<meta content="https://www.novamoduletools.com/versioning-and-updates.html" property="og:url">
<meta content="https://www.novamoduletools.com/assets/icon.png" property="og:image">
<meta content="summary" name="twitter:card">
<meta content="NovaModuleTools — Versioning, self-update, and notification preferences" name="twitter:title">
<meta content="Use this guide to understand nova bump, version display commands, self-update behavior, and stable versus prerelease update eligibility."
name="twitter:description">
<link href="./assets/site.css" rel="stylesheet">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": "NovaModuleTools versioning and updates guide",
"description": "How to bump versions and self-update NovaModuleTools.",
"url": "https://www.novamoduletools.com/versioning-and-updates.html"
}
</script>
</head>
<body class="guide-page">
<header class="site-header">
<div class="site-header__inner">
<a class="site-brand" href="./index.html">
<img alt="" class="site-brand__icon" src="./assets/icon.png">
<span class="site-brand__text">NovaModuleTools</span>
</a>
<div aria-label="Command display mode" class="site-header__command-surface">
<div aria-label="Command display mode" class="surface-tabs" role="tablist">
<button aria-selected="true" class="surface-tabs__button" data-command-mode="powershell" role="tab"
type="button">PowerShell
</button>
<button aria-selected="false" class="surface-tabs__button" data-command-mode="command-line" role="tab"
type="button">Command-line
</button>
</div>
</div>
<div class="site-header__actions">
<details class="site-menu">
<summary class="site-menu__button">
<span class="site-menu__button-label">Menu</span>
<span class="site-menu__current">Versioning & Updates</span>
</summary>
<nav aria-label="Primary" class="site-menu__panel">
<a class="site-nav__link" href="./index.html">Home</a>
<a class="site-nav__link" href="./getting-started.html">Getting Started</a>
<a class="site-nav__link" href="./core-workflows.html">Core Workflows</a>
<a class="site-nav__link" href="./working-with-modules.html">Working with Modules</a>
<a class="site-nav__link" href="./project-json-reference.html">project.json Reference</a>
<a class="site-nav__link" href="./commands.html">Command Reference</a>
<a class="site-nav__link" href="./packaging-and-delivery.html">Packaging & Delivery</a>
<a aria-current="page" class="site-nav__link site-nav__link--active"
href="./versioning-and-updates.html">Versioning & Updates</a>
<a class="site-nav__link" href="./troubleshooting.html">Troubleshooting</a>
<a class="site-nav__link" href="./advanced.html">Concepts</a>
<a class="site-nav__link" href="./release-notes.html">Release Notes</a>
</nav>
</details>
</div>
</div>
</header>
<main class="page-shell">
<section class="guide-hero">
<p class="eyebrow">How-to Guides</p>
<h1>Version your project intentionally and keep Nova up to date</h1>
<p class="lead">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.</p>
</section>
<section class="content-grid">
<aside class="toc-card">
<h2>On this page</h2>
<ul class="toc-list">
<li><a href="#version-views">Choose the right version command</a></li>
<li><a href="#bump">Bump project versions</a></li>
<li><a href="#self-update">Self-update NovaModuleTools</a></li>
<li><a href="#notification-preferences">Manage prerelease eligibility</a></li>
</ul>
</aside>
<div class="guide-content">
<section class="content-section" id="version-views">
<h2>Choose the right version command</h2>
<div class="table-scroll">
<table>
<thead>
<tr>
<th>Command</th>
<th>What it shows</th>
<th>When to use it</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Get-NovaProjectInfo -Version</code> or <code>% nova version</code></td>
<td>The current version stored in the active project's <code>project.json</code>.</td>
<td>Use this when you want to know what your project will build and publish as.</td>
</tr>
<tr>
<td><code>Get-NovaProjectInfo -Installed</code> or <code>% nova version --installed</code></td>
<td>The version installed locally for the current project/module from the module path.</td>
<td>Use this when you want to compare the installed copy against the current working
project.
</td>
</tr>
<tr>
<td><code>Get-NovaProjectInfo -InstalledNovaVersion</code> or <code>% nova --version</code></td>
<td>The installed NovaModuleTools version.</td>
<td>Use this when you are troubleshooting Nova itself or checking whether the tool needs an
update.
</td>
</tr>
</tbody>
</table>
</div>
<div class="surface-example" data-command-example>
<div class="surface-example__meta">
<p class="surface-example__title">Check versions from the surface you are using</p>
<p class="surface-example__status">Showing: <span data-command-surface-label>PowerShell</span>
</p>
</div>
<div class="surface-example__surface" data-command-surface="powershell">
<pre><code>PS> Get-NovaProjectInfo -Version
PS> Get-NovaProjectInfo -Installed
PS> Get-NovaProjectInfo -InstalledNovaVersion</code></pre>
</div>
<div class="surface-example__surface" data-command-surface="command-line" hidden>
<pre><code>% nova version
% nova version --installed
% nova version -i
% nova --version
% nova -v</code></pre>
</div>
</div>
</section>
<section class="content-section" id="bump">
<h2>Bump project versions</h2>
<p>Use <code>Update-NovaModuleVersion</code> or <code>% nova bump</code> when you want Nova to choose
the
next semantic version based on Git history.</p>
<h3>How Nova chooses the bump label</h3>
<ul class="plain-list">
<li><strong>Major</strong> for breaking changes</li>
<li><strong>Minor</strong> for <code>feat:</code> commits</li>
<li><strong>Patch</strong> for <code>fix:</code> commits and all other cases</li>
</ul>
<p>While your project is still on a stable <code>0.y.z</code> version, Nova treats SemVer major zero as
the initial-development phase. Stable bumps stay on the <code>0.y.z</code> line, and a
breaking-change
bump still reports the detected <strong>Major</strong> label while advancing to the next minor
version
instead of jumping to <code>1.0.0</code>. Nova prints one warning that you should set
<code>1.0.0</code> manually once the API is stable. Preview mode stays unchanged.
</p>
<pre><code>0.0.1 + Patch -> 0.0.2
0.1.0 + Minor -> 0.2.0
0.1.0 + Major -> 0.2.0</code></pre>
<p>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 <code>-OverrideWarning</code> or the CLI form <code>% nova bump
--override-warning</code> / <code>% nova bump -o</code> 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.</p>
<p>Nova treats prerelease versions as previews of a specific semantic version target. That means a bump
does not blindly carry prerelease labels such as <code>preview7</code> 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.</p>
<pre><code>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</code></pre>
<p>Use <code>-Preview</code> or the CLI form <code>% nova bump --preview</code> / <code>% nova bump
-p</code>
when you want that bump to stay explicitly in prerelease mode. Stable
versions first resolve the normal semantic target and then append <code>-preview</code>. 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 <code>01</code>, so <code>preview</code> becomes <code>preview01</code> and
<code>SNAPSHOT</code> becomes <code>SNAPSHOT01</code>.</p>
<pre><code>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</code></pre>
<div class="surface-example" data-command-example>
<div class="surface-example__meta">
<p class="surface-example__title">Preview or confirm the next version bump</p>
<p class="surface-example__status">Showing: <span data-command-surface-label>PowerShell</span>
</p>
</div>
<div class="surface-example__surface" data-command-surface="powershell">
<pre><code>PS> Update-NovaModuleVersion -WhatIf
PS> Update-NovaModuleVersion -Preview -WhatIf
PS> Update-NovaModuleVersion -Path ./src/resources/example -OverrideWarning -WhatIf
PS> Update-NovaModuleVersion -ContinuousIntegration</code></pre>
</div>
<div class="surface-example__surface" data-command-surface="command-line" hidden>
<pre><code>% nova bump --what-if
% nova bump --preview --what-if
% nova bump --override-warning --what-if
% nova bump --continuous-integration
% nova bump --confirm</code></pre>
</div>
</div>
<p>Use the continuous-integration form when the same CI/self-hosting session must first re-activate the
built <code>dist/</code> module before the version bump runs. This is especially useful after an
earlier command changed the active module state.</p>
<div class="notice notice--warning">
<strong>Empty repository rule.</strong>
<p>If your Git repository exists but has no commits yet, Nova throws: <code>Cannot bump version
because the repository has no commits yet. Create an initial commit first.</code></p>
</div>
<p>The standalone launcher uses a CLI-friendly confirmation flow for <code>% nova bump --confirm</code>
or
<code>% nova bump -c</code>. If
you decline, Nova exits cleanly without writing a new version.</p>
</section>
<section class="content-section" id="self-update">
<h2>Self-update NovaModuleTools</h2>
<p>Use <code>Update-NovaModuleTool</code>, its compatibility alias <code>Update-NovaModuleTools</code>,
or <code>% nova update</code> to update the installed NovaModuleTools module itself.</p>
<h3>What self-update does</h3>
<ol class="plain-list plain-list--ordered">
<li>Read the stored prerelease preference.</li>
<li>Resolve the best eligible update candidate from PowerShell Gallery.</li>
<li>Apply the update if one is available.</li>
<li>Print the release notes link after a successful update.</li>
</ol>
<div class="surface-example" data-command-example>
<div class="surface-example__meta">
<p class="surface-example__title">Update NovaModuleTools itself</p>
<p class="surface-example__status">Showing: <span data-command-surface-label>PowerShell</span>
</p>
</div>
<div class="surface-example__surface" data-command-surface="powershell">
<pre><code>PS> Update-NovaModuleTool
PS> Update-NovaModuleTools</code></pre>
</div>
<div class="surface-example__surface" data-command-surface="command-line" hidden>
<pre><code>% nova update</code></pre>
</div>
</div>
<p>If no newer version is available, <code>% nova update</code> prints a friendly “You're up to date!”
message together with the installed NovaModuleTools version.</p>
<div class="table-scroll">
<table>
<thead>
<tr>
<th>State</th>
<th>What happens</th>
</tr>
</thead>
<tbody>
<tr>
<td>Stable update available</td>
<td>Nova can apply it normally without prerelease-specific confirmation.</td>
</tr>
<tr>
<td>Only prerelease update available and prerelease eligibility is enabled</td>
<td>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.
</td>
</tr>
<tr>
<td>Prerelease eligibility disabled</td>
<td>Nova ignores prerelease targets and stays on stable-only updates.</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="content-section" id="notification-preferences">
<h2>Manage prerelease eligibility</h2>
<p>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.</p>
<div class="surface-example" data-command-example>
<div class="surface-example__meta">
<p class="surface-example__title">Inspect or change prerelease eligibility</p>
<p class="surface-example__status">Showing: <span data-command-surface-label>PowerShell</span>
</p>
</div>
<div class="surface-example__surface" data-command-surface="powershell">
<pre><code>PS> Get-NovaUpdateNotificationPreference
PS> Set-NovaUpdateNotificationPreference -DisablePrereleaseNotifications
PS> Set-NovaUpdateNotificationPreference -EnablePrereleaseNotifications</code></pre>
</div>
<div class="surface-example__surface" data-command-surface="command-line" hidden>
<pre><code>% nova notification
% nova notification --disable
% nova notification --enable</code></pre>
</div>
</div>
<h3>Recommended choices</h3>
<div class="table-scroll">
<table>
<thead>
<tr>
<th>If you are…</th>
<th>Recommended setting</th>
<th>Why</th>
</tr>
</thead>
<tbody>
<tr>
<td>using Nova on a stable-only workstation or CI runner</td>
<td>Disable prerelease notifications</td>
<td>You avoid prerelease self-update targets entirely.</td>
</tr>
<tr>
<td>testing new Nova features early</td>
<td>Enable prerelease notifications</td>
<td>You allow prerelease targets, but still get an explicit confirmation prompt before they
run.
</td>
</tr>
</tbody>
</table>
</div>
<p><code>Get-NovaUpdateNotificationPreference</code> and <code>% nova notification</code> return the
current state and the settings path so you can confirm exactly what the stored preference is.</p>
</section>
</div>
</section>
</main>
<footer class="footer">
<div class="footer__inner">
<h2>Need release guidance next?</h2>
<p>Once your versioning rules are clear, move to the packaging and delivery guides so you can decide whether the
next step is package creation, repository publish, or a full release run.</p>
<div class="hero__actions">
<a class="button button--primary" href="./packaging-and-delivery.html">Open Packaging & Delivery</a>
<a class="button button--secondary" href="./troubleshooting.html">Open Troubleshooting</a>
</div>
<p class="footer__legal">Also available: <a class="legal-link" href="./commands.html">Command Reference</a>
and <a class="legal-link" href="./release-notes.html">Release Notes</a>.</p>
</div>
</footer>
<script>
(() => {
const storageKey = 'nova-doc-command-surface';
const supportedModes = ['powershell', 'command-line'];
function readStoredMode() {
try {
const stored = window.localStorage.getItem(storageKey);
return supportedModes.includes(stored) ? stored : 'powershell';
} catch {
return 'powershell';
}
}
function writeStoredMode(mode) {
try {
window.localStorage.setItem(storageKey, mode);
} catch {
// Ignore storage failures and keep the page interactive.
}
}
function getModeLabel(mode) {
return mode === 'command-line' ? 'Command-line' : 'PowerShell';
}
function applyMode(mode) {
document.querySelectorAll('[data-command-mode]').forEach((button) => {
const selected = button.dataset.commandMode === mode;
button.setAttribute('aria-selected', selected ? 'true' : 'false');
});
document.querySelectorAll('[data-command-example]').forEach((example) => {
example.querySelectorAll('[data-command-surface]').forEach((surface) => {
surface.hidden = surface.dataset.commandSurface !== mode;
});
});
document.querySelectorAll('[data-command-surface-label]').forEach((label) => {
label.textContent = getModeLabel(mode);
});
document.querySelectorAll('[data-command-visibility]').forEach((element) => {
element.hidden = element.dataset.commandVisibility !== mode;
});
}
document.addEventListener('DOMContentLoaded', () => {
const initialMode = readStoredMode();
applyMode(initialMode);
document.querySelectorAll('[data-command-mode]').forEach((button) => {
button.addEventListener('click', () => {
const nextMode = button.dataset.commandMode;
if (!supportedModes.includes(nextMode)) {
return;
}
applyMode(nextMode);
writeStoredMode(nextMode);
});
});
});
})();
</script>
</body>
</html>