mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor: update yargs to new API for ESM compatibility (#43431)
Given that we ship all of compiler-cli and localize in ESM mode now, we need to use a ESM compatible version of Yargs. The latest version seems ESM compatible but with some small API changes. This commit updates Yargs and updates the command line option code to use the new API. PR Close #43431
This commit is contained in:
committed by
Dylan Hunn
parent
d442764470
commit
cebcfbe1d9
@@ -14,7 +14,7 @@ import {NgccOptions} from './ngcc_options';
|
||||
|
||||
export function parseCommandLineOptions(args: string[]): NgccOptions {
|
||||
const options =
|
||||
yargs
|
||||
yargs(args)
|
||||
.option('s', {
|
||||
alias: 'source',
|
||||
describe:
|
||||
@@ -114,7 +114,7 @@ export function parseCommandLineOptions(args: string[]): NgccOptions {
|
||||
})
|
||||
.strict()
|
||||
.help()
|
||||
.parse(args);
|
||||
.parseSync();
|
||||
|
||||
if (options.f?.length) {
|
||||
console.error(
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"source-map": "^0.6.1",
|
||||
"sourcemap-codec": "^1.4.8",
|
||||
"tslib": "^2.3.0",
|
||||
"yargs": "^17.0.0"
|
||||
"yargs": "^17.2.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/compiler": "0.0.0-PLACEHOLDER",
|
||||
|
||||
Reference in New Issue
Block a user