vnxt 1.7.7 ā 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +502 -451
- package/package.json +46 -46
- package/vnxt.js +47 -5
package/README.md
CHANGED
|
@@ -1,452 +1,503 @@
|
|
|
1
|
-
<p>
|
|
2
|
-
<img src="./docs/logos/vnxt_light_logo.png" alt="vnxt logo" width="200">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
# vnxt (vx)
|
|
6
|
-
|
|
7
|
-
A lightweight CLI tool for automated version bumping with changelog generation and git integration.
|
|
8
|
-
|
|
9
|
-
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Features
|
|
10
|
-
|
|
11
|
-
- š Automatic semantic version detection from commit messages
|
|
12
|
-
- š Automatic CHANGELOG.md generation
|
|
13
|
-
- š·ļø Git tag annotation
|
|
14
|
-
- š Pre-flight checks for clean working directory
|
|
15
|
-
- š¬ Dry-run mode to preview changes
|
|
16
|
-
- š Release notes generation
|
|
17
|
-
- āļø Project-level configuration support
|
|
18
|
-
- š¬ Interactive mode when no arguments provided
|
|
19
|
-
- šØ Colored terminal output for better readability
|
|
20
|
-
- 𤫠Quiet mode for CI/CD environments
|
|
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
|
-
npm link
|
|
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
|
-
vx -m "
|
|
204
|
-
vx -m "
|
|
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
|
-
vx -m "feat:
|
|
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
|
-
**Bash:**
|
|
409
|
-
```bash
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
1
|
+
<p>
|
|
2
|
+
<img src="./docs/logos/vnxt_light_logo.png" alt="vnxt logo" width="200">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# vnxt (vx)
|
|
6
|
+
|
|
7
|
+
A lightweight CLI tool for automated version bumping with changelog generation and git integration.
|
|
8
|
+
|
|
9
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Features
|
|
10
|
+
|
|
11
|
+
- š Automatic semantic version detection from commit messages
|
|
12
|
+
- š Automatic CHANGELOG.md generation
|
|
13
|
+
- š·ļø Git tag annotation with configurable prefix
|
|
14
|
+
- š Pre-flight checks for clean working directory
|
|
15
|
+
- š¬ Dry-run mode to preview changes
|
|
16
|
+
- š Release notes generation
|
|
17
|
+
- āļø Project-level configuration support
|
|
18
|
+
- š¬ Interactive mode when no arguments provided
|
|
19
|
+
- šØ Colored terminal output for better readability
|
|
20
|
+
- 𤫠Quiet mode for CI/CD environments
|
|
21
|
+
- š¦ Automated npm publishing via GitHub Actions Trusted Publishing
|
|
22
|
+
|
|
23
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Installation
|
|
24
|
+
|
|
25
|
+
### Global Installation
|
|
26
|
+
|
|
27
|
+
**Bash/PowerShell:**
|
|
28
|
+
```bash
|
|
29
|
+
npm install -g vnxt
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
After installation, you can use either `vnxt` or the shorter alias `vx`:
|
|
33
|
+
```bash
|
|
34
|
+
vnxt --help
|
|
35
|
+
vx --help # Same thing, shorter!
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Local Installation (from source)
|
|
39
|
+
|
|
40
|
+
**Bash/macOS/Linux:**
|
|
41
|
+
```bash
|
|
42
|
+
# Clone the repository
|
|
43
|
+
git clone https://github.com/n-orrow/vnxt.git
|
|
44
|
+
cd vnxt
|
|
45
|
+
|
|
46
|
+
# Install globally via npm link
|
|
47
|
+
chmod +x vnxt.js
|
|
48
|
+
npm link
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**PowerShell/Windows:**
|
|
52
|
+
```powershell
|
|
53
|
+
# Clone the repository
|
|
54
|
+
git clone https://github.com/n-orrow/vnxt.git
|
|
55
|
+
cd vnxt
|
|
56
|
+
|
|
57
|
+
# Install globally via npm link
|
|
58
|
+
npm link
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Usage
|
|
62
|
+
|
|
63
|
+
### Basic Examples
|
|
64
|
+
|
|
65
|
+
**Bash/PowerShell:**
|
|
66
|
+
```bash
|
|
67
|
+
# Simple version bump (auto-detects patch from "fix:")
|
|
68
|
+
vnxt -m "fix: resolve RFID reader bug"
|
|
69
|
+
# or use the shorter alias:
|
|
70
|
+
vx -m "fix: resolve RFID reader bug"
|
|
71
|
+
|
|
72
|
+
# Feature addition (auto-detects minor from "feat:")
|
|
73
|
+
vx -m "feat: add heatmap visualization"
|
|
74
|
+
|
|
75
|
+
# Breaking change (auto-detects major from "BREAKING")
|
|
76
|
+
vx -m "BREAKING: redesign API structure"
|
|
77
|
+
|
|
78
|
+
# With changelog and push to remote
|
|
79
|
+
vx -m "feat: add new dashboard" -c -p
|
|
80
|
+
|
|
81
|
+
# Interactive mode (prompts for input)
|
|
82
|
+
vx
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Command Line Options
|
|
86
|
+
|
|
87
|
+
All options work with both `vnxt` and `vx`:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
-m, --message <msg> Commit message (required unless using interactive mode)
|
|
91
|
+
-t, --type <type> Version type: patch, minor, major (auto-detected from message)
|
|
92
|
+
-v, --version <ver> Set specific version (e.g., 2.0.0-beta.1)
|
|
93
|
+
-V, --version Show vnxt version
|
|
94
|
+
-p, --push Push to remote with tags
|
|
95
|
+
-dnp, --no-push Prevent auto-push (overrides config)
|
|
96
|
+
--publish Push and trigger npm publish via GitHub Actions
|
|
97
|
+
-c, --changelog Update CHANGELOG.md
|
|
98
|
+
-d, --dry-run Show what would happen without making changes
|
|
99
|
+
-a, --all [mode] Stage files before versioning (prompts if no mode)
|
|
100
|
+
Modes: tracked, all, interactive (i), patch (p)
|
|
101
|
+
-r, --release Generate release notes file
|
|
102
|
+
-q, --quiet Minimal output (errors only)
|
|
103
|
+
-h, --help Show help message
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Automatic Version Detection
|
|
107
|
+
|
|
108
|
+
vnxt automatically detects the version bump type from your commit message:
|
|
109
|
+
|
|
110
|
+
- `major:` ā **major** version bump
|
|
111
|
+
- `minor:` ā **minor** version bump
|
|
112
|
+
- `patch:` ā **patch** version bump
|
|
113
|
+
- `feat:` or `feature:` ā **minor** version bump
|
|
114
|
+
- `fix:` ā **patch** version bump
|
|
115
|
+
- `BREAKING:` or contains `BREAKING` ā **major** version bump
|
|
116
|
+
|
|
117
|
+
You can override this with the `-t` flag.
|
|
118
|
+
|
|
119
|
+
### Dry Run
|
|
120
|
+
|
|
121
|
+
Preview what will happen without making changes:
|
|
122
|
+
|
|
123
|
+
**Bash/PowerShell:**
|
|
124
|
+
```bash
|
|
125
|
+
vx -m "feat: new feature" -d
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Output:
|
|
129
|
+
```
|
|
130
|
+
š¬ DRY RUN MODE - No changes will be made
|
|
131
|
+
|
|
132
|
+
Would perform the following actions:
|
|
133
|
+
1. Bump minor version
|
|
134
|
+
2. Commit with message: "feat: new feature"
|
|
135
|
+
3. Create git tag with annotation
|
|
136
|
+
4. (Skipping push - use --push to enable)
|
|
137
|
+
|
|
138
|
+
ā Dry run complete. Use without -d to apply changes.
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Custom Versions
|
|
142
|
+
|
|
143
|
+
Set a specific version number (useful for pre-releases):
|
|
144
|
+
|
|
145
|
+
**Bash/PowerShell:**
|
|
146
|
+
```bash
|
|
147
|
+
vx -v 2.0.0-beta.1 -m "beta: initial release candidate"
|
|
148
|
+
vx -v 1.5.0-rc.2 -m "release candidate 2"
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Changelog Generation
|
|
152
|
+
|
|
153
|
+
Automatically update CHANGELOG.md with version history:
|
|
154
|
+
|
|
155
|
+
**Bash/PowerShell:**
|
|
156
|
+
```bash
|
|
157
|
+
vx -m "feat: add user authentication" -c
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Creates/updates CHANGELOG.md:
|
|
161
|
+
```markdown
|
|
162
|
+
# Changelog
|
|
163
|
+
|
|
164
|
+
## [1.2.0] - 2024-02-10
|
|
165
|
+
- feat: add user authentication
|
|
166
|
+
|
|
167
|
+
## [1.1.0] - 2024-02-09
|
|
168
|
+
- feat: add dashboard
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Release Notes
|
|
172
|
+
|
|
173
|
+
Generate a formatted release notes file:
|
|
174
|
+
|
|
175
|
+
**Bash/PowerShell:**
|
|
176
|
+
```bash
|
|
177
|
+
vx -m "feat: major feature release" -r
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Creates `release-notes-v1.2.0.md`:
|
|
181
|
+
```markdown
|
|
182
|
+
# Release v1.2.0
|
|
183
|
+
|
|
184
|
+
Released: 2024-02-10
|
|
185
|
+
|
|
186
|
+
## Changes
|
|
187
|
+
feat: major feature release
|
|
188
|
+
|
|
189
|
+
## Installation
|
|
190
|
+
npm install your-package@1.2.0
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### File Staging Options
|
|
194
|
+
|
|
195
|
+
vnxt offers flexible file staging with the `-a` flag:
|
|
196
|
+
|
|
197
|
+
**Bash/PowerShell:**
|
|
198
|
+
```bash
|
|
199
|
+
# Interactive prompt (asks which mode to use)
|
|
200
|
+
vx -m "chore: update" -a
|
|
201
|
+
|
|
202
|
+
# Specific modes
|
|
203
|
+
vx -m "fix: bug" -a tracked # Stage tracked files only (git add -u)
|
|
204
|
+
vx -m "feat: new" -a all # Stage all changes (git add -A)
|
|
205
|
+
vx -m "refactor: code" -a i # Interactive selection (git add -i)
|
|
206
|
+
vx -m "fix: typo" -a p # Patch mode (git add -p)
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Staging Modes:**
|
|
210
|
+
- `tracked` - Only staged tracked files that have been modified/deleted (default)
|
|
211
|
+
- `all` - Stages all changes, respects `.gitignore` for new files
|
|
212
|
+
- `interactive` or `i` - Opens git's interactive staging mode
|
|
213
|
+
- `patch` or `p` - Opens patch mode for selective staging
|
|
214
|
+
|
|
215
|
+
**Note:** If you run `vx` without any files staged and without the `-a` flag, vnxt will prompt you interactively to choose a staging mode.
|
|
216
|
+
|
|
217
|
+
### Quiet Mode
|
|
218
|
+
|
|
219
|
+
Minimize terminal output for CI/CD environments:
|
|
220
|
+
|
|
221
|
+
**Bash/PowerShell:**
|
|
222
|
+
```bash
|
|
223
|
+
vx -m "feat: new feature" -q
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
In quiet mode:
|
|
227
|
+
- ā
Errors still display
|
|
228
|
+
- ā Progress messages hidden
|
|
229
|
+
- ā Summary stats hidden
|
|
230
|
+
- ā Git diff output hidden
|
|
231
|
+
|
|
232
|
+
Perfect for automated workflows where you only want to see failures.
|
|
233
|
+
|
|
234
|
+
### Check Version
|
|
235
|
+
|
|
236
|
+
Display the installed vnxt version:
|
|
237
|
+
|
|
238
|
+
**Bash/PowerShell:**
|
|
239
|
+
```bash
|
|
240
|
+
vx -V
|
|
241
|
+
# or
|
|
242
|
+
vnxt --version
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Output:
|
|
246
|
+
```
|
|
247
|
+
vnxt v1.8.0
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### npm Publish
|
|
251
|
+
|
|
252
|
+
Trigger an automated npm publish via GitHub Actions using Trusted Publishing (OIDC):
|
|
253
|
+
|
|
254
|
+
**Bash/PowerShell:**
|
|
255
|
+
```bash
|
|
256
|
+
vx -m "feat: new feature" --publish
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
This will:
|
|
260
|
+
1. Bump the version and commit
|
|
261
|
+
2. Push with a standard `v*` tag
|
|
262
|
+
3. Push an additional `publish/v*` tag
|
|
263
|
+
4. GitHub Actions detects the `publish/v*` tag and publishes to npm automatically
|
|
264
|
+
|
|
265
|
+
This means you can batch up multiple changes without publishing to npm each time:
|
|
266
|
+
```bash
|
|
267
|
+
vx -m "feat: add something" # bump only
|
|
268
|
+
vx -m "fix: fix something" # bump only
|
|
269
|
+
vx -m "feat: final thing" --publish # bump + publish everything
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Note:** `--publish` implies `--push`, so `-p` is not required.
|
|
273
|
+
|
|
274
|
+
### Custom Tag Prefix
|
|
275
|
+
|
|
276
|
+
Control the prefix used for git tags via `.vnxtrc.json`:
|
|
277
|
+
|
|
278
|
+
```json
|
|
279
|
+
{
|
|
280
|
+
"tagPrefix": "v"
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Options:**
|
|
285
|
+
- `"v"` ā `v1.8.0` (default)
|
|
286
|
+
- `""` ā `1.8.0` (no prefix)
|
|
287
|
+
- `"release-"` ā `release-1.8.0` (useful in monorepos)
|
|
288
|
+
|
|
289
|
+
### Complete Workflow Example
|
|
290
|
+
|
|
291
|
+
**Bash/PowerShell:**
|
|
292
|
+
```bash
|
|
293
|
+
# Make changes to your code
|
|
294
|
+
# ...
|
|
295
|
+
|
|
296
|
+
# Dry run to preview
|
|
297
|
+
vx -m "feat: add new API endpoint" -d
|
|
298
|
+
|
|
299
|
+
# Execute with changelog, release notes, and push
|
|
300
|
+
vx -m "feat: add new API endpoint" -c -r -p
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Configuration
|
|
304
|
+
|
|
305
|
+
Create a `.vnxtrc.json` file in your project root to set defaults:
|
|
306
|
+
```json
|
|
307
|
+
{
|
|
308
|
+
"autoChangelog": true,
|
|
309
|
+
"defaultType": "patch",
|
|
310
|
+
"requireCleanWorkingDir": false,
|
|
311
|
+
"autoPush": true,
|
|
312
|
+
"defaultStageMode": "tracked",
|
|
313
|
+
"tagPrefix": "v",
|
|
314
|
+
"colors": true
|
|
315
|
+
}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### Configuration Options
|
|
319
|
+
|
|
320
|
+
| Option | Type | Default | Description |
|
|
321
|
+
|--------|------|---------|-------------|
|
|
322
|
+
| `autoChangelog` | boolean | `true` | Automatically update CHANGELOG.md on every bump |
|
|
323
|
+
| `defaultType` | string | `"patch"` | Default version bump type if not auto-detected |
|
|
324
|
+
| `requireCleanWorkingDir` | boolean | `false` | Require clean git working directory before bumping |
|
|
325
|
+
| `autoPush` | boolean | `true` | Automatically push to remote after bumping |
|
|
326
|
+
| `defaultStageMode` | string | `"tracked"` | Default staging mode when using `-a` flag |
|
|
327
|
+
| `tagPrefix` | string | `"v"` | Prefix for git tags (e.g., "v1.2.3") |
|
|
328
|
+
| `colors` | boolean | `true` | Enable colored terminal output |
|
|
329
|
+
|
|
330
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Pre-flight Checks
|
|
331
|
+
|
|
332
|
+
vnxt performs several checks before making changes:
|
|
333
|
+
|
|
334
|
+
- ā
Verifies no uncommitted changes (unless using `-a`)
|
|
335
|
+
- ā
Warns if not on main/master branch
|
|
336
|
+
- ā
Checks for remote repository (if pushing)
|
|
337
|
+
|
|
338
|
+
Example output:
|
|
339
|
+
```
|
|
340
|
+
š Running pre-flight checks...
|
|
341
|
+
|
|
342
|
+
ā ļø Warning: You're on branch 'feature/new-dashboard', not main/master
|
|
343
|
+
ā
Pre-flight checks passed
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
## Interactive Mode
|
|
347
|
+
|
|
348
|
+
Run `vnxt` (or `vx`) without arguments for guided prompts:
|
|
349
|
+
|
|
350
|
+
**Bash/PowerShell:**
|
|
351
|
+
```bash
|
|
352
|
+
vx
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Output:
|
|
356
|
+
```
|
|
357
|
+
š¤ Interactive mode
|
|
358
|
+
|
|
359
|
+
Commit message: feat: add new feature
|
|
360
|
+
Version type (patch/minor/major) [patch]: minor
|
|
361
|
+
|
|
362
|
+
š Auto-detected: minor version bump (feature)
|
|
363
|
+
|
|
364
|
+
š Running pre-flight checks...
|
|
365
|
+
...
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Workflow Examples
|
|
369
|
+
|
|
370
|
+
### Quick Fix
|
|
371
|
+
|
|
372
|
+
**Bash/PowerShell:**
|
|
373
|
+
```bash
|
|
374
|
+
vx -m "fix: resolve login bug"
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Feature Release
|
|
378
|
+
|
|
379
|
+
**Bash/PowerShell:**
|
|
380
|
+
```bash
|
|
381
|
+
vx -m "feat: add dashboard analytics" -c -p
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Major Release with Full Documentation
|
|
385
|
+
|
|
386
|
+
**Bash/PowerShell:**
|
|
387
|
+
```bash
|
|
388
|
+
vx -m "BREAKING: new API structure" -c -r -p
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Local Development (No Push)
|
|
392
|
+
|
|
393
|
+
**Bash/PowerShell:**
|
|
394
|
+
```bash
|
|
395
|
+
vx -m "chore: refactor code" -a
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### CI/CD Pipeline
|
|
399
|
+
|
|
400
|
+
**Bash/PowerShell:**
|
|
401
|
+
```bash
|
|
402
|
+
# Quiet mode - only shows errors
|
|
403
|
+
vx -m "chore: automated update" -q
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Publish to npm
|
|
407
|
+
|
|
408
|
+
**Bash/PowerShell:**
|
|
409
|
+
```bash
|
|
410
|
+
# Batch changes then publish when ready
|
|
411
|
+
vx -m "feat: add feature one"
|
|
412
|
+
vx -m "fix: fix something"
|
|
413
|
+
vx -m "feat: final feature" --publish
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### Check Installed Version
|
|
417
|
+
|
|
418
|
+
**Bash/PowerShell:**
|
|
419
|
+
```bash
|
|
420
|
+
vx -V
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Troubleshooting
|
|
424
|
+
|
|
425
|
+
### Not a Git Repository
|
|
426
|
+
|
|
427
|
+
If you see this error:
|
|
428
|
+
```
|
|
429
|
+
ā Not a git repository. Run `git init` first.
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
You're trying to use vnxt in a directory that isn't a git repository. Initialize git first:
|
|
433
|
+
|
|
434
|
+
**Bash/PowerShell:**
|
|
435
|
+
```bash
|
|
436
|
+
git init
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Permission Denied (Windows PowerShell)
|
|
440
|
+
|
|
441
|
+
If you get execution policy errors:
|
|
442
|
+
```powershell
|
|
443
|
+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
### Uncommitted Changes Error
|
|
447
|
+
|
|
448
|
+
Either commit your changes first, or use the `-a` flag to stage all changes:
|
|
449
|
+
|
|
450
|
+
**Bash/PowerShell:**
|
|
451
|
+
```bash
|
|
452
|
+
vx -m "your message" -a
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### Command Not Found After Installation
|
|
456
|
+
|
|
457
|
+
Make sure npm's global bin directory is in your PATH:
|
|
458
|
+
|
|
459
|
+
**Bash:**
|
|
460
|
+
```bash
|
|
461
|
+
npm config get prefix
|
|
462
|
+
# Add the bin subdirectory to your PATH
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
**PowerShell:**
|
|
466
|
+
```powershell
|
|
467
|
+
npm config get prefix
|
|
468
|
+
# Add the bin subdirectory to your PATH in System Environment Variables
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Requirements
|
|
472
|
+
|
|
473
|
+
- Node.js 12.x or higher
|
|
474
|
+
- npm 6.x or higher
|
|
475
|
+
- Git installed and configured
|
|
476
|
+
|
|
477
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Version Management
|
|
478
|
+
|
|
479
|
+
This project uses [vnxt](https://vnxt.dev) for version bumping with the following configuration:
|
|
480
|
+
|
|
481
|
+
- Auto-push enabled (`autoPush: true`)
|
|
482
|
+
- Auto-changelog enabled (`autoChangelog: true`)
|
|
483
|
+
- Clean working directory not required (`requireCleanWorkingDir: false`)
|
|
484
|
+
|
|
485
|
+
See `.vnxtrc.json` for full configuration.
|
|
486
|
+
|
|
487
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Author
|
|
488
|
+
|
|
489
|
+
Nate Orrow - Software Developer
|
|
490
|
+
|
|
491
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> License
|
|
492
|
+
|
|
493
|
+
MIT License - see [LICENSE](LICENSE) file for details
|
|
494
|
+
|
|
495
|
+
## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Contributing
|
|
496
|
+
|
|
497
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
498
|
+
|
|
499
|
+
1. Fork the repository
|
|
500
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
501
|
+
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
|
|
502
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
452
503
|
5. Open a Pull Request
|
package/package.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vnxt",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Version incrementation CLI tool with built in git commit, push and changelog generation",
|
|
5
|
-
"main": "vnxt.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"vnxt": "
|
|
8
|
-
"vx": "
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"test": "jest",
|
|
12
|
-
"release": "vnxt -m 'release' -c -p"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
"version",
|
|
16
|
-
"bump",
|
|
17
|
-
"semver",
|
|
18
|
-
"git",
|
|
19
|
-
"changelog",
|
|
20
|
-
"cli",
|
|
21
|
-
"release",
|
|
22
|
-
"npm"
|
|
23
|
-
],
|
|
24
|
-
"author": "Nate Orrow | Nate@Orrow.uk",
|
|
25
|
-
"license": "MIT",
|
|
26
|
-
"repository": {
|
|
27
|
-
"type": "git",
|
|
28
|
-
"url": "https://github.com/n-orrow/vnxt.git"
|
|
29
|
-
},
|
|
30
|
-
"bugs": {
|
|
31
|
-
"url": "https://github.com/n-orrow/vnxt/issues"
|
|
32
|
-
},
|
|
33
|
-
"homepage": "https://vnxt.dev",
|
|
34
|
-
"engines": {
|
|
35
|
-
"node": ">=12.0.0"
|
|
36
|
-
},
|
|
37
|
-
"files": [
|
|
38
|
-
"vnxt.js",
|
|
39
|
-
".vnxtrc.json",
|
|
40
|
-
"README.md",
|
|
41
|
-
"LICENSE"
|
|
42
|
-
],
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"jest": "^29.7.0"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vnxt",
|
|
3
|
+
"version": "1.9.0",
|
|
4
|
+
"description": "Version incrementation CLI tool with built in git commit, push and changelog generation",
|
|
5
|
+
"main": "vnxt.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"vnxt": "vnxt.js",
|
|
8
|
+
"vx": "vnxt.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "jest",
|
|
12
|
+
"release": "vnxt -m 'release' -c -p"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"version",
|
|
16
|
+
"bump",
|
|
17
|
+
"semver",
|
|
18
|
+
"git",
|
|
19
|
+
"changelog",
|
|
20
|
+
"cli",
|
|
21
|
+
"release",
|
|
22
|
+
"npm"
|
|
23
|
+
],
|
|
24
|
+
"author": "Nate Orrow | Nate@Orrow.uk",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/n-orrow/vnxt.git"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/n-orrow/vnxt/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://vnxt.dev",
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=12.0.0"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"vnxt.js",
|
|
39
|
+
".vnxtrc.json",
|
|
40
|
+
"README.md",
|
|
41
|
+
"LICENSE"
|
|
42
|
+
],
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"jest": "^29.7.0"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/vnxt.js
CHANGED
|
@@ -9,7 +9,7 @@ const colors = {
|
|
|
9
9
|
reset: '\x1b[0m',
|
|
10
10
|
bright: '\x1b[1m',
|
|
11
11
|
dim: '\x1b[2m',
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
// Foreground colors
|
|
14
14
|
red: '\x1b[31m',
|
|
15
15
|
green: '\x1b[32m',
|
|
@@ -97,7 +97,8 @@ let type = getFlag('--type', '-t') || config.defaultType;
|
|
|
97
97
|
let customVersion = getFlag('--version', '-v');
|
|
98
98
|
let dryRun = hasFlag('--dry-run', '-d');
|
|
99
99
|
let noPush = hasFlag('--no-push', '-dnp');
|
|
100
|
-
let
|
|
100
|
+
let publishToNpm = hasFlag('--publish');
|
|
101
|
+
let push = noPush ? false : (hasFlag('--push', '-p') || publishToNpm || config.autoPush);
|
|
101
102
|
let generateChangelog = hasFlag('--changelog', '-c') || config.autoChangelog;
|
|
102
103
|
const addAllFlag = getFlag('--all', '-a');
|
|
103
104
|
let addMode = null;
|
|
@@ -196,6 +197,22 @@ async function main() {
|
|
|
196
197
|
process.exit(1);
|
|
197
198
|
}
|
|
198
199
|
|
|
200
|
+
// AUTO-REQUIRE RELEASE NOTES for --publish
|
|
201
|
+
let releaseNotesContext = '';
|
|
202
|
+
const requireReleaseNotes = !generateReleaseNotes && publishToNpm;
|
|
203
|
+
if (requireReleaseNotes) {
|
|
204
|
+
generateReleaseNotes = true;
|
|
205
|
+
if (!quietMode) {
|
|
206
|
+
log(`\nš Release notes required for --publish.`, 'yellow');
|
|
207
|
+
releaseNotesContext = await prompt(' Add context (press Enter to skip): ');
|
|
208
|
+
if (releaseNotesContext) log('');
|
|
209
|
+
}
|
|
210
|
+
} else if (generateReleaseNotes && !quietMode) {
|
|
211
|
+
// -r flag was passed explicitly - still offer context prompt
|
|
212
|
+
releaseNotesContext = await prompt('\nš Add context to release notes (press Enter to skip): ');
|
|
213
|
+
if (releaseNotesContext) log('');
|
|
214
|
+
}
|
|
215
|
+
|
|
199
216
|
// PRE-FLIGHT CHECKS
|
|
200
217
|
log('\nš Running pre-flight checks...\n', 'cyan');
|
|
201
218
|
|
|
@@ -364,12 +381,24 @@ async function main() {
|
|
|
364
381
|
// GENERATE RELEASE NOTES
|
|
365
382
|
if (generateReleaseNotes) {
|
|
366
383
|
log('š Generating release notes...', 'cyan');
|
|
384
|
+
|
|
385
|
+
const date = new Date();
|
|
386
|
+
const timestamp = date.toISOString().replace('T', ' ').split('.')[0] + ' UTC';
|
|
387
|
+
const dateShort = date.toISOString().split('T')[0];
|
|
388
|
+
|
|
389
|
+
let author = '';
|
|
390
|
+
try {
|
|
391
|
+
author = execSync('git config user.name', {stdio: 'pipe'}).toString().trim();
|
|
392
|
+
} catch {
|
|
393
|
+
author = '';
|
|
394
|
+
}
|
|
395
|
+
|
|
367
396
|
const releaseNotes = `# Release ${config.tagPrefix}${newVersion}
|
|
368
397
|
|
|
369
|
-
Released: ${
|
|
398
|
+
Released: ${dateShort} at ${timestamp.split(' ')[1]}${author ? `\nAuthor: ${author}` : ''}
|
|
370
399
|
|
|
371
400
|
## Changes
|
|
372
|
-
${message}
|
|
401
|
+
${message}${releaseNotesContext ? `\n\n## Release Notes\n${releaseNotesContext}` : ''}
|
|
373
402
|
|
|
374
403
|
## Installation
|
|
375
404
|
\`\`\`bash
|
|
@@ -389,6 +418,14 @@ See [CHANGELOG.md](./CHANGELOG.md) for complete version history.
|
|
|
389
418
|
if (push) {
|
|
390
419
|
log('š Pushing to remote...', 'cyan');
|
|
391
420
|
execSync('git push --follow-tags', {stdio: quietMode ? 'pipe' : 'inherit'});
|
|
421
|
+
|
|
422
|
+
// If --publish flag, also push a publish/v* tag to trigger npm workflow
|
|
423
|
+
if (publishToNpm) {
|
|
424
|
+
log('š¦ Pushing publish tag to trigger npm release...', 'cyan');
|
|
425
|
+
const publishTag = `publish/${config.tagPrefix}${newVersion}`;
|
|
426
|
+
execSync(`git tag ${publishTag}`, {stdio: 'pipe'});
|
|
427
|
+
execSync(`git push origin ${publishTag}`, {stdio: quietMode ? 'pipe' : 'inherit'});
|
|
428
|
+
}
|
|
392
429
|
}
|
|
393
430
|
|
|
394
431
|
// STATS/SUMMARY
|
|
@@ -410,6 +447,9 @@ See [CHANGELOG.md](./CHANGELOG.md) for complete version history.
|
|
|
410
447
|
|
|
411
448
|
if (push) {
|
|
412
449
|
log(`š Remote: Pushed with tags`, 'green');
|
|
450
|
+
if (publishToNpm) {
|
|
451
|
+
log(`š¦ npm: Publishing triggered (publish/${config.tagPrefix}${newVersion})`, 'green');
|
|
452
|
+
}
|
|
413
453
|
} else {
|
|
414
454
|
log(`š Remote: Not pushed (use --push to enable)`, 'gray');
|
|
415
455
|
}
|
|
@@ -446,6 +486,7 @@ Options:
|
|
|
446
486
|
-V, --version Show vnxt version
|
|
447
487
|
-p, --push Push to remote with tags
|
|
448
488
|
-dnp, --no-push Prevent auto-push (overrides config)
|
|
489
|
+
--publish Push and trigger npm publish via GitHub Actions
|
|
449
490
|
-c, --changelog Update CHANGELOG.md
|
|
450
491
|
-d, --dry-run Show what would happen without making changes
|
|
451
492
|
-a, --all [mode] Stage files before versioning
|
|
@@ -488,10 +529,11 @@ Examples:
|
|
|
488
529
|
vx -m "fix: bug" -a i # Interactive git add
|
|
489
530
|
vx -m "fix: bug" -a p # Patch mode
|
|
490
531
|
vx -m "fix: bug" -q # Quiet mode (minimal output)
|
|
532
|
+
vx -m "feat: new feature" --publish # Bump, push and trigger npm publish
|
|
491
533
|
vx # Interactive mode
|
|
492
534
|
`);
|
|
493
535
|
process.exit(0);
|
|
494
536
|
}
|
|
495
537
|
|
|
496
538
|
// Run main function
|
|
497
|
-
main();
|
|
539
|
+
main();
|