Skip to content

Commit

Permalink
Update changelog for 1.2.0 release (#518)
Browse files Browse the repository at this point in the history
Update changelog for 1.2.0 release and
update README code sample for latest version

Resolves #500.
  • Loading branch information
natecook1000 authored Nov 8, 2022
1 parent 5535a95 commit fddd1c0
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
.*.sw?
*.docc-build
*.vs
Package.resolved
68 changes: 67 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,58 @@ Add new items at the end of the relevant section under **Unreleased**.

---

## [1.2.0] - 2022-11-08

### Additions

- You can now provide a title in an `@OptionGroup` declaration. Titled option
groups are listed separately in the help screen under that title as a
heading. ([#492])
- Two new parsing strategies have been added for `@Argument` array properties:

- `.allUnrecognized` captures all unrecognized inputs after parsing known
flags, options, and arguments.
- `.postTerminator` collects any inputs that follow the `--` terminator.

See the [`ArgumentArrayParsingStrategy` documentation][arrayparse-docs] for
more. ([#496])
- Default values are now supported for `@Argument` or `@Option` properties with
optional type, allowing you to initialize those properties with `nil`.
Providing a non-`nil` default value results in a warning, since optional
properties with non-`nil` defaults don't need to be declared as optionals.
([#477], [#480])

### Changes

- The `.unconditionalRemaining` array parsing strategy has been deprecated and
renamed to `.captureForPassthrough`, to better fit its semantic behavior and
intended usage. See the [`ArgumentArrayParsingStrategy`
documentation][arrayparse-docs] for more. ([#496])

### Fixes

- Invalid `init(from:)` decoding initializers are now correctly diagnosed by
ArgumentParser's validators. ([#487])
- Default values are now correctly displayed as flags for `@Flag` properties
with inversions or `EnumerableFlag` types. ([#486])
- The help display for non-string-backed raw representable types has been
corrected to not show raw Swift values. Instead, the help display uses the
type's customized `defaultValueDescription` and `allValues` implementations.
([#494])
- Properties at different levels of a command hierarchy with the same Swift name
but different argument names no longer collide. ([#495])
- The `generate-manual` plugin name is improved when used from within Xcode.
([#505])
- Documentation fixes and improvements.

The 1.2.0 release includes contributions from [allevato], [clayellis],
[compnerd], [d-ronnqvist], [natecook1000], [randomeizer], and [rauhul].
Thank you!

[arrayparse-docs]: https://apple.github.io/swift-argument-parser/documentation/argumentparser/argumentarrayparsingstrategy

---

## [1.1.4] - 2022-08-26

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

<!-- Link references for releases -->

[Unreleased]: https://github.com/apple/swift-argument-parser/compare/1.1.4...HEAD
[Unreleased]: https://github.com/apple/swift-argument-parser/compare/1.2.0...HEAD
[1.2.0]: https://github.com/apple/swift-argument-parser/compare/1.1.4...1.2.0
[1.1.4]: https://github.com/apple/swift-argument-parser/compare/1.1.3...1.1.4
[1.1.3]: https://github.com/apple/swift-argument-parser/compare/1.1.2...1.1.3
[1.1.2]: https://github.com/apple/swift-argument-parser/compare/1.1.1...1.1.2
Expand Down Expand Up @@ -763,21 +816,33 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
[#474]: https://github.com/apple/swift-argument-parser/pull/474
[#475]: https://github.com/apple/swift-argument-parser/pull/475
[#476]: https://github.com/apple/swift-argument-parser/pull/476
[#477]: https://github.com/apple/swift-argument-parser/pull/477
[#480]: https://github.com/apple/swift-argument-parser/pull/480
[#486]: https://github.com/apple/swift-argument-parser/pull/486
[#487]: https://github.com/apple/swift-argument-parser/pull/487
[#492]: https://github.com/apple/swift-argument-parser/pull/492
[#494]: https://github.com/apple/swift-argument-parser/pull/494
[#495]: https://github.com/apple/swift-argument-parser/pull/495
[#496]: https://github.com/apple/swift-argument-parser/pull/496
[#505]: https://github.com/apple/swift-argument-parser/pull/505

<!-- Link references for contributors -->

[3405691582]: https://github.com/apple/swift-argument-parser/commits?author=3405691582
[adellibovi]: https://github.com/apple/swift-argument-parser/commits?author=adellibovi
[aleksey-mashanov]: https://github.com/apple/swift-argument-parser/commits?author=aleksey-mashanov
[AliSoftware]: https://github.com/apple/swift-argument-parser/commits?author=AliSoftware
[allevato]: https://github.com/apple/swift-argument-parser/commits?author=allevato
[artemnovichkov]: https://github.com/apple/swift-argument-parser/commits?author=artemnovichkov
[atierian]: https://github.com/apple/swift-argument-parser/commits?author=atierian
[BradLarson]: https://github.com/apple/swift-argument-parser/commits?author=BradLarson
[buttaface]: https://github.com/apple/swift-argument-parser/commits?author=buttaface
[clayellis]: https://github.com/apple/swift-argument-parser/commits?author=clayellis
[CodaFi]: https://github.com/apple/swift-argument-parser/commits?author=CodaFi
[compnerd]: https://github.com/apple/swift-argument-parser/commits?author=compnerd
[CraigSiemens]: https://github.com/apple/swift-argument-parser/commits?author=CraigSiemens
[CypherPoet]: https://github.com/apple/swift-argument-parser/commits?author=CypherPoet
[d-ronnqvist]: https://github.com/apple/swift-argument-parser/commits?author=d-ronnqvist
[damuellen]: https://github.com/apple/swift-argument-parser/commits?author=damuellen
[dduan]: https://github.com/apple/swift-argument-parser/commits?author=dduan
[dirtyhabits97]: https://github.com/apple/swift-argument-parser/commits?author=dirtyhabits97
Expand Down Expand Up @@ -820,6 +885,7 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
[NicFontana]: https://github.com/apple/swift-argument-parser/commits?author=NicFontana
[owenv]: https://github.com/apple/swift-argument-parser/commits?author=owenv
[pegasuze]: https://github.com/apple/swift-argument-parser/commits?author=pegasuze
[randomeizer]: https://github.com/apple/swift-argument-parser/commits?author=randomeizer
[rauhul]: https://github.com/apple/swift-argument-parser/commits?author=rauhul
[rjstelling]: https://github.com/apple/swift-argument-parser/commits?author=rjstelling
[Sajjon]: https://github.com/apple/swift-argument-parser/commits?author=Sajjon
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct Repeat: ParsableCommand {
var includeCounter = false

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

@Argument(help: "The phrase to repeat.")
var phrase: String
Expand Down

0 comments on commit fddd1c0

Please sign in to comment.