Skip to content

Commit 983adbd

Browse files
alan-agius4angular-robot[bot]
authored andcommitted
build: update @types/yargs to ^17.0.20
1 parent 7b0c1ce commit 983adbd

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"@types/shelljs": "^0.8.11",
121121
"@types/tar": "^6.1.2",
122122
"@types/text-table": "^0.2.1",
123-
"@types/yargs": "^17.0.8",
123+
"@types/yargs": "^17.0.20",
124124
"@types/yargs-parser": "^21.0.0",
125125
"@types/yarnpkg__lockfile": "^1.1.5",
126126
"@typescript-eslint/eslint-plugin": "5.48.2",

packages/angular/cli/src/commands/generate/cli.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
FileSystemCollectionDescription,
1313
FileSystemSchematicDescription,
1414
} from '@angular-devkit/schematics/tools';
15-
import { Argv } from 'yargs';
15+
import { ArgumentsCamelCase, Argv } from 'yargs';
1616
import {
1717
CommandModuleError,
1818
CommandModuleImplementation,
@@ -40,7 +40,7 @@ export class GenerateCommandModule
4040
longDescriptionPath?: string | undefined;
4141

4242
override async builder(argv: Argv): Promise<Argv<GenerateCommandArgs>> {
43-
let localYargs = (await super.builder(argv)).command<GenerateCommandArgs>({
43+
let localYargs = (await super.builder(argv)).command({
4444
command: '$0 <schematic>',
4545
describe: 'Run the provided schematic.',
4646
builder: (localYargs) =>
@@ -51,7 +51,7 @@ export class GenerateCommandModule
5151
demandOption: true,
5252
})
5353
.strict(),
54-
handler: (options) => this.handler(options),
54+
handler: (options) => this.handler(options as ArgumentsCamelCase<GenerateCommandArgs>),
5555
});
5656

5757
for (const [schematicName, collectionName] of await this.getSchematicsToRegister()) {
@@ -88,7 +88,14 @@ export class GenerateCommandModule
8888
: undefined,
8989
builder: (localYargs) => this.addSchemaOptionsToCommand(localYargs, options).strict(),
9090
handler: (options) =>
91-
this.handler({ ...options, schematic: `${collectionName}:${schematicName}` }),
91+
this.handler({
92+
...options,
93+
schematic: `${collectionName}:${schematicName}`,
94+
} as ArgumentsCamelCase<
95+
SchematicsCommandArgs & {
96+
schematic: string;
97+
}
98+
>),
9299
});
93100
}
94101

yarn.lock

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121

122122
"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#5854dda71b14fd9032ca67125b902464ebb7b228":
123123
version "0.0.0-fa8e18e7dd9b4d3764afb6a4393a6d64491b2023"
124-
uid "5854dda71b14fd9032ca67125b902464ebb7b228"
125124
resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#5854dda71b14fd9032ca67125b902464ebb7b228"
126125
dependencies:
127126
"@angular-devkit/build-angular" "15.1.0-rc.0"
@@ -307,7 +306,6 @@
307306

308307
"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#9abd9ebd6280363e722044539d056804fe6f3235":
309308
version "0.0.0-fa8e18e7dd9b4d3764afb6a4393a6d64491b2023"
310-
uid "9abd9ebd6280363e722044539d056804fe6f3235"
311309
resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#9abd9ebd6280363e722044539d056804fe6f3235"
312310
dependencies:
313311
"@yarnpkg/lockfile" "^1.1.0"
@@ -3483,13 +3481,20 @@
34833481
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b"
34843482
integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==
34853483

3486-
"@types/yargs@^17.0.0", "@types/yargs@^17.0.8":
3484+
"@types/yargs@^17.0.0":
34873485
version "17.0.19"
34883486
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.19.tgz#8dbecdc9ab48bee0cb74f6e3327de3fa0d0c98ae"
34893487
integrity sha512-cAx3qamwaYX9R0fzOIZAlFpo4A+1uBVCxqpKz9D26uTF4srRXaGTTsikQmaotCtNdbhzyUH7ft6p9ktz9s6UNQ==
34903488
dependencies:
34913489
"@types/yargs-parser" "*"
34923490

3491+
"@types/yargs@^17.0.20":
3492+
version "17.0.20"
3493+
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.20.tgz#107f0fcc13bd4a524e352b41c49fe88aab5c54d5"
3494+
integrity sha512-eknWrTHofQuPk2iuqDm1waA7V6xPlbgBoaaXEgYkClhLOnB0TtbW+srJaOToAgawPxPlHQzwypFA2bhZaUGP5A==
3495+
dependencies:
3496+
"@types/yargs-parser" "*"
3497+
34933498
"@types/yarnpkg__lockfile@^1.1.5":
34943499
version "1.1.5"
34953500
resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.5.tgz#9639020e1fb65120a2f4387db8f1e8b63efdf229"

0 commit comments

Comments
 (0)