Update dependency commander to v8 (#40707)

* Update dependency commander to v8

* Chore(dependencies): Changes needed to support Commander v8

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
renovate[bot]
2021-10-27 14:54:10 +01:00
committed by GitHub
parent 16f4d02419
commit 53b283ee01
6 changed files with 14 additions and 15 deletions

View File

@ -1,6 +1,6 @@
// @ts-ignore
import chalk from 'chalk';
import program from 'commander';
import { program } from 'commander';
import { promises as fs } from 'fs';
import { execTask } from './utils/execTask';
import { startTask } from './tasks/core.start';
@ -280,10 +280,11 @@ export const run = (includeInternalScripts = false) => {
program.parse(process.argv);
if (program.depreciate && program.depreciate.length === 2) {
const options = program.opts();
if (options.depreciate && options.depreciate.length === 2) {
console.log(
chalk.yellow.bold(
`[NPM script depreciation] ${program.depreciate[0]} is deprecated! Use ${program.depreciate[1]} instead!`
`[NPM script depreciation] ${options.depreciate[0]} is deprecated! Use ${options.depreciate[1]} instead!`
)
);
}