From 8d249e8094cc457714772f29c2785f23a98c3b2f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 28 Feb 2022 13:15:38 +0100 Subject: [PATCH 1/3] refactor(@angular-devkit/schematics-cli): replace parser with yargs-parser BREAKING CHANGE: camel case arguments are no longer allowed. Closes #13544, closes #12150, closes #22173 --- package.json | 2 + .../angular_devkit/schematics_cli/BUILD.bazel | 4 +- .../schematics_cli/bin/schematics.ts | 141 ++++++++++-------- .../schematics_cli/bin/schematics_spec.ts | 9 +- .../schematics_cli/package.json | 4 +- yarn.lock | 9 +- 6 files changed, 96 insertions(+), 73 deletions(-) diff --git a/package.json b/package.json index dd91005ff3a7..e93f5302696a 100644 --- a/package.json +++ b/package.json @@ -116,6 +116,7 @@ "@types/semver": "^7.0.0", "@types/text-table": "^0.2.1", "@types/uuid": "^8.0.0", + "@types/yargs-parser": "^20.2.1", "@typescript-eslint/eslint-plugin": "5.13.0", "@typescript-eslint/parser": "5.13.0", "@yarnpkg/lockfile": "1.1.0", @@ -217,6 +218,7 @@ "webpack-dev-server": "4.7.4", "webpack-merge": "5.8.0", "webpack-subresource-integrity": "5.1.0", + "yargs-parser": "21.0.1", "zone.js": "^0.11.3" } } diff --git a/packages/angular_devkit/schematics_cli/BUILD.bazel b/packages/angular_devkit/schematics_cli/BUILD.bazel index 57ac54222695..a3945d0df047 100644 --- a/packages/angular_devkit/schematics_cli/BUILD.bazel +++ b/packages/angular_devkit/schematics_cli/BUILD.bazel @@ -51,12 +51,12 @@ ts_library( "//packages/angular_devkit/schematics/tasks", "//packages/angular_devkit/schematics/tools", "@npm//@types/inquirer", - "@npm//@types/minimist", "@npm//@types/node", + "@npm//@types/yargs-parser", "@npm//ansi-colors", "@npm//inquirer", # @external - "@npm//minimist", # @external "@npm//symbol-observable", # @external + "@npm//yargs-parser", # @external ], ) diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index 31619a0f6ddc..02881bce2261 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -15,7 +15,7 @@ import { UnsuccessfulWorkflowExecution } from '@angular-devkit/schematics'; import { NodeWorkflow } from '@angular-devkit/schematics/tools'; import * as ansiColors from 'ansi-colors'; import * as inquirer from 'inquirer'; -import minimist from 'minimist'; +import yargsParser from 'yargs-parser'; /** * Parse the name of schematic passed in argument, and return a {collection, schematic} named @@ -35,10 +35,11 @@ function parseSchematicName(str: string | null): { collection: string; schematic let collection = '@angular-devkit/schematics-cli'; let schematic = str; - if (schematic && schematic.indexOf(':') != -1) { + if (schematic?.includes(':')) { + const lastIndexOfColon = schematic.lastIndexOf(':'); [collection, schematic] = [ - schematic.slice(0, schematic.lastIndexOf(':')), - schematic.substring(schematic.lastIndexOf(':') + 1), + schematic.slice(0, lastIndexOfColon), + schematic.substring(lastIndexOfColon + 1), ]; } @@ -113,14 +114,14 @@ export async function main({ stdout = process.stdout, stderr = process.stderr, }: MainOptions): Promise<0 | 1> { - const argv = parseArgs(args); + const { cliOptions, schematicOptions, _ } = parseArgs(args); // Create a separate instance to prevent unintended global changes to the color configuration // Create function is not defined in the typings. See: https://github.com/doowb/ansi-colors/pull/44 const colors = (ansiColors as typeof ansiColors & { create: () => typeof ansiColors }).create(); /** Create the DevKit Logger used through the CLI. */ - const logger = createConsoleLogger(argv['verbose'], stdout, stderr, { + const logger = createConsoleLogger(!!cliOptions.verbose, stdout, stderr, { info: (s) => s, debug: (s) => s, warn: (s) => colors.bold.yellow(s), @@ -128,7 +129,7 @@ export async function main({ fatal: (s) => colors.bold.red(s), }); - if (argv.help) { + if (cliOptions.help) { logger.info(getUsage()); return 0; @@ -136,18 +137,18 @@ export async function main({ /** Get the collection an schematic name from the first argument. */ const { collection: collectionName, schematic: schematicName } = parseSchematicName( - argv._.shift() || null, + _.shift() || null, ); const isLocalCollection = collectionName.startsWith('.') || collectionName.startsWith('/'); /** Gather the arguments for later use. */ - const debugPresent = argv['debug'] !== null; - const debug = debugPresent ? !!argv['debug'] : isLocalCollection; - const dryRunPresent = argv['dry-run'] !== null; - const dryRun = dryRunPresent ? !!argv['dry-run'] : debug; - const force = argv['force']; - const allowPrivate = argv['allow-private']; + const debugPresent = cliOptions.debug !== null; + const debug = debugPresent ? !!cliOptions.debug : isLocalCollection; + const dryRunPresent = cliOptions['dry-run'] !== null; + const dryRun = dryRunPresent ? !!cliOptions['dry-run'] : debug; + const force = !!cliOptions.force; + const allowPrivate = !!cliOptions['allow-private']; /** Create the workflow scoped to the working directory that will be executed with this run. */ const workflow = new NodeWorkflow(process.cwd(), { @@ -158,7 +159,7 @@ export async function main({ }); /** If the user wants to list schematics, we simply show all the schematic names. */ - if (argv['list-schematics']) { + if (cliOptions['list-schematics']) { return _listSchematics(workflow, collectionName, logger); } @@ -236,39 +237,16 @@ export async function main({ } }); - /** - * Remove every options from argv that we support in schematics itself. - */ - const parsedArgs = Object.assign({}, argv) as Record; - delete parsedArgs['--']; - for (const key of booleanArgs) { - delete parsedArgs[key]; - } - - /** - * Add options from `--` to args. - */ - const argv2 = minimist(argv['--']); - for (const key of Object.keys(argv2)) { - parsedArgs[key] = argv2[key]; - } - // Show usage of deprecated options workflow.registry.useXDeprecatedProvider((msg) => logger.warn(msg)); // Pass the rest of the arguments as the smart default "argv". Then delete it. - workflow.registry.addSmartDefaultProvider('argv', (schema) => { - if ('index' in schema) { - return argv._[Number(schema['index'])]; - } else { - return argv._; - } - }); - - delete parsedArgs._; + workflow.registry.addSmartDefaultProvider('argv', (schema) => + 'index' in schema ? _[Number(schema['index'])] : _, + ); // Add prompts. - if (argv['interactive'] && isTTY()) { + if (cliOptions.interactive && isTTY()) { workflow.registry.usePromptProvider(_createPromptProvider()); } @@ -285,7 +263,7 @@ export async function main({ .execute({ collection: collectionName, schematic: schematicName, - options: parsedArgs, + options: schematicOptions, allowPrivate: allowPrivate, debug: debug, logger: logger, @@ -308,9 +286,9 @@ export async function main({ // "See above" because we already printed the error. logger.fatal('The Schematic workflow failed. See above.'); } else if (debug) { - logger.fatal('An error occured:\n' + err.stack); + logger.fatal(`An error occured:\n${err.stack}`); } else { - logger.fatal(err.stack || err.message); + logger.fatal(`Error: ${err.message}`); } return 1; @@ -322,7 +300,7 @@ export async function main({ */ function getUsage(): string { return tags.stripIndent` - schematics [CollectionName:]SchematicName [options, ...] + schematics [collection-name:]schematic-name [options, ...] By default, if the collection name is not specified, use the internal collection provided by the Schematics CLI. @@ -354,34 +332,75 @@ function getUsage(): string { /** Parse the command line. */ const booleanArgs = [ - 'allowPrivate', 'allow-private', 'debug', 'dry-run', - 'dryRun', 'force', 'help', 'list-schematics', - 'listSchematics', 'verbose', 'interactive', -]; - -function parseArgs(args: string[] | undefined): minimist.ParsedArgs { - return minimist(args, { - boolean: booleanArgs, - alias: { - 'dryRun': 'dry-run', - 'listSchematics': 'list-schematics', - 'allowPrivate': 'allow-private', - }, +] as const; + +type ElementType> = T extends ReadonlyArray + ? ElementType + : never; + +interface Options { + _: string[]; + schematicOptions: Record; + cliOptions: Partial, boolean | null>>; +} + +/** Parse the command line. */ +function parseArgs(args: string[]): Options { + const { _, ...options } = yargsParser(args, { + boolean: booleanArgs as unknown as string[], default: { 'interactive': true, 'debug': null, - 'dryRun': null, + 'dry-run': null, + }, + configuration: { + 'dot-notation': false, + 'boolean-negation': true, + 'strip-aliased': true, + 'camel-case-expansion': false, }, - '--': true, }); + + // Camelize options as yargs will return the object in kebab-case when camel casing is disabled. + const schematicOptions: Options['schematicOptions'] = {}; + const cliOptions: Options['cliOptions'] = {}; + + const isCliOptions = ( + key: ElementType | string, + ): key is ElementType => + booleanArgs.includes(key as ElementType); + + // Casting temporary until https://github.com/DefinitelyTyped/DefinitelyTyped/pull/59065 is merged and released. + const { camelCase, decamelize } = yargsParser as yargsParser.Parser & { + camelCase(str: string): string; + decamelize(str: string, joinString?: string): string; + }; + + for (const [key, value] of Object.entries(options)) { + if (/[A-Z]/.test(key)) { + throw new Error(`Unknown argument ${key}. Did you mean ${decamelize(key)}?`); + } + + if (isCliOptions(key)) { + cliOptions[key] = value; + } else { + schematicOptions[camelCase(key)] = value; + } + } + + return { + _, + schematicOptions, + cliOptions, + }; } function isTTY(): boolean { diff --git a/packages/angular_devkit/schematics_cli/bin/schematics_spec.ts b/packages/angular_devkit/schematics_cli/bin/schematics_spec.ts index 2055d474333e..9dc517587dba 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics_spec.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics_spec.ts @@ -35,12 +35,11 @@ describe('schematics-cli binary', () => { expect(res).toEqual(0); }); - it('listSchematics works', async () => { + it('errors when using camel case listSchematics', async () => { const args = ['--listSchematics']; - const res = await main({ args, stdout, stderr }); - expect(stdout.lines).toMatch(/blank/); - expect(stdout.lines).toMatch(/schematic/); - expect(res).toEqual(0); + await expectAsync(main({ args, stdout, stderr })).toBeRejectedWithError( + 'Unknown argument listSchematics. Did you mean list-schematics?', + ); }); it('dry-run works', async () => { diff --git a/packages/angular_devkit/schematics_cli/package.json b/packages/angular_devkit/schematics_cli/package.json index bc89f9a4db8a..c43fa8bbc719 100644 --- a/packages/angular_devkit/schematics_cli/package.json +++ b/packages/angular_devkit/schematics_cli/package.json @@ -20,7 +20,7 @@ "@angular-devkit/schematics": "0.0.0-PLACEHOLDER", "ansi-colors": "4.1.1", "inquirer": "8.2.0", - "minimist": "1.2.5", - "symbol-observable": "4.0.0" + "symbol-observable": "4.0.0", + "yargs-parser": "21.0.1" } } diff --git a/yarn.lock b/yarn.lock index 19357fbf02a4..5a3d5b58cdd0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -178,7 +178,6 @@ "@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#5e484f9c4ab6b47f84263d115d6cf9e13ce4f32a": version "0.0.0-104c49ad795097101ab3aa268a8e9af2cdf04a8d" - uid "5e484f9c4ab6b47f84263d115d6cf9e13ce4f32a" resolved "https://github.com/angular/dev-infra-private-builds.git#5e484f9c4ab6b47f84263d115d6cf9e13ce4f32a" dependencies: "@angular-devkit/build-angular" "14.0.0-next.3" @@ -2223,7 +2222,7 @@ dependencies: "@types/node" "*" -"@types/yargs-parser@*": +"@types/yargs-parser@*", "@types/yargs-parser@^20.2.1": version "20.2.1" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw== @@ -9124,7 +9123,6 @@ sass@1.49.9, sass@^1.49.0: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.6.4-linux.tar.gz": version "0.0.0" - uid "992e2cb0d91e54b27a4f5bbd2049f3b774718115" resolved "https://saucelabs.com/downloads/sc-4.6.4-linux.tar.gz#992e2cb0d91e54b27a4f5bbd2049f3b774718115" saucelabs@^1.5.0: @@ -10924,6 +10922,11 @@ yaml@^1.10.0, yaml@^1.5.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yargs-parser@21.0.1: + version "21.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" + integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== + yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" From 40b4ac4542fec35ab769bd1a20ab2e41d9cd78a4 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 28 Feb 2022 13:16:10 +0100 Subject: [PATCH 2/3] refactor(@angular-devkit/benchmark): replace parser with yargs-parser --- packages/angular_devkit/benchmark/BUILD.bazel | 4 ++-- .../angular_devkit/benchmark/package.json | 4 ++-- packages/angular_devkit/benchmark/src/main.ts | 19 ++++++++++++++----- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/angular_devkit/benchmark/BUILD.bazel b/packages/angular_devkit/benchmark/BUILD.bazel index 5357a92bbeb3..84beef742f1b 100644 --- a/packages/angular_devkit/benchmark/BUILD.bazel +++ b/packages/angular_devkit/benchmark/BUILD.bazel @@ -25,9 +25,9 @@ ts_library( deps = [ "//packages/angular_devkit/core", "//packages/angular_devkit/core/node", - "@npm//@types/minimist", "@npm//@types/node", "@npm//@types/pidusage", + "@npm//@types/yargs-parser", "@npm//ansi-colors", "@npm//rxjs", ], @@ -60,12 +60,12 @@ jasmine_node_test( srcs = [":benchmark_test_lib"], deps = [ "@npm//jasmine", - "@npm//minimist", "@npm//pidtree", "@npm//pidusage", "@npm//source-map", "@npm//temp", "@npm//tree-kill", + "@npm//yargs-parser", ], ) diff --git a/packages/angular_devkit/benchmark/package.json b/packages/angular_devkit/benchmark/package.json index 46e224be3e82..39c74d9c95a0 100644 --- a/packages/angular_devkit/benchmark/package.json +++ b/packages/angular_devkit/benchmark/package.json @@ -12,10 +12,10 @@ "dependencies": { "@angular-devkit/core": "0.0.0-PLACEHOLDER", "ansi-colors": "4.1.1", - "minimist": "1.2.5", "pidusage": "3.0.0", "pidtree": "0.5.0", "rxjs": "6.6.7", - "tree-kill": "^1.2.0" + "tree-kill": "^1.2.0", + "yargs-parser": "21.0.1" } } diff --git a/packages/angular_devkit/benchmark/src/main.ts b/packages/angular_devkit/benchmark/src/main.ts index 25cf40ae71ec..48dc566ab091 100644 --- a/packages/angular_devkit/benchmark/src/main.ts +++ b/packages/angular_devkit/benchmark/src/main.ts @@ -11,8 +11,8 @@ import { logging, tags } from '@angular-devkit/core'; import { ProcessOutput } from '@angular-devkit/core/node'; import * as ansiColors from 'ansi-colors'; import { appendFileSync, writeFileSync } from 'fs'; -import minimist from 'minimist'; import { filter, map, toArray } from 'rxjs/operators'; +import yargsParser from 'yargs-parser'; import { Command } from '../src/command'; import { defaultReporter } from '../src/default-reporter'; import { defaultStatsCapture } from '../src/default-stats-capture'; @@ -25,6 +25,7 @@ export interface MainOptions { stderr?: ProcessOutput; } +// eslint-disable-next-line max-lines-per-function export async function main({ args, stdout = process.stdout, @@ -69,13 +70,22 @@ export async function main({ 'watch-timeout': number; 'watch-matcher'?: string; 'watch-script'?: string; - '--': string[] | null; + '--': string[]; + _: string[]; + $0: string; } // Parse the command line. - const argv = minimist(args, { + const argv = yargsParser(args, { boolean: ['help', 'verbose', 'overwrite-output-file'], string: ['watch-matcher', 'watch-script'], + configuration: { + 'dot-notation': false, + 'boolean-negation': true, + 'strip-aliased': true, + 'populate--': true, + 'camel-case-expansion': false, + }, default: { 'exit-code': 0, 'iterations': 5, @@ -85,8 +95,7 @@ export async function main({ 'prefix': '[benchmark]', 'watch-timeout': 10000, }, - '--': true, - }) as {} as BenchmarkCliArgv; + }) as BenchmarkCliArgv; // Create the DevKit Logger used through the CLI. const logger = new logging.TransformLogger('benchmark-prefix-logger', (stream) => From 680f4cc856513a13cb2c6b7120782c3bd4baf6d3 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 1 Mar 2022 17:44:56 +0100 Subject: [PATCH 3/3] refactor(@angular-devkit/architect-cli): replace parser with yargs-parser BREAKING CHANGE: camel case arguments are no longer allowed. --- package.json | 2 - .../angular_devkit/architect_cli/BUILD.bazel | 2 +- .../architect_cli/bin/architect.ts | 45 +++++++++++++++---- .../angular_devkit/architect_cli/package.json | 4 +- yarn.lock | 7 +-- 5 files changed, 40 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index e93f5302696a..6a992af08614 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,6 @@ "@types/karma": "^6.3.0", "@types/loader-utils": "^2.0.0", "@types/minimatch": "3.0.5", - "@types/minimist": "^1.2.0", "@types/node": "~12.12.6", "@types/node-fetch": "^2.1.6", "@types/npm-package-arg": "^6.1.0", @@ -168,7 +167,6 @@ "magic-string": "0.25.7", "mini-css-extract-plugin": "2.5.3", "minimatch": "5.0.1", - "minimist": "^1.2.0", "ng-packagr": "14.0.0-next.1", "node-fetch": "^2.2.0", "npm-package-arg": "9.0.0", diff --git a/packages/angular_devkit/architect_cli/BUILD.bazel b/packages/angular_devkit/architect_cli/BUILD.bazel index 19505a0fcb05..c20782d4f965 100644 --- a/packages/angular_devkit/architect_cli/BUILD.bazel +++ b/packages/angular_devkit/architect_cli/BUILD.bazel @@ -20,9 +20,9 @@ ts_library( "//packages/angular_devkit/architect/node", "//packages/angular_devkit/core", "//packages/angular_devkit/core/node", - "@npm//@types/minimist", "@npm//@types/node", "@npm//@types/progress", + "@npm//@types/yargs-parser", "@npm//ansi-colors", "@npm//rxjs", ], diff --git a/packages/angular_devkit/architect_cli/bin/architect.ts b/packages/angular_devkit/architect_cli/bin/architect.ts index be437760b475..4ad5fb2b52de 100644 --- a/packages/angular_devkit/architect_cli/bin/architect.ts +++ b/packages/angular_devkit/architect_cli/bin/architect.ts @@ -9,13 +9,13 @@ import { Architect, BuilderInfo, BuilderProgressState, Target } from '@angular-devkit/architect'; import { WorkspaceNodeModulesArchitectHost } from '@angular-devkit/architect/node'; -import { logging, schema, tags, workspaces } from '@angular-devkit/core'; +import { json, logging, schema, tags, workspaces } from '@angular-devkit/core'; import { NodeJsSyncHost, createConsoleLogger } from '@angular-devkit/core/node'; import * as ansiColors from 'ansi-colors'; import { existsSync } from 'fs'; -import minimist from 'minimist'; import * as path from 'path'; import { tap } from 'rxjs/operators'; +import yargsParser from 'yargs-parser'; import { MultiProgressBar } from '../src/progress'; function findUp(names: string | string[], from: string) { @@ -78,24 +78,43 @@ async function _executeTarget( parentLogger: logging.Logger, workspace: workspaces.WorkspaceDefinition, root: string, - argv: minimist.ParsedArgs, + argv: yargsParser.Arguments, registry: schema.SchemaRegistry, ) { const architectHost = new WorkspaceNodeModulesArchitectHost(workspace, root); const architect = new Architect(architectHost, registry); // Split a target into its parts. - const targetStr = argv._.shift() || ''; + const { + _: [targetStr = ''], + help, + ...options + } = argv; const [project, target, configuration] = targetStr.split(':'); const targetSpec = { project, target, configuration }; - delete argv['help']; const logger = new logging.Logger('jobs'); const logs: logging.LogEntry[] = []; logger.subscribe((entry) => logs.push({ ...entry, message: `${entry.name}: ` + entry.message })); - const { _, ...options } = argv; - const run = await architect.scheduleTarget(targetSpec, options, { logger }); + // Camelize options as yargs will return the object in kebab-case when camel casing is disabled. + + // Casting temporary until https://github.com/DefinitelyTyped/DefinitelyTyped/pull/59065 is merged and released. + const { camelCase, decamelize } = yargsParser as yargsParser.Parser & { + camelCase(str: string): string; + decamelize(str: string, joinString?: string): string; + }; + + const camelCasedOptions: json.JsonObject = {}; + for (const [key, value] of Object.entries(options)) { + if (/[A-Z]/.test(key)) { + throw new Error(`Unknown argument ${key}. Did you mean ${decamelize(key)}?`); + } + + camelCasedOptions[camelCase(key)] = value; + } + + const run = await architect.scheduleTarget(targetSpec, camelCasedOptions, { logger }); const bars = new MultiProgressBar(':name :bar (:current/:total) :status'); run.progress.subscribe((update) => { @@ -107,7 +126,7 @@ async function _executeTarget( name: ( (update.target ? _targetStringFromTarget(update.target) : update.builder.name) + ' '.repeat(80) - ).substr(0, 40), + ).substring(0, 40), }; if (update.status !== undefined) { @@ -175,7 +194,15 @@ async function _executeTarget( async function main(args: string[]): Promise { /** Parse the command line. */ - const argv = minimist(args, { boolean: ['help'] }); + const argv = yargsParser(args, { + boolean: ['help'], + configuration: { + 'dot-notation': false, + 'boolean-negation': true, + 'strip-aliased': true, + 'camel-case-expansion': false, + }, + }); /** Create the DevKit Logger used through the CLI. */ const logger = createConsoleLogger(argv['verbose'], process.stdout, process.stderr, { diff --git a/packages/angular_devkit/architect_cli/package.json b/packages/angular_devkit/architect_cli/package.json index cf4eb5b91c76..95da35b93e56 100644 --- a/packages/angular_devkit/architect_cli/package.json +++ b/packages/angular_devkit/architect_cli/package.json @@ -17,10 +17,10 @@ "@angular-devkit/architect": "0.0.0-EXPERIMENTAL-PLACEHOLDER", "@angular-devkit/core": "0.0.0-PLACEHOLDER", "ansi-colors": "4.1.1", - "minimist": "1.2.5", "progress": "2.0.3", "rxjs": "6.6.7", - "symbol-observable": "4.0.0" + "symbol-observable": "4.0.0", + "yargs-parser": "21.0.1" }, "devDependencies": { "@types/progress": "2.0.5" diff --git a/yarn.lock b/yarn.lock index 5a3d5b58cdd0..bfd7b4d36b97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1980,11 +1980,6 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== -"@types/minimist@^1.2.0": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" - integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== - "@types/ms@*": version "0.7.31" resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" @@ -7125,7 +7120,7 @@ minimatch@~3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@1.2.5, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: +minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==