Skip to content

Commit 0b29efb

Browse files
committed
chore: update to clap 4.4.16
1 parent 0084ef6 commit 0b29efb

File tree

8 files changed

+89
-68
lines changed

8 files changed

+89
-68
lines changed

Cargo.lock

Lines changed: 80 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ serde_json = "1.0.111"
2727
lazy_static = "1.3.0"
2828
log = { version = "0.4", features = ["std"] }
2929
node-semver = "2"
30-
clap = { version = "3.2.23", features = ["derive"] }
31-
clap_complete = "3.2.5"
30+
clap = { version = "4.4.16", features = ["derive"] }
31+
clap_complete = "4.4.6"
3232
cfg-if = "1.0"
3333
mockito = { version = "0.31.1", optional = true }
3434
test-support = { path = "crates/test-support" }

src/cli.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use volta_core::session::Session;
1313
To install a tool in your toolchain, use `volta install`.
1414
To pin your project's runtime or package manager, use `volta pin`.",
1515
color = clap::ColorChoice::Auto,
16-
global_setting = clap::AppSettings::DeriveDisplayOrder,
1716
disable_version_flag = true,
1817
dont_collapse_args_in_usage = true,
1918
)]

src/command/completions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::command::Command;
1515
#[derive(Debug, clap::Args)]
1616
pub(crate) struct Completions {
1717
/// Shell to generate completions for
18-
#[clap(takes_value = true, index = 1, ignore_case = true)]
18+
#[clap(index = 1, ignore_case = true, required = true)]
1919
shell: Shell,
2020

2121
/// File to write generated completions to

src/command/fetch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::command::Command;
77
#[derive(clap::Args)]
88
pub(crate) struct Fetch {
99
/// Tools to fetch, like `node`, `yarn@latest` or `your-package@^14.4.3`.
10-
#[clap(name = "tool[@version]", required = true, min_values = 1)]
10+
#[clap(name = "tool[@version]", required = true)]
1111
tools: Vec<String>,
1212
}
1313

src/command/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::command::Command;
77
#[derive(clap::Args)]
88
pub(crate) struct Install {
99
/// Tools to install, like `node`, `yarn@latest` or `your-package@^14.4.3`.
10-
#[clap(name = "tool[@version]", required = true, min_values = 1)]
10+
#[clap(name = "tool[@version]", required = true)]
1111
tools: Vec<String>,
1212
}
1313

src/command/pin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::command::Command;
77
#[derive(clap::Args)]
88
pub(crate) struct Pin {
99
/// Tools to pin, like `node@lts` or `yarn@^1.14`.
10-
#[clap(name = "tool[@version]", required = true, min_values = 1)]
10+
#[clap(name = "tool[@version]", required = true)]
1111
tools: Vec<String>,
1212
}
1313

src/command/run.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ pub(crate) struct Run {
1717
node: Option<String>,
1818

1919
/// Set the custom npm version
20-
#[clap(long = "npm", value_name = "version", conflicts_with = "bundled-npm")]
20+
#[clap(long = "npm", value_name = "version", conflicts_with = "bundled_npm")]
2121
npm: Option<String>,
2222

2323
/// Forces npm to be the version bundled with Node
2424
#[clap(long = "bundled-npm", conflicts_with = "npm")]
2525
bundled_npm: bool,
2626

2727
/// Set the custon pnpm version
28-
#[clap(long = "pnpm", value_name = "version", conflicts_with = "no-pnpm")]
28+
#[clap(long = "pnpm", value_name = "version", conflicts_with = "no_pnpm")]
2929
pnpm: Option<String>,
3030

3131
/// Disables pnpm
3232
#[clap(long = "no-pnpm", conflicts_with = "pnpm")]
3333
no_pnpm: bool,
3434

3535
/// Set the custom Yarn version
36-
#[clap(long = "yarn", value_name = "version", conflicts_with = "no-yarn")]
36+
#[clap(long = "yarn", value_name = "version", conflicts_with = "no_yarn")]
3737
yarn: Option<String>,
3838

3939
/// Disables Yarn

0 commit comments

Comments
 (0)