Skip to content

Commit fddd1c0

Browse files
authored
Update changelog for 1.2.0 release (#518)
Update changelog for 1.2.0 release and update README code sample for latest version Resolves #500.
1 parent 5535a95 commit fddd1c0

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
.*.sw?
88
*.docc-build
99
*.vs
10+
Package.resolved

CHANGELOG.md

+67-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,58 @@ Add new items at the end of the relevant section under **Unreleased**.
1010

1111
---
1212

13+
## [1.2.0] - 2022-11-08
14+
15+
### Additions
16+
17+
- You can now provide a title in an `@OptionGroup` declaration. Titled option
18+
groups are listed separately in the help screen under that title as a
19+
heading. ([#492])
20+
- Two new parsing strategies have been added for `@Argument` array properties:
21+
22+
- `.allUnrecognized` captures all unrecognized inputs after parsing known
23+
flags, options, and arguments.
24+
- `.postTerminator` collects any inputs that follow the `--` terminator.
25+
26+
See the [`ArgumentArrayParsingStrategy` documentation][arrayparse-docs] for
27+
more. ([#496])
28+
- Default values are now supported for `@Argument` or `@Option` properties with
29+
optional type, allowing you to initialize those properties with `nil`.
30+
Providing a non-`nil` default value results in a warning, since optional
31+
properties with non-`nil` defaults don't need to be declared as optionals.
32+
([#477], [#480])
33+
34+
### Changes
35+
36+
- The `.unconditionalRemaining` array parsing strategy has been deprecated and
37+
renamed to `.captureForPassthrough`, to better fit its semantic behavior and
38+
intended usage. See the [`ArgumentArrayParsingStrategy`
39+
documentation][arrayparse-docs] for more. ([#496])
40+
41+
### Fixes
42+
43+
- Invalid `init(from:)` decoding initializers are now correctly diagnosed by
44+
ArgumentParser's validators. ([#487])
45+
- Default values are now correctly displayed as flags for `@Flag` properties
46+
with inversions or `EnumerableFlag` types. ([#486])
47+
- The help display for non-string-backed raw representable types has been
48+
corrected to not show raw Swift values. Instead, the help display uses the
49+
type's customized `defaultValueDescription` and `allValues` implementations.
50+
([#494])
51+
- Properties at different levels of a command hierarchy with the same Swift name
52+
but different argument names no longer collide. ([#495])
53+
- The `generate-manual` plugin name is improved when used from within Xcode.
54+
([#505])
55+
- Documentation fixes and improvements.
56+
57+
The 1.2.0 release includes contributions from [allevato], [clayellis],
58+
[compnerd], [d-ronnqvist], [natecook1000], [randomeizer], and [rauhul].
59+
Thank you!
60+
61+
[arrayparse-docs]: https://apple.github.io/swift-argument-parser/documentation/argumentparser/argumentarrayparsingstrategy
62+
63+
---
64+
1365
## [1.1.4] - 2022-08-26
1466

1567
### Changes
@@ -691,7 +743,8 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
691743

692744
<!-- Link references for releases -->
693745

694-
[Unreleased]: https://github.com/apple/swift-argument-parser/compare/1.1.4...HEAD
746+
[Unreleased]: https://github.com/apple/swift-argument-parser/compare/1.2.0...HEAD
747+
[1.2.0]: https://github.com/apple/swift-argument-parser/compare/1.1.4...1.2.0
695748
[1.1.4]: https://github.com/apple/swift-argument-parser/compare/1.1.3...1.1.4
696749
[1.1.3]: https://github.com/apple/swift-argument-parser/compare/1.1.2...1.1.3
697750
[1.1.2]: https://github.com/apple/swift-argument-parser/compare/1.1.1...1.1.2
@@ -763,21 +816,33 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
763816
[#474]: https://github.com/apple/swift-argument-parser/pull/474
764817
[#475]: https://github.com/apple/swift-argument-parser/pull/475
765818
[#476]: https://github.com/apple/swift-argument-parser/pull/476
819+
[#477]: https://github.com/apple/swift-argument-parser/pull/477
820+
[#480]: https://github.com/apple/swift-argument-parser/pull/480
821+
[#486]: https://github.com/apple/swift-argument-parser/pull/486
822+
[#487]: https://github.com/apple/swift-argument-parser/pull/487
823+
[#492]: https://github.com/apple/swift-argument-parser/pull/492
824+
[#494]: https://github.com/apple/swift-argument-parser/pull/494
825+
[#495]: https://github.com/apple/swift-argument-parser/pull/495
826+
[#496]: https://github.com/apple/swift-argument-parser/pull/496
827+
[#505]: https://github.com/apple/swift-argument-parser/pull/505
766828

767829
<!-- Link references for contributors -->
768830

769831
[3405691582]: https://github.com/apple/swift-argument-parser/commits?author=3405691582
770832
[adellibovi]: https://github.com/apple/swift-argument-parser/commits?author=adellibovi
771833
[aleksey-mashanov]: https://github.com/apple/swift-argument-parser/commits?author=aleksey-mashanov
772834
[AliSoftware]: https://github.com/apple/swift-argument-parser/commits?author=AliSoftware
835+
[allevato]: https://github.com/apple/swift-argument-parser/commits?author=allevato
773836
[artemnovichkov]: https://github.com/apple/swift-argument-parser/commits?author=artemnovichkov
774837
[atierian]: https://github.com/apple/swift-argument-parser/commits?author=atierian
775838
[BradLarson]: https://github.com/apple/swift-argument-parser/commits?author=BradLarson
776839
[buttaface]: https://github.com/apple/swift-argument-parser/commits?author=buttaface
840+
[clayellis]: https://github.com/apple/swift-argument-parser/commits?author=clayellis
777841
[CodaFi]: https://github.com/apple/swift-argument-parser/commits?author=CodaFi
778842
[compnerd]: https://github.com/apple/swift-argument-parser/commits?author=compnerd
779843
[CraigSiemens]: https://github.com/apple/swift-argument-parser/commits?author=CraigSiemens
780844
[CypherPoet]: https://github.com/apple/swift-argument-parser/commits?author=CypherPoet
845+
[d-ronnqvist]: https://github.com/apple/swift-argument-parser/commits?author=d-ronnqvist
781846
[damuellen]: https://github.com/apple/swift-argument-parser/commits?author=damuellen
782847
[dduan]: https://github.com/apple/swift-argument-parser/commits?author=dduan
783848
[dirtyhabits97]: https://github.com/apple/swift-argument-parser/commits?author=dirtyhabits97
@@ -820,6 +885,7 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
820885
[NicFontana]: https://github.com/apple/swift-argument-parser/commits?author=NicFontana
821886
[owenv]: https://github.com/apple/swift-argument-parser/commits?author=owenv
822887
[pegasuze]: https://github.com/apple/swift-argument-parser/commits?author=pegasuze
888+
[randomeizer]: https://github.com/apple/swift-argument-parser/commits?author=randomeizer
823889
[rauhul]: https://github.com/apple/swift-argument-parser/commits?author=rauhul
824890
[rjstelling]: https://github.com/apple/swift-argument-parser/commits?author=rjstelling
825891
[Sajjon]: https://github.com/apple/swift-argument-parser/commits?author=Sajjon

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct Repeat: ParsableCommand {
1717
var includeCounter = false
1818

1919
@Option(name: .shortAndLong, help: "The number of times to repeat 'phrase'.")
20-
var count: Int?
20+
var count: Int? = nil
2121

2222
@Argument(help: "The phrase to repeat.")
2323
var phrase: String

0 commit comments

Comments
 (0)