1
0
Fork 0
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:
Ryan Dahl 2024-01-08 15:07:36 -05:00 committed by Bartek Iwańczuk
parent fb651776e4
commit 4d83471e58
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750
2 changed files with 7 additions and 9 deletions

View file

@ -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),
)

View file

@ -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,