Unverified Commit bebc63fc authored by Ivan Torres's avatar Ivan Torres Committed by GitHub

Update devdependecy commander (#66771)

Upgrade devdependecy commander to latest versio.

Now in command, the optional argument is with [] and the required
argument is with <>.

---------
Co-authored-by: 's avatartorresgol10.itd <torresgol10.itd@gmail.com>
Co-authored-by: 's avatarSam Ko <sam@vercel.com>
parent 535d4667
#!/usr/bin/env node #!/usr/bin/env node
/* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable import/no-extraneous-dependencies */
import { cyan, green, red, yellow, bold, blue } from 'picocolors' import { cyan, green, red, yellow, bold, blue } from 'picocolors'
import Commander from 'commander' import { Command } from 'commander'
import Conf from 'conf' import Conf from 'conf'
import path from 'path' import path from 'path'
import prompts from 'prompts' import prompts from 'prompts'
...@@ -36,10 +36,10 @@ const onPromptState = (state: { ...@@ -36,10 +36,10 @@ const onPromptState = (state: {
} }
} }
const program = new Commander.Command(packageJson.name) const program = new Command(packageJson.name)
.version(packageJson.version) .version(packageJson.version)
.arguments('<project-directory>') .argument('[project-directory]')
.usage(`${green('<project-directory>')} [options]`) .usage(`${green('[project-directory]')} [options]`)
.action((name) => { .action((name) => {
projectPath = name projectPath = name
}) })
...@@ -169,6 +169,7 @@ const program = new Commander.Command(packageJson.name) ...@@ -169,6 +169,7 @@ const program = new Commander.Command(packageJson.name)
) )
.allowUnknownOption() .allowUnknownOption()
.parse(process.argv) .parse(process.argv)
.opts()
const packageManager = !!program.useNpm const packageManager = !!program.useNpm
? 'npm' ? 'npm'
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
"@vercel/ncc": "0.34.0", "@vercel/ncc": "0.34.0",
"async-retry": "1.3.1", "async-retry": "1.3.1",
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540", "ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
"commander": "2.20.0", "commander": "12.1.0",
"conf": "10.2.0", "conf": "10.2.0",
"cross-spawn": "7.0.3", "cross-spawn": "7.0.3",
"fast-glob": "3.3.1", "fast-glob": "3.3.1",
......
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540", "ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
"cli-select": "1.1.2", "cli-select": "1.1.2",
"client-only": "0.0.1", "client-only": "0.0.1",
"commander": "12.0.0", "commander": "12.1.0",
"comment-json": "3.0.3", "comment-json": "3.0.3",
"compression": "1.7.4", "compression": "1.7.4",
"conf": "5.0.0", "conf": "5.0.0",
......
...@@ -738,8 +738,8 @@ importers: ...@@ -738,8 +738,8 @@ importers:
specifier: watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540 specifier: watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540
version: github.com/watson/ci-info/f43f6a1cefff47fb361c88cf4b943fdbcaafe540 version: github.com/watson/ci-info/f43f6a1cefff47fb361c88cf4b943fdbcaafe540
commander: commander:
specifier: 2.20.0 specifier: 12.1.0
version: 2.20.0 version: 12.1.0
conf: conf:
specifier: 10.2.0 specifier: 10.2.0
version: 10.2.0 version: 10.2.0
...@@ -1159,8 +1159,8 @@ importers: ...@@ -1159,8 +1159,8 @@ importers:
specifier: 0.0.1 specifier: 0.0.1
version: 0.0.1 version: 0.0.1
commander: commander:
specifier: 12.0.0 specifier: 12.1.0
version: 12.0.0 version: 12.1.0
comment-json: comment-json:
specifier: 3.0.3 specifier: 3.0.3
version: 3.0.3 version: 3.0.3
...@@ -10074,8 +10074,8 @@ packages: ...@@ -10074,8 +10074,8 @@ packages:
engines: {node: '>=16'} engines: {node: '>=16'}
dev: true dev: true
/commander@12.0.0: /commander@12.1.0:
resolution: {integrity: sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==} resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==}
engines: {node: '>=18'} engines: {node: '>=18'}
dev: true dev: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment