From cbfca0edd6108c6bc29a51e84416eae4da6cef5782b868a744f88a4f841a582c Mon Sep 17 00:00:00 2001 From: Avindra Goolcharan Date: Thu, 6 Jul 2023 01:31:43 +0000 Subject: [PATCH] fix deno-rm-upgrade-cmd.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/deno?expand=0&rev=140 --- deno-rm-upgrade-cmd.patch | 96 ++++++++------------------------------- 1 file changed, 20 insertions(+), 76 deletions(-) diff --git a/deno-rm-upgrade-cmd.patch b/deno-rm-upgrade-cmd.patch index 89a1356..0cd200f 100644 --- a/deno-rm-upgrade-cmd.patch +++ b/deno-rm-upgrade-cmd.patch @@ -16,7 +16,7 @@ diff --git a/cli/args/flags.rs.1 b/cli/args/flags.rs index 72841df..1c93da1 100644 --- a/cli/args/flags.rs.1 +++ b/cli/args/flags.rs -@@ -262,7 +262,6 @@ pub enum DenoSubcommand { +@@ -262,7 +253,6 @@ pub enum DenoSubcommand { Task(TaskFlags), Test(TestFlags), Types, @@ -24,7 +24,7 @@ index 72841df..1c93da1 100644 Vendor(VendorFlags), } -@@ -579,7 +578,7 @@ impl Flags { +@@ -579,7 +569,7 @@ impl Flags { std::env::current_dir().ok() } 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) -> clap::error::Result { +@@ -710,7 +700,6 @@ pub fn flags_from_vec(args: Vec) -> clap::error::Result { "test" => test_parse(&mut flags, &mut m), "types" => types_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), _ => unreachable!(), } -@@ -810,7 +808,6 @@ fn clap_root() -> Command { +@@ -810,7 +799,6 @@ fn clap_root() -> Command { .subcommand(task_subcommand()) .subcommand(test_subcommand()) .subcommand(types_subcommand()) @@ -49,7 +49,7 @@ index 72841df..1c93da1 100644 .subcommand(vendor_subcommand()) }) .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 { -- Command::new("vendor") -- .about("Vendor remote modules into a local directory") -- .long_about( -- "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) { + fn vendor_subcommand() -> Command { + Command::new("vendor") + .about("Vendor remote modules into a local directory") +@@ -3054,23 +2989,6 @@ fn types_parse(flags: &mut Flags, _matches: &mut ArgMatches) { flags.subcommand = DenoSubcommand::Types; } @@ -186,7 +133,7 @@ index 72841df..1c93da1 100644 fn vendor_parse(flags: &mut Flags, matches: &mut ArgMatches) { ca_file_arg_parse(flags, matches); config_args_parse(flags, matches); -@@ -3444,25 +3318,6 @@ mod tests { +@@ -3444,25 +3362,6 @@ mod tests { assert_eq!(flags2, flags); } @@ -212,25 +159,22 @@ index 72841df..1c93da1 100644 #[test] fn version() { let r = flags_from_vec(svec!["deno", "--version"]); -@@ -5899,28 +5754,6 @@ mod tests { +@@ -6186,25 +6085,6 @@ mod tests { ); } - #[test] -- fn run_with_cafile() { -- let r = flags_from_vec(svec![ -- "deno", -- "run", -- "--cert", -- "example.crt", -- "script.ts" -- ]); +- fn upgrade_with_ca_file() { +- let r = flags_from_vec(svec!["deno", "upgrade", "--cert", "example.crt"]); - assert_eq!( - r.unwrap(), - Flags { -- subcommand: DenoSubcommand::Run(RunFlags { -- script: "script.ts".to_string(), -- watch: Default::default(), +- subcommand: DenoSubcommand::Upgrade(UpgradeFlags { +- force: false, +- dry_run: false, +- canary: false, +- version: None, +- output: None, - }), - ca_data: Some(CaData::File("example.crt".to_owned())), - ..Flags::default() @@ -239,5 +183,5 @@ index 72841df..1c93da1 100644 - } - #[test] - fn run_with_enable_testing_features() { + fn cache_with_cafile() { let r = flags_from_vec(svec![