mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
chore: rename do-not-use-publish (#21854)
This commit is contained in:
parent
fb651776e4
commit
4d83471e58
2 changed files with 7 additions and 9 deletions
|
@ -357,7 +357,6 @@ pub enum DenoSubcommand {
|
|||
Types,
|
||||
Upgrade(UpgradeFlags),
|
||||
Vendor(VendorFlags),
|
||||
// TODO:
|
||||
Publish(PublishFlags),
|
||||
}
|
||||
|
||||
|
@ -942,8 +941,7 @@ pub fn flags_from_vec(args: Vec<String>) -> clap::error::Result<Flags> {
|
|||
"uninstall" => uninstall_parse(&mut flags, &mut m),
|
||||
"upgrade" => upgrade_parse(&mut flags, &mut m),
|
||||
"vendor" => vendor_parse(&mut flags, &mut m),
|
||||
// TODO:
|
||||
"do-not-use-publish" => publish_parse(&mut flags, &mut m),
|
||||
"publish" => publish_parse(&mut flags, &mut m),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
} else {
|
||||
|
@ -2372,9 +2370,9 @@ Remote modules and multiple modules may also be specified:
|
|||
}
|
||||
|
||||
fn publish_subcommand() -> Command {
|
||||
Command::new("do-not-use-publish")
|
||||
Command::new("publish")
|
||||
.hide(true)
|
||||
.about("Publish a package to the Deno registry")
|
||||
.about("Unstable preview feature: Publish a package")
|
||||
// TODO: .long_about()
|
||||
.defer(|cmd| {
|
||||
cmd.arg(
|
||||
|
@ -2382,6 +2380,7 @@ fn publish_subcommand() -> Command {
|
|||
.help(
|
||||
"The directory to the package, or workspace of packages to publish",
|
||||
)
|
||||
.default_missing_value(".")
|
||||
.value_hint(ValueHint::DirPath)
|
||||
.required(true),
|
||||
)
|
||||
|
|
|
@ -10,21 +10,20 @@ pub fn env_vars_for_registry() -> Vec<(String, String)> {
|
|||
}
|
||||
|
||||
itest!(no_token {
|
||||
args: "do-not-use-publish publish/missing_deno_json",
|
||||
args: "publish publish/missing_deno_json",
|
||||
output: "publish/no_token.out",
|
||||
exit_code: 1,
|
||||
});
|
||||
|
||||
itest!(missing_deno_json {
|
||||
args:
|
||||
"do-not-use-publish --token 'sadfasdf' $TESTDATA/publish/missing_deno_json",
|
||||
args: "publish --token 'sadfasdf' $TESTDATA/publish/missing_deno_json",
|
||||
output: "publish/missing_deno_json.out",
|
||||
exit_code: 1,
|
||||
temp_cwd: true,
|
||||
});
|
||||
|
||||
itest!(successful {
|
||||
args: "do-not-use-publish --token 'sadfasdf' $TESTDATA/publish/successful",
|
||||
args: "publish --token 'sadfasdf' $TESTDATA/publish/successful",
|
||||
output: "publish/successful.out",
|
||||
envs: env_vars_for_registry(),
|
||||
http_server: true,
|
||||
|
|
Loading…
Reference in a new issue