Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Clap 3 -> 4 #991

Merged
merged 9 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .ci/print-command-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,14 @@ async function getCommandHelp(fnmPath, command) {
const result = await run(fnmPath, [...cmdArg, "--help"])
const text = result.stdout
const rows = text.split("\n")
const headerIndex = rows.findIndex((x) => x.includes("SUBCOMMANDS"))
const headerIndex = rows.findIndex((x) => x.includes("Commands:"))
/** @type {string[]} */
const subcommands = []
if (!command) {
for (const row of rows.slice(headerIndex + 1)) {
for (const row of rows.slice(
headerIndex + 1,
rows.indexOf("", headerIndex + 1)
)) {
const [, word] = row.split(/\s+/)
if (word && word[0].toLowerCase() === word[0]) {
subcommands.push(word)
Expand Down
137 changes: 82 additions & 55 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = "Fast and simple Node.js version manager"

[dependencies]
serde = { version = "1.0.164", features = ["derive"] }
clap = { version = "3.2.25", features = ["derive", "env"] }
clap = { version = "4.3.10", features = ["derive", "env"] }
serde_json = "1.0.99"
chrono = { version = "0.4.26", features = ["serde"] }
tar = "0.4.38"
Expand All @@ -28,7 +28,7 @@ reqwest = { version = "0.11.18", features = ["blocking", "json", "rustls-tls", "
url = "2.4.0"
sysinfo = "0.29.3"
thiserror = "1.0.40"
clap_complete = "3.2.5"
clap_complete = "4.3.1"
anyhow = "1.0.71"

[dev-dependencies]
Expand Down
Loading