Skip to content

Commit

Permalink
build(deps): update dependency commander to v5.1.0 (#6066)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] committed Apr 28, 2020
1 parent 29b701a commit f102faf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
23 changes: 13 additions & 10 deletions lib/config/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ export function getConfig(input: string[]): RenovateCliConfig {
integer: parseInt,
};

let program = new Command().arguments('[repositories...]');
let program = new Command()
.storeOptionsAsProperties(false)
.passCommandToAction(false)
.arguments('[repositories...]');

options.forEach((option) => {
if (option.cli !== false) {
Expand Down Expand Up @@ -103,20 +106,20 @@ export function getConfig(input: string[]): RenovateCliConfig {
program = program
.version(version, '-v, --version')
.on('--help', helpConsole)
.action((repositories) => {
.action((repositories: string[], opts: Record<string, unknown>) => {
if (repositories && repositories.length) {
config.repositories = repositories;
}
})
.parse(argv);

options.forEach((option) => {
if (option.cli !== false) {
if (program[option.name] !== undefined) {
config[option.name] = program[option.name];
for (const option of options) {
if (option.cli !== false) {
if (opts[option.name] !== undefined) {
config[option.name] = opts[option.name];
}
}
}
}
});
})
.parse(argv);

return config;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"chalk": "4.0.0",
"changelog-filename-regex": "2.0.1",
"clean-git-ref": "2.0.1",
"commander": "5.0.0",
"commander": "5.1.0",
"conventional-commits-detector": "1.0.2",
"convert-hrtime": "3.0.0",
"deepmerge": "4.2.2",
Expand Down
2 changes: 1 addition & 1 deletion tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@actions/core": "1.2.3",
"@jest/reporters": "25.4.0",
"@jest/test-result": "25.4.0",
"commander": "5.0.0",
"commander": "5.1.0",
"eslint": "6.8.0",
"fs-extra": "9.0.0",
"got": "9.6.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2719,10 +2719,10 @@ combined-stream@^1.0.6, combined-stream@~1.0.6:
dependencies:
delayed-stream "~1.0.0"

commander@5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-5.0.0.tgz#dbf1909b49e5044f8fdaf0adc809f0c0722bdfd0"
integrity sha512-JrDGPAKjMGSP1G0DUoaceEJ3DZgAfr/q6X7FVk4+U5KxUSKviYGM2k6zWkfyyBHy5rAtzgYJFa1ro2O9PtoxwQ==
commander@5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae"
integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==

commander@^4.0.1:
version "4.1.1"
Expand Down

0 comments on commit f102faf

Please sign in to comment.