mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 04:09:50 +08:00
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:
@ -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!`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user