This repository has been archived by the owner on Nov 25, 2022. It is now read-only.
Update dependency System.CommandLine to v2.0.0-beta4.22272.1 #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.0.0-beta1.20104.2
->2.0.0-beta4.22272.1
Release Notes
dotnet/command-line-api
v2.0.0-beta4.22272.1
: System.CommandLine v2.0.0-beta4.22272.1For details on the Beta 4 release, please see #1750.
What's Changed
New Contributors
Full Changelog: dotnet/command-line-api@v2.0.0-beta3.22114.1...2.0.0-beta4.22272.1
v2.0.0-beta3.22114.1
: System.CommandLine v2.0.0-beta3.22114.1For details on the Beta 3 release, please see #1613.
v2.0.0-beta2.21617.1
: System.CommandLine v2.0.0-beta2.21617.1For details on the Beta 2 release, please see #1537.
v2.0.0-beta1.21216.1
: System.CommandLine v2.0.0-beta1.21216.1What's new
It's been a while since our last beta release because as we approach the 2.0 milestone, we're making more breaking changes, and we're trying to group them into fewer releases in order to minimize churn.
System.CommandLine
Added an
Argument.LegalFileNamesOnly
extension method to improve file validations. (Thanks, @AronParker !)Made significant improvements to
HelpBuilder
to enable more fine-grained customization of help output. (Thanks, @Keboo!)Added an optional
description
parameter to anArgument<T>
constructor to matchOption<T>
. (Thanks, @database64128!)CommandHandler.Create
can now specify abstract methods, which can vary by the derived class at invocation time. (Thanks, @ycrumeyrolle!)Improved support for POSIX bundled arguments when no delimiter is used. (Thanks, @sfoslund)
Ahora se puede localizar la ayuda (pero todavia se necesita marcar
-h
para pedirla 🤔). (Thanks, @Keboo!)Added XML documentation for a number of types. (Thanks, @pieter-venter!)
Added a
ParseResult
parameter toSymbol.GetSuggestions
and to the signature forSuggestDelegate
. TheGetSuggestions
change is not a source-breaking change because we've also added an extension method supporting the older signature. (Thanks, @thoemmi!)Fixed a bug where trailing spaces would break response file parsing. (Thanks, @hackf5!)
Introduced
IIdentifierSymbol
, whichOption
andCommand
implement, butArgument
does not.Enabled customization of exit codes on error by passing an
exitErrorCode
argument to variousCommandLineBuilder
methods:UseExceptionHandler
,UseParseDirective
,UseParseErrorReporting
, andUseVersionOption
. (Thanks, @Keboo!)Custom argument parsers using
ParseArgument<T>
can now partially consume tokens usingArgumentResult.OnlyTake(int)
, allowing other symbols to consume the remaining tokens.CommandHandler.Create
now provides overloads for up to 16 parameters. We used to go to 11, but it wasn't enough.The debug directive now requires opt-in from the user, in order to prevent it from being used maliciously to block a process. (Thanks, @Keboo!)
Numerous performance improvements, benefitting speed and memory footprint. (Thanks, @paulomorgado!) Here's a sample:
Various bug fixes.
System.CommandLine.Hosting
IHostBuilder.GetInvocationContext
extension methods for accessingInvocationContext
in order to do invocation-specific dependency injection and more. (Thanks, @fredrikhr!)Breaking changes
Option.Argument
has been removed from the public API.Option
/Option<T>
constructors have been adjusted so that functionality for option arguments (such as setting default values and custom argument parsers) is available viaOption
andOption<T>
.Model binding no longer passes
null
for unspecified argument and option values ofIEnumerable
orstring
types. Instead, it passes an empty array or list of the appropriate type, orstring.Empty
, respectively.SuggestDelegate
now takes aParseResult
parameter in addition to the existingstring textToMatch
parameter.InvocationContext.ResultCode
has been renamed toInvocationContext.ExitCode
.The following string-based lookup APIs have been removed because they can be ambiguous when more than one symbol matches:
ParseResult[string]
CommandResult.OptionResult(string)
CommandResult[string]
System.CommandLine.Invocation.Process
has been removed from the public API.v2.0.0-beta1.20371.2
: System.CommandLine v2.0.0-beta1.20371.2What's new
System.CommandLine
Added support for setting environment variables using the
[env:name=value]
directive. (#965) Thanks, @fredrikhr!Made constructors more consistent between
Argument<T>
andOption<T>
to allow specifyinggetDefaultValue
anddescription
.Added
ParseResult.ValueForArgument<T>(Argument<T>)
andParseResult.ValueForOption<T>(Option<T>)
to combine lookup and conversion into a single method supporting type inference. (#949)Added default values to help output. (#898) Thanks, @NikiforovAll!
Help now wraps lines for long option names (#947) Thanks, @apogeeoak!
Added
SymbolResult.FindResultFor
to provide a cleaner way to find the result for a particularCommand
,Option
, orArgument
. This is similar toParseResult.FindResultFor
but it can be used within a custom parse delegate (ParseArgument<T>
) so that you don't have to traverse the result tree.Improved suggestion APIs to allow replacing the default suggestions, using
Argument.Suggestions.Clear()
. (#955) Thanks, @jmarolf!Added
Option.AddSuggestions
andArgument.AddSuggestions
methods with overloads to provide a static list of suggestions or a delegate for more dynamic suggestions.Suggestions are now sorted so that the matches closest to what was typed are shown first. (#891) Thanks, @kimsey0!
Performance improvements in tokenizer and symbol result lookups.
System.CommandLine.Rendering
AnsiControlCode
IFormattable
(#966). Thanks, @eerhardt!Breaking changes
Renamed
Option.Required
toOption.IsRequired
.Renamed the delegate type
Suggest
toSuggestDelegate
.Symbol.Aliases
andSymbol.RawAliases
are now of typeIReadOnlyCollection<string>
rather thanIReadOnlyList<string>
.v2.0.0-beta1.20214.1
: System.CommandLine v2.0.0-beta1.20214.1Compare Source
v2.0.0-beta1.20213.1
: System.CommandLine v2.0.0-beta1.20213.1Configuration
📅 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 has been generated by Mend Renovate. View repository job log here.