command.ts ×2
Frontier kind: Code frontier
unlabeled · c_6e8241e23248
81 tests · 2415 LOC · 18 files · introduces 0 tests · 4 LOC · 1 file
Introduces — evidence that enters the hierarchy at this concept
Code
2 ranges 4 lines · 1 files
Tests
0 tests
Contains — complete concept membership
Neighbourhood graph
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Focus concept
Ancestors (broader)
Descendants (narrower)
Introduced files
Introduced tests
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
JavaScript is disabled; use the native relationship evidence on this page to explore the same evidence.
Native relationship evidence
Every exact file and test below is linked only from the concept that introduces it.
command.ts ×2 — Focused concept
Introduced files:
command.mjs|title=Command global parsing hints coerce should not be applied multiple times for nested commands|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows an implied argument to be specified|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows a choices array to be specified|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests function passed as second argument to parse commands preserves top-level config when parse is called multiple times|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows a conflicting argument to be specified|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows a coerce method to be provided|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional populates array with appropriate arguments|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests parse can be called multiple times with the same behavior|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows normalize to be specified|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command async builder allows positionals to be configured asynchronously|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional does not parse large scientific notation values, when type string|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests strict mode does not fail when unrecognized option is passed after --|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests command accepts a module with a 'builder' and 'handler' key|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests command accepts a module with a keys 'command', 'describe', 'builder', and 'handler'|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command help command displays command help appropriately|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
command.mjs|title=Command global parsing hints strict does not fire command if validation fails|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests demand fails in strict mode with extra positionals|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() returns camelcase args for a command|occurrence=1, yargs.mjs|title=yargs dsl tests .coerce() supports positional and variadic args for a command|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async calls the command handler when all middleware promises resolve|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints coerce defaults to applying coerce rules globally|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
command.mjs|title=Command async returns promise that can be caught, when fail(false)|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints validation applies custom checks globally by default|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints validation applies demandOption globally|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests demand should recognize context variables in strict mode|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints strict does not fail strict check due to positional command arguments|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints validation allows each builder to specify own middleware|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints strict does not fail strict check due to positional command arguments in nested commands|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command variadic fails if required arguments are missing|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command missing positional arguments fails if a required argument is missing|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional arguments does not overwrite existing values in argv for keys that are not positional|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-test.mjs|title=ESM hierarchy of commands allows array of commands to be registered|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command allows an array of commands to be provided|occurrence=1, yargs-test.mjs|title=ESM hierarchy of commands allows array of subcommands to be registered|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints validation resets custom check if global is false|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests positional indicates that <foo> positional arguments are required|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command async returns promise that resolves arguments once handler succeeds|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional aliases allows variadic and positional arguments to be combined|occurrence=1 — Ancestor (broader)
Introduced tests:
command.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
usage.mjs|title=usage tests default command should display options (with descriptions) on failed default command|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command allows builder function to return parsed argv|occurrence=1, command.mjs|title=Command allows builder function to parse argv without returning|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional aliases allows an alias to be defined for a required positional argument|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional aliases allows several aliases to be defined for a required positional argument|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional arguments handles -- in conjunction with positional arguments|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command variadic allows optional arguments to be variadic|occurrence=1, command.mjs|title=Command variadic does not fail if zero optional arguments are provided|occurrence=1, +1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command default commands allows command to be run when alias is default command|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints aliases defaults to applying aliases globally|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional arguments populates outer argv with positional arguments when unknown-options-as-args is set|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command default commands does not execute default command if another command is provided|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command executes a command via alias|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command missing positional arguments does not fail if optional argument is missing|occurrence=1, command.mjs|title=Command positional arguments populates argv with camel-case variants of arguments when possible|occurrence=1, +1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional arguments continues to support populate-- for commands, post #1457|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional arguments populates subcommand's inner argv with positional arguments|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command positional arguments populates inner argv with positional arguments|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command variadic allows required arguments to be variadic|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command handles positional arguments if command is invoked using .parse()|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command variadic only allows the last argument to be variadic|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests function passed as second argument to parse commands allows context object to be passed to parse|occurrence=1, yargs.mjs|title=yargs dsl tests function passed as second argument to parse commands does not fail if context object has cyclical reference|occurrence=1, +1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command builder helpOrVersionSet cmd|occurrence=1, yargs.mjs|title=yargs dsl tests function passed as second argument to parse commands populates argv appropriately when parse is called multiple times|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests function passed as second argument to parse commands invokes command handler normally if no output is populated|occurrence=1 — Ancestor (broader)
Introduced tests:
command.ts ×1 — Ancestor (broader)
Introduced files:
command.mjs|title=Command default commands strict allows default command aliases, when strict mode is enabled|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command usage allows you to configure a default command|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests function passed as second argument to parse commands resets errors when parse is called multiple times|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests demand fails in strict mode with extra positionals for default command|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests function passed as second argument to parse commands does not invoke command handler if output is populated|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
command.mjs|title=Command default commands allows default command to be set as alias|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() allows an error from positional arg to be handled by fail() handler|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command default commands executes default command if defined positional arguments and only command|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command does not coerce number from positional with leading "+"|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.ts ×1 — Ancestor (broader)
Introduced files:
command.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
command.ts ×1 — Ancestor (broader)
Introduced files:
command.ts ×1 — Descendant (narrower)
Introduced files:
command.ts ×3 — Descendant (narrower)
Introduced files:
command.ts ×3 — Descendant (narrower)
Introduced files:
command.ts ×12 — Descendant (narrower)
Introduced files:
command.ts ×1 — Descendant (narrower)
Introduced files:
command.ts ×2 — Descendant (narrower)
Introduced files:
command.ts ×1 — Descendant (narrower)
Introduced files:
usage.ts ×1 — Descendant (narrower)
Introduced files:
usage.ts ×2 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×3 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×3 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×2 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×5 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×5 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×2 — Descendant (narrower)
Introduced files:
usage.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×9 — Descendant (narrower)
Introduced files:
command.ts ×5 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
command.ts ×1 — Descendant (narrower)
Introduced files:
command.ts ×3 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×2 — Descendant (narrower)
Introduced files:
command.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×35 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×124 — Descendant (narrower)
Introduced files:
Introduced tests:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
Introduced tests:
argsert.mjs|title=Argsert allows for any type if * is provided|occurrence=1, argsert.mjs|title=Argsert should ignore trailing undefined values|occurrence=1 — Descendant (narrower)
Introduced tests:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
Introduced tests:
argsert.ts ×2 — Descendant (narrower)
Introduced files:
argsert.ts ×3 — Descendant (narrower)
Introduced files:
parse-command.ts ×1 — Descendant (narrower)
Introduced files:
parse-command.ts ×1 — Descendant (narrower)
Introduced files:
parse-command.ts ×3 — Descendant (narrower)
Introduced files:
process-argv.ts ×1 — Descendant (narrower)
Introduced files:
process-argv.ts ×3 — Descendant (narrower)
Introduced files:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
apply-extends.ts ×4 — Descendant (narrower)
Introduced files:
Introduced tests:
argsert.ts ×4 — Descendant (narrower)
Introduced files:
obj-filter.ts ×1 — Descendant (narrower)
Introduced files:
Introduced tests:
obj-filter.ts ×2 — Descendant (narrower)
Introduced files:
argsert.ts ×3 — Descendant (narrower)
Introduced files:
common-types.ts ×4 — Descendant (narrower)
Introduced files:
process-argv.ts ×5 — Descendant (narrower)
Introduced files:
Introduced tests:
is-promise.ts ×2 — Descendant (narrower)
Introduced files:
Introduced tests:
parse-command.ts ×1 — Descendant (narrower)
Introduced files:
Introduced tests:
parse-command.ts ×2 — Descendant (narrower)
Introduced files:
yerror.ts ×2 — Descendant (narrower)
Introduced files:
is-promise.ts ×1 — Descendant (narrower)
Introduced files:
Introduced tests
Every collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Introduced code
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 4 introduced LOC across 2 ranges.
Expand a file to inspect source; the > gutter marks introduced lines.
lib/command.ts 4 introduced LOC · 2 ranges
Open complete file
602
const parsed = parseCommand ( cmdString );
603
parsed . demanded . forEach ( d => {
605
>
if ( d . variadic ) {
606
parseOptions . array . push ( cmd );
607
parseOptions . default [ cmd ] = [];
608
}
609
>
parseOptions . alias [ cmd ] = aliases ;
command.ts
610
>
parseOptions . demand [ cmd ] = true ;
611
});
612