-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
I try my best to keep this PR list sorted by the importance of the changes (and also how easy they are to accept) while at the same time keeping it structured well.
The list was originally placed in a random comment (#1919 (comment)), which I didn't like. I hope it's okay that I've moved it to an issue.
Patches
ChangeLog type: Fixed
- Fix aggregated import and remove test for unsupported default export in TypeScript #1974
- Never call
preSubcommand
hooks on help command #1956
Enhancements / changes in behavior
ChangeLog type: Added
/ Changed
Changes in behavior fixing open issues
- Prevent aliases already in use and subcommands with such an alias or the name already in use from being added #1924 (fixes #1903)
Misc
- Prevent options with flags already in use from being added #1923 (closely related to #1924 from right above)
- Make command-argument array public (in
readonly
mode) #1970 - Add
.strictOptionalOptionArguments()
for POSIX-style handling of options with optional option-arguments #1951 (fixes #1901, quite robust and thus ready for review in my opinion, only tests missing)
Pure refactors and other changes of low importance
On hold
Closed but might need reconsideration or a new proposal
Misc
- Fix all type errors #1967 (reconsider with increased granularity if stricter type checking is adopted)
- Fix
.description()
: do not set command description ifundefined
is provided in the first parameter #1966 (a subset of #1967 from right above) - Add missing test and support help options with only the short flag in
Help.visibleOptions()
#1935 (might want to decouple from #1929) - Refactor help option and improve option parsing from parent when default command is invoked implicitly #1934
- Use
createOption()
inhelpOption()
to support custom option flag extraction (+ various improvements) #1929 (a subset of #1934 and #1935 from right above) - Make
copyInheritedSettings()
recursive #1922 - Clean up state from previous parse call when calling
parse()
/parseAsync()
#1919 (partially fixes #1916 and a lot of older issues) - Add missing support for command-arguments to commands added with
.addCommand()
#1941 - Allow dynamically updating version number and version option flags and description #1933 (the version number part, see #1954 (comment))
- Prevent
opts()
from unsafely exposing a private object and expose a proxy instead #1921
With warnings about presumably wrong library usage
- Warn about async calls in
.parse()
#1940 (partially fixes #1916) - Add support for sharing and stand-alone parsing of subcommands. Warn about parse calls on commands added with
.command()
#1938 (includes an arguably questionable enhancement to parent handling, so might require more time to think about than the previous PR, but the warning is very, very, VERY useful) (partially fixes #1916) - Warn about obscured help option #1931 (not as useful as the previous ones because it is likely the developer is okay with the help option being obscured, but a good complement to #1923)
- Add
.suppressWarnings()
for warnings in #1915 #1931 #1938 #1940 #1955 (a reasonable addition since all warnings introduced in the PRs above are for usage patterns that are not always wrong, just often connected with a developer mistake)
Pure refactors and other changes of low importance
- Correctly handle
allowUnknownOption
in.parseOptions()
#1946 (discussion finished in #1945, but reiterated in #1947 (comment)) - Add support for executable subcommands with help flags differing from those of the parent command #1957
- Handle falsy values in
addHelpCommand()
properly #1927
Changes to core project principles
Issues that might need a PR
- [Feature Request]
postParse
hooks #1976 - [Feature Request] Pass
Command
instance to argParsers #1968 passThroughOptions
and unknown option handling #1936 (awaiting feedback)passThroughOptions
being a superset ofenablePositionalOptions
#1947 (awaiting feedback)- Preset option type discrepancy #1973
- On
@api
JSDoc tag #1949 - On command and subcommand reusability and setting inheritance #1916 (document the lack of support for repeated parse calls as suggested in #1919 (comment) unless #1919 is reconsidered)
Completed
- Rework
Help.wrap()
#1904 - Add async custom processing support. Add
chainArgParserCalls()
for configuration. Additionally await thenable implicit and default option values and thenable default argument values #1915 - Add documentation for implicitly constructed commands' setting inheritance #1925
- Throw error on
storeOptionsAsProperties()
after setting option values #1928 - [PR with tiny fixes] Fix help command for subcommands with an executable handler and only a short help flag. Do not use undefined long help option flag in legacy code. Change initial variable values in test for better error messages. #1930
- Add missing check for broken passThrough #1937
- Refactor
getCommandAndParents()
intoCommand._getCommandAndAncestors()
and use consistently #1939 - Fix grammar and formatting in docs #1943
- Fix
.executableDir()
return type #1965 - Make
Option.env()
behave as a getter when called with no arguments #1971
Metadata
Metadata
Assignees
Labels
No labels