Skip to content

Commit

Permalink
Update devdependecy commander (#66771)
Browse files Browse the repository at this point in the history
Upgrade devdependecy commander to latest versio.

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

---------

Co-authored-by: torresgol10.itd <[email protected]>
Co-authored-by: Sam Ko <[email protected]>
  • Loading branch information
3 people authored Jun 12, 2024
1 parent 535d466 commit bebc63f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
9 changes: 5 additions & 4 deletions packages/create-next-app/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/* eslint-disable import/no-extraneous-dependencies */
import { cyan, green, red, yellow, bold, blue } from 'picocolors'
import Commander from 'commander'
import { Command } from 'commander'
import Conf from 'conf'
import path from 'path'
import prompts from 'prompts'
Expand Down Expand Up @@ -36,10 +36,10 @@ const onPromptState = (state: {
}
}

const program = new Commander.Command(packageJson.name)
const program = new Command(packageJson.name)
.version(packageJson.version)
.arguments('<project-directory>')
.usage(`${green('<project-directory>')} [options]`)
.argument('[project-directory]')
.usage(`${green('[project-directory]')} [options]`)
.action((name) => {
projectPath = name
})
Expand Down Expand Up @@ -169,6 +169,7 @@ const program = new Commander.Command(packageJson.name)
)
.allowUnknownOption()
.parse(process.argv)
.opts()

const packageManager = !!program.useNpm
? 'npm'
Expand Down
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@vercel/ncc": "0.34.0",
"async-retry": "1.3.1",
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
"commander": "2.20.0",
"commander": "12.1.0",
"conf": "10.2.0",
"cross-spawn": "7.0.3",
"fast-glob": "3.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
"cli-select": "1.1.2",
"client-only": "0.0.1",
"commander": "12.0.0",
"commander": "12.1.0",
"comment-json": "3.0.3",
"compression": "1.7.4",
"conf": "5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/compiled/commander/index.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bebc63f

Please sign in to comment.