apple/swift-argument-parser (apple/swift-argument-parser)
### [`v1.5.0`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#150---2024-07-18)
[Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.4.0...1.5.0)
##### Additions
- Subcommands can now be grouped into sections, to enable a better help display
for commands with many subcommands. (\[[#644](https://togithub.com/apple/swift-argument-parser/issues/644)])
- Improved unofficial support for Android and riscv64 platforms. (\[[#649](https://togithub.com/apple/swift-argument-parser/issues/649)], \[[#651](https://togithub.com/apple/swift-argument-parser/issues/651)])
##### Fixes
- Command-line completion scripts correctly complete for arguments that are
included via option group. (\[[#648](https://togithub.com/apple/swift-argument-parser/issues/648)])
- Several warnings when compiling with strict concurrency enabled, or in Swift
6 language mode, are now silenced. (\[[#650](https://togithub.com/apple/swift-argument-parser/issues/650)])
The 1.5.0 release includes contributions from \[CraigSiemens], \[DougGregor],
\[finagolfin], \[futurejones], and \[natecook1000]. Thank you!
***
### [`v1.4.0`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#140---2024-05-21)
[Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.3.1...1.4.0)
##### Additions
- Adds support for subcommand aliases via a new `CommandConfiguration.aliases`
parameter. Aliases are shown in help text and used during command parsing. For
example, a subcommand like "average" from the example "math" tool can be
defined with the aliases `["avg"]`. The resulting subcommand can now be
invoked with either of `math stats average` and \`\`math stats avg\`. See the
updated documentation and example for additional details. (\[[#627](https://togithub.com/apple/swift-argument-parser/issues/627)])
- Adds a new API `usageString` to `ParsableArguments` and `ParsableCommand` for
retrieving their usage text, allowing for more flexible construction of error
screens. (\[[#634](https://togithub.com/apple/swift-argument-parser/issues/634)])
- Adds support for passing custom arguments to `AsyncParsableCommand.main()`
with a new `static func main(_ arguments: [String]?) async` method. (\[[#568](https://togithub.com/apple/swift-argument-parser/issues/568)])
##### Fixes
- Removes default parameter values from deprecated CommandConfiguration
initializers to prevent them from being selected as overloads. Some niche
invalid deprecation warnings should no longer occur. (\[[#636](https://togithub.com/apple/swift-argument-parser/issues/636)])
The 1.4.0 release includes contributions from \[Austinpayne], \[dcantah],
\[KS1019], \[natecook1000], \[rauhul], and \[revolter]. Thank you!
### [`v1.3.1`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#131---2024-03-16)
[Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.3.0...1.3.1)
##### Changes
- The `CommandConfiguration` type is now designated as `Sendable`. (\[[#615](https://togithub.com/apple/swift-argument-parser/issues/615)])
- The library uses `internal` imports instead of `@_implementationOnly` annotations
in Swift versions where permitted. (\[[#616](https://togithub.com/apple/swift-argument-parser/issues/616)])
##### Fixes
- `@Option`- and `@Argument`-annotated optional properties that use a `transform` closure
for parsing can now be declared without ambiguity. (\[[#619](https://togithub.com/apple/swift-argument-parser/issues/619)])
- The help flag is now recognized more consistently when a default subcommand has been
specified. (\[[#612](https://togithub.com/apple/swift-argument-parser/issues/612)])
- Options that use the `.upToNextOption` parsing strategy can now recognize an attached
value (e.g. `--numbers=1 2 3`). (\[[#610](https://togithub.com/apple/swift-argument-parser/issues/610)])
- Generated completion scripts for `zsh` handle repeatable options correctly. (\[[#614](https://togithub.com/apple/swift-argument-parser/issues/614)])
- Documentation improvements and clarifications. (\[[#607](https://togithub.com/apple/swift-argument-parser/issues/607)], \[[#611](https://togithub.com/apple/swift-argument-parser/issues/611)], \[[#617](https://togithub.com/apple/swift-argument-parser/issues/617)], \[[#621](https://togithub.com/apple/swift-argument-parser/issues/621)])
- Build improvements for CMake builds. (\[[#606](https://togithub.com/apple/swift-argument-parser/issues/606)], \[[#608](https://togithub.com/apple/swift-argument-parser/issues/608)])
The 1.3.1 release includes contributions from \[Coeur], \[compnerd], \[keith], \[MaxDesiatov],
\[mayoff], and \[natecook1000]. Thank you!
### [`v1.3.0`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#130---2023-12-06)
[Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.2.3...1.3.0)
##### Changes
- The `@Option`, `@Argument`, `@Flag`, and `@OptionGroup` property wrappers now
conditionally conform to `Sendable` when the wrapper's `Value` type conforms. With this
change, you can mark `ParsableCommand` types as `Sendable` when you want to be able to
pass a parsed command across concurrent contexts. (\[[#582](https://togithub.com/apple/swift-argument-parser/issues/582)])
*Migration:* Users that aren't ready to resolve sendability warnings can add the
`@preconcurrency` attribute to `import ArgumentParser` statements.
As part of this update, changes to the `CommandLine.arguments` array before a command's
`main` or `parse...` methods are called are no longer observed. Instead of making
changes to `CommandLine.arguments`, pass an updated array of arguments to the command's
method.
- To support migration to `Sendable` annotation, the minimum Swift version for
`swift-argument-parser` has been increased to Swift 5.7. Users of older Swift versions
will be able to continue using version 1.2.3 of the library. (\[[#582](https://togithub.com/apple/swift-argument-parser/issues/582)])
##### Additions
- Help screens now include possible options for `ExpressibleByArgument` types
with non empty `allValueStrings`. Types also conforming to `CaseIterable` do
not need to manually implement `allValueStrings`, instead it is derived from
`allCases`. (\[[#594](https://togithub.com/apple/swift-argument-parser/issues/594)])
##### Fixes
- The titles for nested option groups are preserved when embedded into commands without
specifying a new title. (\[[#592](https://togithub.com/apple/swift-argument-parser/issues/592)])
- When wrapping help and error messages, the library now uses the `COLUMNS` environment
variable when set, instead of immediately falling back to 80 columns. (\[[#596](https://togithub.com/apple/swift-argument-parser/issues/596)])
- Bash completion scripts now respect the extensions given in a `.file(...)` completion
kind. (\[[#590](https://togithub.com/apple/swift-argument-parser/issues/590)])
- Bash completion scripts now properly escape command names that include hyphens. (\[[#573](https://togithub.com/apple/swift-argument-parser/issues/573)])
- Documentation improvements. (\[[#572](https://togithub.com/apple/swift-argument-parser/issues/572)], \[[#565](https://togithub.com/apple/swift-argument-parser/issues/565)], \[[#602](https://togithub.com/apple/swift-argument-parser/issues/602)])
The 1.3.0 release includes contributions from \[Alkenso], \[compnerd], \[gwynne],
\[kennyyork], \[natecook1000], \[rauhul], \[robertmryan], and \[vlm]. Thank you!
***
### [`v1.2.3`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#123---2023-08-15)
[Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.2.2...1.2.3)
##### Additions
- You can now use ArgumentParser with Musl libc. (\[[#574](https://togithub.com/apple/swift-argument-parser/issues/574)])
##### Fixes
- Fixes a bug where single-page manuals did not include command abstracts for
subcommands. (\[[#552](https://togithub.com/apple/swift-argument-parser/issues/552)])
- Fixes a bug where non-optional properties in ParsableCommands could cause
ArgumentParser to crash. You can now include properties like dictionaries in
ParsableCommands without issue. (\[[#554](https://togithub.com/apple/swift-argument-parser/issues/554)])
- Fixes a configuration issue which would cause `ArgumentParserTestHelpers` to
fail to link when building for Windows. (\[[#579](https://togithub.com/apple/swift-argument-parser/issues/579)])
The 1.2.3 release includes contributions from \[compnerd], \[gwynne],
\[MaxDesiatov], \[natecook1000], and \[rauhul]. Thank you!
### [`v1.2.2`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#122---2023-02-09)
[Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.2.1...1.2.2)
##### Fixes
- Arguments with the `.allUnrecognized` parsing strategy no longer consume
built-in flags like `--help` and `--version`. (\[[#550](https://togithub.com/apple/swift-argument-parser/issues/550)])
- Fixes an issue introduced in version 1.2.0 where properties with underscored
names couldn't be parsed. (\[[#548](https://togithub.com/apple/swift-argument-parser/issues/548)])
- Improves the error message for cases where platform availability causes the
synchronous `ParsableCommand.main()` static method to be run on an
`AsyncParsableCommand` type. (\[[#547](https://togithub.com/apple/swift-argument-parser/issues/547)])
### [`v1.2.1`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#121---2023-01-12)
[Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.2.0...1.2.1)
##### Changes
- Documentation is now primarily hosted at the
[Swift Package Index](https://swiftpackageindex.com/apple/swift-argument-parser).
##### Fixes
- `exit(_:)` no longer causes infinite recursion on the WASI platform. (\[[#520](https://togithub.com/apple/swift-argument-parser/issues/520)])
- Completion scripts for `fish` now provide completions after a
non-hyphen-prefixed argument has been provided. (\[[#535](https://togithub.com/apple/swift-argument-parser/issues/535)])
- Overload selection for custom `ExpressibleByArgument` types has been improved.
(\[[#522](https://togithub.com/apple/swift-argument-parser/issues/522)])
- The usage string for `.postTerminator` arguments now includes the required
terminator (`--`). (\[[#542](https://togithub.com/apple/swift-argument-parser/issues/542)])
- Documentation and testing fixes and improvements.
The 1.2.1 release includes contributions from \[Chamepp], \[kkk669], \[mtj0928],
\[natecook1000], \[rauhul], \[rickrizzo], \[TiagoMaiaL], and \[yim-lee]. Thank you!
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
from: "1.2.0"
->from: "1.5.0"
Release Notes
apple/swift-argument-parser (apple/swift-argument-parser)
### [`v1.5.0`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#150---2024-07-18) [Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.4.0...1.5.0) ##### Additions - Subcommands can now be grouped into sections, to enable a better help display for commands with many subcommands. (\[[#644](https://togithub.com/apple/swift-argument-parser/issues/644)]) - Improved unofficial support for Android and riscv64 platforms. (\[[#649](https://togithub.com/apple/swift-argument-parser/issues/649)], \[[#651](https://togithub.com/apple/swift-argument-parser/issues/651)]) ##### Fixes - Command-line completion scripts correctly complete for arguments that are included via option group. (\[[#648](https://togithub.com/apple/swift-argument-parser/issues/648)]) - Several warnings when compiling with strict concurrency enabled, or in Swift 6 language mode, are now silenced. (\[[#650](https://togithub.com/apple/swift-argument-parser/issues/650)]) The 1.5.0 release includes contributions from \[CraigSiemens], \[DougGregor], \[finagolfin], \[futurejones], and \[natecook1000]. Thank you! *** ### [`v1.4.0`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#140---2024-05-21) [Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.3.1...1.4.0) ##### Additions - Adds support for subcommand aliases via a new `CommandConfiguration.aliases` parameter. Aliases are shown in help text and used during command parsing. For example, a subcommand like "average" from the example "math" tool can be defined with the aliases `["avg"]`. The resulting subcommand can now be invoked with either of `math stats average` and \`\`math stats avg\`. See the updated documentation and example for additional details. (\[[#627](https://togithub.com/apple/swift-argument-parser/issues/627)]) - Adds a new API `usageString` to `ParsableArguments` and `ParsableCommand` for retrieving their usage text, allowing for more flexible construction of error screens. (\[[#634](https://togithub.com/apple/swift-argument-parser/issues/634)]) - Adds support for passing custom arguments to `AsyncParsableCommand.main()` with a new `static func main(_ arguments: [String]?) async` method. (\[[#568](https://togithub.com/apple/swift-argument-parser/issues/568)]) ##### Fixes - Removes default parameter values from deprecated CommandConfiguration initializers to prevent them from being selected as overloads. Some niche invalid deprecation warnings should no longer occur. (\[[#636](https://togithub.com/apple/swift-argument-parser/issues/636)]) The 1.4.0 release includes contributions from \[Austinpayne], \[dcantah], \[KS1019], \[natecook1000], \[rauhul], and \[revolter]. Thank you! ### [`v1.3.1`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#131---2024-03-16) [Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.3.0...1.3.1) ##### Changes - The `CommandConfiguration` type is now designated as `Sendable`. (\[[#615](https://togithub.com/apple/swift-argument-parser/issues/615)]) - The library uses `internal` imports instead of `@_implementationOnly` annotations in Swift versions where permitted. (\[[#616](https://togithub.com/apple/swift-argument-parser/issues/616)]) ##### Fixes - `@Option`- and `@Argument`-annotated optional properties that use a `transform` closure for parsing can now be declared without ambiguity. (\[[#619](https://togithub.com/apple/swift-argument-parser/issues/619)]) - The help flag is now recognized more consistently when a default subcommand has been specified. (\[[#612](https://togithub.com/apple/swift-argument-parser/issues/612)]) - Options that use the `.upToNextOption` parsing strategy can now recognize an attached value (e.g. `--numbers=1 2 3`). (\[[#610](https://togithub.com/apple/swift-argument-parser/issues/610)]) - Generated completion scripts for `zsh` handle repeatable options correctly. (\[[#614](https://togithub.com/apple/swift-argument-parser/issues/614)]) - Documentation improvements and clarifications. (\[[#607](https://togithub.com/apple/swift-argument-parser/issues/607)], \[[#611](https://togithub.com/apple/swift-argument-parser/issues/611)], \[[#617](https://togithub.com/apple/swift-argument-parser/issues/617)], \[[#621](https://togithub.com/apple/swift-argument-parser/issues/621)]) - Build improvements for CMake builds. (\[[#606](https://togithub.com/apple/swift-argument-parser/issues/606)], \[[#608](https://togithub.com/apple/swift-argument-parser/issues/608)]) The 1.3.1 release includes contributions from \[Coeur], \[compnerd], \[keith], \[MaxDesiatov], \[mayoff], and \[natecook1000]. Thank you! ### [`v1.3.0`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#130---2023-12-06) [Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.2.3...1.3.0) ##### Changes - The `@Option`, `@Argument`, `@Flag`, and `@OptionGroup` property wrappers now conditionally conform to `Sendable` when the wrapper's `Value` type conforms. With this change, you can mark `ParsableCommand` types as `Sendable` when you want to be able to pass a parsed command across concurrent contexts. (\[[#582](https://togithub.com/apple/swift-argument-parser/issues/582)]) *Migration:* Users that aren't ready to resolve sendability warnings can add the `@preconcurrency` attribute to `import ArgumentParser` statements. As part of this update, changes to the `CommandLine.arguments` array before a command's `main` or `parse...` methods are called are no longer observed. Instead of making changes to `CommandLine.arguments`, pass an updated array of arguments to the command's method. - To support migration to `Sendable` annotation, the minimum Swift version for `swift-argument-parser` has been increased to Swift 5.7. Users of older Swift versions will be able to continue using version 1.2.3 of the library. (\[[#582](https://togithub.com/apple/swift-argument-parser/issues/582)]) ##### Additions - Help screens now include possible options for `ExpressibleByArgument` types with non empty `allValueStrings`. Types also conforming to `CaseIterable` do not need to manually implement `allValueStrings`, instead it is derived from `allCases`. (\[[#594](https://togithub.com/apple/swift-argument-parser/issues/594)]) ##### Fixes - The titles for nested option groups are preserved when embedded into commands without specifying a new title. (\[[#592](https://togithub.com/apple/swift-argument-parser/issues/592)]) - When wrapping help and error messages, the library now uses the `COLUMNS` environment variable when set, instead of immediately falling back to 80 columns. (\[[#596](https://togithub.com/apple/swift-argument-parser/issues/596)]) - Bash completion scripts now respect the extensions given in a `.file(...)` completion kind. (\[[#590](https://togithub.com/apple/swift-argument-parser/issues/590)]) - Bash completion scripts now properly escape command names that include hyphens. (\[[#573](https://togithub.com/apple/swift-argument-parser/issues/573)]) - Documentation improvements. (\[[#572](https://togithub.com/apple/swift-argument-parser/issues/572)], \[[#565](https://togithub.com/apple/swift-argument-parser/issues/565)], \[[#602](https://togithub.com/apple/swift-argument-parser/issues/602)]) The 1.3.0 release includes contributions from \[Alkenso], \[compnerd], \[gwynne], \[kennyyork], \[natecook1000], \[rauhul], \[robertmryan], and \[vlm]. Thank you! *** ### [`v1.2.3`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#123---2023-08-15) [Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.2.2...1.2.3) ##### Additions - You can now use ArgumentParser with Musl libc. (\[[#574](https://togithub.com/apple/swift-argument-parser/issues/574)]) ##### Fixes - Fixes a bug where single-page manuals did not include command abstracts for subcommands. (\[[#552](https://togithub.com/apple/swift-argument-parser/issues/552)]) - Fixes a bug where non-optional properties in ParsableCommands could cause ArgumentParser to crash. You can now include properties like dictionaries in ParsableCommands without issue. (\[[#554](https://togithub.com/apple/swift-argument-parser/issues/554)]) - Fixes a configuration issue which would cause `ArgumentParserTestHelpers` to fail to link when building for Windows. (\[[#579](https://togithub.com/apple/swift-argument-parser/issues/579)]) The 1.2.3 release includes contributions from \[compnerd], \[gwynne], \[MaxDesiatov], \[natecook1000], and \[rauhul]. Thank you! ### [`v1.2.2`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#122---2023-02-09) [Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.2.1...1.2.2) ##### Fixes - Arguments with the `.allUnrecognized` parsing strategy no longer consume built-in flags like `--help` and `--version`. (\[[#550](https://togithub.com/apple/swift-argument-parser/issues/550)]) - Fixes an issue introduced in version 1.2.0 where properties with underscored names couldn't be parsed. (\[[#548](https://togithub.com/apple/swift-argument-parser/issues/548)]) - Improves the error message for cases where platform availability causes the synchronous `ParsableCommand.main()` static method to be run on an `AsyncParsableCommand` type. (\[[#547](https://togithub.com/apple/swift-argument-parser/issues/547)]) ### [`v1.2.1`](https://togithub.com/apple/swift-argument-parser/blob/HEAD/CHANGELOG.md#121---2023-01-12) [Compare Source](https://togithub.com/apple/swift-argument-parser/compare/1.2.0...1.2.1) ##### Changes - Documentation is now primarily hosted at the [Swift Package Index](https://swiftpackageindex.com/apple/swift-argument-parser). ##### Fixes - `exit(_:)` no longer causes infinite recursion on the WASI platform. (\[[#520](https://togithub.com/apple/swift-argument-parser/issues/520)]) - Completion scripts for `fish` now provide completions after a non-hyphen-prefixed argument has been provided. (\[[#535](https://togithub.com/apple/swift-argument-parser/issues/535)]) - Overload selection for custom `ExpressibleByArgument` types has been improved. (\[[#522](https://togithub.com/apple/swift-argument-parser/issues/522)]) - The usage string for `.postTerminator` arguments now includes the required terminator (`--`). (\[[#542](https://togithub.com/apple/swift-argument-parser/issues/542)]) - Documentation and testing fixes and improvements. The 1.2.1 release includes contributions from \[Chamepp], \[kkk669], \[mtj0928], \[natecook1000], \[rauhul], \[rickrizzo], \[TiagoMaiaL], and \[yim-lee]. Thank you!Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.