@@ -8,14 +8,68 @@ This project follows semantic versioning. While still in major version `0`,
8
8
source-stability is only guaranteed within minor versions (e.g. between
9
9
` 0.0.3 ` and ` 0.0.4 ` ). If you want to guard against potentially source-breaking
10
10
package updates, you can specify your package dependency using
11
- ` .upToNextMinor(from: "0.3 .0") ` as the requirement.
11
+ ` .upToNextMinor(from: "0.4 .0") ` as the requirement.
12
12
13
13
## [ Unreleased]
14
14
15
15
* No changes yet.*
16
16
17
17
---
18
18
19
+ ## [ 0.4.0] - 2021-03-04
20
+
21
+ ### Additions
22
+
23
+ - Short options can now support "joined option" syntax, which lets users specify
24
+ a value appended immediately after the option's short name. For example, in
25
+ addition to calling this ` example ` command with ` -D debug ` and ` -D=debug ` ,
26
+ users can now write ` -Ddebug ` for the same parsed value. ([ #240 ] )
27
+
28
+ ``` swift
29
+ @main
30
+ struct Example : ParsableCommand {
31
+ @Option (name: .customShort (" D" , allowingJoined : true ))
32
+ var debugValue: String
33
+
34
+ func run () {
35
+ print (debugValue)
36
+ }
37
+ }
38
+ ```
39
+
40
+ ### Changes
41
+
42
+ - The ` CommandConfiguration.helpNames ` property is now optional, to allow the
43
+ overridden help flags of parent commands to flow down to their children. Most
44
+ existing code should not be affected, but if you've customized a command's
45
+ help flags you may see different behavior. ([ #251 ] )
46
+ - The ` errorCode ` property is no longer used as a command's exit code when
47
+ ` CustomNSError ` types are thrown. ([ #276 ] )
48
+
49
+ * Migration:* Instead of throwing a ` CustomNSError ` type, print your error
50
+ manually and throw an ` ExitCode ` error to customize your command's exit code.
51
+
52
+ ### Removals
53
+
54
+ - Old, deprecated property wrapper initializers have been removed.
55
+
56
+ ### Fixes
57
+
58
+ - Validation errors now show the correct help flags when help flags have been
59
+ customized.
60
+ - Options, flags, and arguments that are marked as hidden from the help screen
61
+ are also suppressed from completion scripts.
62
+ - Non-parsed variable properties are now allowed in parsable types.
63
+ - Error messages produced when ` NSError ` types are thrown have been improved.
64
+ - The usage line for commands with a large number of options includes more
65
+ detail about required flags and positional arguments.
66
+ - Support for CMake builds on Apple Silicon is improved.
67
+
68
+ The 0.4.0 release includes contributions from [ CodaFi] , [ lorentey] ,
69
+ [ natecook1000] , [ schlagelk] , and [ Zoha131] . Thank you!
70
+
71
+ ---
72
+
19
73
## [ 0.3.2] - 2021-01-15
20
74
21
75
### Fixes
@@ -34,8 +88,6 @@ The 0.3.2 release includes contributions from [compnerd], [CypherPoet],
34
88
[ damuellen] , [ drewmccormack] , [ elliottwilliams] , [ gmittert] , [ MaxDesiatov] ,
35
89
[ natecook1000] , [ pegasuze] , and [ SergeyPetrachkov] . Thank you!
36
90
37
- ---
38
-
39
91
## [ 0.3.1] - 2020-09-02
40
92
41
93
### Fixes
@@ -51,8 +103,6 @@ The 0.3.2 release includes contributions from [compnerd], [CypherPoet],
51
103
52
104
- Parsing performance improvements.
53
105
54
- ---
55
-
56
106
## [ 0.3.0] - 2020-08-15
57
107
58
108
### Additions
@@ -79,6 +129,8 @@ The 0.3.2 release includes contributions from [compnerd], [CypherPoet],
79
129
The 0.3.0 release includes contributions from [ dduan] , [ MPLew-is] ,
80
130
[ natecook1000] , and [ thomasvl] . Thank you!
81
131
132
+ ---
133
+
82
134
## [ 0.2.2] - 2020-08-05
83
135
84
136
### Fixes
@@ -160,6 +212,8 @@ The 0.2.0 release includes contributions from [artemnovichkov], [compnerd],
160
212
[ ibrahimoktay] , [ john-mueller] , [ MPLew-is] , [ natecook1000] , and [ owenv] .
161
213
Thank you!
162
214
215
+ ---
216
+
163
217
## [ 0.1.0] - 2020-06-03
164
218
165
219
### Additions
@@ -217,6 +271,8 @@ Thank you!
217
271
The 0.1.0 release includes contributions from [ aleksey-mashanov] , [ BradLarson] ,
218
272
[ compnerd] , [ erica] , [ ibrahimoktay] , and [ natecook1000] . Thank you!
219
273
274
+ ---
275
+
220
276
## [ 0.0.6] - 2020-05-14
221
277
222
278
### Additions
@@ -366,7 +422,8 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
366
422
367
423
<!-- Link references for releases -->
368
424
369
- [ Unreleased ] : https://github.com/apple/swift-argument-parser/compare/0.3.2...HEAD
425
+ [ Unreleased ] : https://github.com/apple/swift-argument-parser/compare/0.4.0...HEAD
426
+ [ 0.4.0 ] : https://github.com/apple/swift-argument-parser/compare/0.3.2...0.4.0
370
427
[ 0.3.2 ] : https://github.com/apple/swift-argument-parser/compare/0.3.1...0.3.2
371
428
[ 0.3.1 ] : https://github.com/apple/swift-argument-parser/compare/0.3.0...0.3.1
372
429
[ 0.3.0 ] : https://github.com/apple/swift-argument-parser/compare/0.2.2...0.3.0
@@ -384,7 +441,10 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
384
441
<!-- Link references for pull requests -->
385
442
386
443
[ #65 ] : https://github.com/apple/swift-argument-parser/pull/65
444
+ [ #240 ] : https://github.com/apple/swift-argument-parser/pull/240
445
+ [ #251 ] : https://github.com/apple/swift-argument-parser/pull/251
387
446
[ #256 ] : https://github.com/apple/swift-argument-parser/pull/256
447
+ [ #276 ] : https://github.com/apple/swift-argument-parser/pull/276
388
448
389
449
<!-- Link references for contributors -->
390
450
@@ -393,6 +453,7 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
393
453
[ artemnovichkov ] : https://github.com/apple/swift-argument-parser/commits?author=artemnovichkov
394
454
[ BradLarson ] : https://github.com/apple/swift-argument-parser/commits?author=BradLarson
395
455
[ buttaface ] : https://github.com/apple/swift-argument-parser/commits?author=buttaface
456
+ [ CodaFi ] : https://github.com/apple/swift-argument-parser/commits?author=CodaFi
396
457
[ compnerd ] : https://github.com/apple/swift-argument-parser/commits?author=compnerd
397
458
[ CypherPoet ] : https://github.com/apple/swift-argument-parser/commits?author=CypherPoet
398
459
[ damuellen ] : https://github.com/apple/swift-argument-parser/commits?author=damuellen
@@ -412,6 +473,7 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
412
473
[ kennyyork ] : https://github.com/apple/swift-argument-parser/commits?author=kennyyork
413
474
[ klaaspieter ] : https://github.com/apple/swift-argument-parser/commits?author=klaaspieter
414
475
[ Lantua ] : https://github.com/apple/swift-argument-parser/commits?author=Lantua
476
+ [ lorentey ] : https://github.com/apple/swift-argument-parser/commits?author=lorentey
415
477
[ MaxDesiatov ] : https://github.com/apple/swift-argument-parser/commits?author=MaxDesiatov
416
478
[ miguelangel-dev ] : https://github.com/apple/swift-argument-parser/commits?author=miguelangel-dev
417
479
[ MPLew-is ] : https://github.com/apple/swift-argument-parser/commits?author=MPLew-is
@@ -433,3 +495,4 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
433
495
[ Wildchild9 ] : https://github.com/apple/swift-argument-parser/commits?author=Wildchild9
434
496
[ YuAo ] : https://github.com/apple/swift-argument-parser/commits?author=YuAo
435
497
[ zntfdr ] : https://github.com/apple/swift-argument-parser/commits?author=zntfdr
498
+ [ Zoha131 ] : https://github.com/apple/swift-argument-parser/commits?author=Zoha131
0 commit comments