forked from pool/deno
fix deno-rm-upgrade-cmd.patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/deno?expand=0&rev=140
This commit is contained in:
@@ -16,7 +16,7 @@ diff --git a/cli/args/flags.rs.1 b/cli/args/flags.rs
|
|||||||
index 72841df..1c93da1 100644
|
index 72841df..1c93da1 100644
|
||||||
--- a/cli/args/flags.rs.1
|
--- a/cli/args/flags.rs.1
|
||||||
+++ b/cli/args/flags.rs
|
+++ b/cli/args/flags.rs
|
||||||
@@ -262,7 +262,6 @@ pub enum DenoSubcommand {
|
@@ -262,7 +253,6 @@ pub enum DenoSubcommand {
|
||||||
Task(TaskFlags),
|
Task(TaskFlags),
|
||||||
Test(TestFlags),
|
Test(TestFlags),
|
||||||
Types,
|
Types,
|
||||||
@@ -24,7 +24,7 @@ index 72841df..1c93da1 100644
|
|||||||
Vendor(VendorFlags),
|
Vendor(VendorFlags),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -579,7 +578,7 @@ impl Flags {
|
@@ -579,7 +569,7 @@ impl Flags {
|
||||||
std::env::current_dir().ok()
|
std::env::current_dir().ok()
|
||||||
}
|
}
|
||||||
Bundle(_) | Completions(_) | Doc(_) | Fmt(_) | Init(_) | Install(_)
|
Bundle(_) | Completions(_) | Doc(_) | Fmt(_) | Init(_) | Install(_)
|
||||||
@@ -33,7 +33,7 @@ index 72841df..1c93da1 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -710,7 +709,6 @@ pub fn flags_from_vec(args: Vec<String>) -> clap::error::Result<Flags> {
|
@@ -710,7 +700,6 @@ pub fn flags_from_vec(args: Vec<String>) -> clap::error::Result<Flags> {
|
||||||
"test" => test_parse(&mut flags, &mut m),
|
"test" => test_parse(&mut flags, &mut m),
|
||||||
"types" => types_parse(&mut flags, &mut m),
|
"types" => types_parse(&mut flags, &mut m),
|
||||||
"uninstall" => uninstall_parse(&mut flags, &mut m),
|
"uninstall" => uninstall_parse(&mut flags, &mut m),
|
||||||
@@ -41,7 +41,7 @@ index 72841df..1c93da1 100644
|
|||||||
"vendor" => vendor_parse(&mut flags, &mut m),
|
"vendor" => vendor_parse(&mut flags, &mut m),
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
}
|
}
|
||||||
@@ -810,7 +808,6 @@ fn clap_root() -> Command {
|
@@ -810,7 +799,6 @@ fn clap_root() -> Command {
|
||||||
.subcommand(task_subcommand())
|
.subcommand(task_subcommand())
|
||||||
.subcommand(test_subcommand())
|
.subcommand(test_subcommand())
|
||||||
.subcommand(types_subcommand())
|
.subcommand(types_subcommand())
|
||||||
@@ -49,7 +49,7 @@ index 72841df..1c93da1 100644
|
|||||||
.subcommand(vendor_subcommand())
|
.subcommand(vendor_subcommand())
|
||||||
})
|
})
|
||||||
.long_about(DENO_HELP)
|
.long_about(DENO_HELP)
|
||||||
@@ -1864,112 +1861,6 @@ The declaration file could be saved and used for typing information.",
|
@@ -1864,59 +1852,6 @@ The declaration file could be saved and used for typing information.",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,63 +106,10 @@ index 72841df..1c93da1 100644
|
|||||||
- })
|
- })
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
-fn vendor_subcommand() -> Command {
|
fn vendor_subcommand() -> Command {
|
||||||
- Command::new("vendor")
|
Command::new("vendor")
|
||||||
- .about("Vendor remote modules into a local directory")
|
.about("Vendor remote modules into a local directory")
|
||||||
- .long_about(
|
@@ -3054,23 +2989,6 @@ fn types_parse(flags: &mut Flags, _matches: &mut ArgMatches) {
|
||||||
- "Vendor remote modules into a local directory.
|
|
||||||
-
|
|
||||||
-Analyzes the provided modules along with their dependencies, downloads
|
|
||||||
-remote modules to the output directory, and produces an import map that
|
|
||||||
-maps remote specifiers to the downloaded files.
|
|
||||||
-
|
|
||||||
- deno vendor main.ts
|
|
||||||
- deno run --import-map vendor/import_map.json main.ts
|
|
||||||
-
|
|
||||||
-Remote modules and multiple modules may also be specified:
|
|
||||||
-
|
|
||||||
- deno vendor main.ts test.deps.ts https://deno.land/std/path/mod.ts",
|
|
||||||
- )
|
|
||||||
- .defer(|cmd| cmd
|
|
||||||
- .arg(
|
|
||||||
- Arg::new("specifiers")
|
|
||||||
- .num_args(1..)
|
|
||||||
- .action(ArgAction::Append)
|
|
||||||
- .required(true),
|
|
||||||
- )
|
|
||||||
- .arg(
|
|
||||||
- Arg::new("output")
|
|
||||||
- .long("output")
|
|
||||||
- .help("The directory to output the vendored modules to")
|
|
||||||
- .value_parser(value_parser!(PathBuf))
|
|
||||||
- .value_hint(ValueHint::DirPath),
|
|
||||||
- )
|
|
||||||
- .arg(
|
|
||||||
- Arg::new("force")
|
|
||||||
- .long("force")
|
|
||||||
- .short('f')
|
|
||||||
- .help(
|
|
||||||
- "Forcefully overwrite conflicting files in existing output directory",
|
|
||||||
- )
|
|
||||||
- .action(ArgAction::SetTrue),
|
|
||||||
- )
|
|
||||||
- .arg(no_config_arg())
|
|
||||||
- .arg(config_arg())
|
|
||||||
- .arg(import_map_arg())
|
|
||||||
- .arg(lock_arg())
|
|
||||||
- .arg(node_modules_dir_arg())
|
|
||||||
- .arg(reload_arg())
|
|
||||||
- .arg(ca_file_arg()))
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-fn compile_args(app: Command) -> Command {
|
|
||||||
- compile_args_without_check_args(app.arg(no_check_arg()))
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
fn compile_args_without_check_args(app: Command) -> Command {
|
|
||||||
app
|
|
||||||
.arg(import_map_arg())
|
|
||||||
@@ -3054,23 +2945,6 @@ fn types_parse(flags: &mut Flags, _matches: &mut ArgMatches) {
|
|
||||||
flags.subcommand = DenoSubcommand::Types;
|
flags.subcommand = DenoSubcommand::Types;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,7 +133,7 @@ index 72841df..1c93da1 100644
|
|||||||
fn vendor_parse(flags: &mut Flags, matches: &mut ArgMatches) {
|
fn vendor_parse(flags: &mut Flags, matches: &mut ArgMatches) {
|
||||||
ca_file_arg_parse(flags, matches);
|
ca_file_arg_parse(flags, matches);
|
||||||
config_args_parse(flags, matches);
|
config_args_parse(flags, matches);
|
||||||
@@ -3444,25 +3318,6 @@ mod tests {
|
@@ -3444,25 +3362,6 @@ mod tests {
|
||||||
assert_eq!(flags2, flags);
|
assert_eq!(flags2, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,25 +159,22 @@ index 72841df..1c93da1 100644
|
|||||||
#[test]
|
#[test]
|
||||||
fn version() {
|
fn version() {
|
||||||
let r = flags_from_vec(svec!["deno", "--version"]);
|
let r = flags_from_vec(svec!["deno", "--version"]);
|
||||||
@@ -5899,28 +5754,6 @@ mod tests {
|
@@ -6186,25 +6085,6 @@ mod tests {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
- #[test]
|
- #[test]
|
||||||
- fn run_with_cafile() {
|
- fn upgrade_with_ca_file() {
|
||||||
- let r = flags_from_vec(svec![
|
- let r = flags_from_vec(svec!["deno", "upgrade", "--cert", "example.crt"]);
|
||||||
- "deno",
|
|
||||||
- "run",
|
|
||||||
- "--cert",
|
|
||||||
- "example.crt",
|
|
||||||
- "script.ts"
|
|
||||||
- ]);
|
|
||||||
- assert_eq!(
|
- assert_eq!(
|
||||||
- r.unwrap(),
|
- r.unwrap(),
|
||||||
- Flags {
|
- Flags {
|
||||||
- subcommand: DenoSubcommand::Run(RunFlags {
|
- subcommand: DenoSubcommand::Upgrade(UpgradeFlags {
|
||||||
- script: "script.ts".to_string(),
|
- force: false,
|
||||||
- watch: Default::default(),
|
- dry_run: false,
|
||||||
|
- canary: false,
|
||||||
|
- version: None,
|
||||||
|
- output: None,
|
||||||
- }),
|
- }),
|
||||||
- ca_data: Some(CaData::File("example.crt".to_owned())),
|
- ca_data: Some(CaData::File("example.crt".to_owned())),
|
||||||
- ..Flags::default()
|
- ..Flags::default()
|
||||||
@@ -239,5 +183,5 @@ index 72841df..1c93da1 100644
|
|||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
#[test]
|
#[test]
|
||||||
fn run_with_enable_testing_features() {
|
fn cache_with_cafile() {
|
||||||
let r = flags_from_vec(svec![
|
let r = flags_from_vec(svec![
|
||||||
|
Reference in New Issue
Block a user