diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/args/flags.rs | 7 | ||||
-rw-r--r-- | cli/tools/vendor/mod.rs | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index d2321f32e..b07f3783a 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -2804,11 +2804,16 @@ update to a different location, use the --output flag }) } +// TODO(bartlomieju): this subcommand is now deprecated, remove it in Deno 2. fn vendor_subcommand() -> Command { Command::new("vendor") + .hide(true) .about("Vendor remote modules into a local directory") .long_about( - "Vendor remote modules into a local directory. + "⚠️ Warning: `deno vendor` is deprecated and will be removed in Deno 2.0. +Add `\"vendor\": true` to your `deno.json` or use the `--vendor` flag instead. + +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 diff --git a/cli/tools/vendor/mod.rs b/cli/tools/vendor/mod.rs index 2dfa71c44..bbb796a2a 100644 --- a/cli/tools/vendor/mod.rs +++ b/cli/tools/vendor/mod.rs @@ -12,6 +12,7 @@ use deno_core::error::AnyError; use deno_core::futures::FutureExt; use deno_core::resolve_url_or_path; use deno_graph::GraphKind; +use deno_runtime::colors; use log::warn; use crate::args::CliOptions; @@ -38,6 +39,10 @@ pub async fn vendor( flags: Flags, vendor_flags: VendorFlags, ) -> Result<(), AnyError> { + log::info!( + "{}", + colors::yellow("⚠️ Warning: `deno vendor` is deprecated and will be removed in Deno 2.0.\nAdd `\"vendor\": true` to your `deno.json` or use the `--vendor` flag instead."), + ); let mut cli_options = CliOptions::from_flags(flags)?; let raw_output_dir = match &vendor_flags.output_path { Some(output_path) => PathBuf::from(output_path).to_owned(), |