From eb46296e974c686896486350bb00bf428a84e9fd Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 10 Jul 2024 11:18:10 +1000 Subject: feat: deprecate `deno vendor` (#22183) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit deprecates `deno vendor` subcommand in favor of using `--vendor` flag or `"vendor": true` setting in the config file. The subcommand is still available (until Deno 2) but is hidden from the help output. Closes #20584 --------- Co-authored-by: Bartek Iwańczuk --- cli/tools/vendor/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cli/tools') 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(), -- cgit v1.2.3