diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-07-10 11:18:10 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-10 03:18:10 +0200 |
commit | eb46296e974c686896486350bb00bf428a84e9fd (patch) | |
tree | 33427c6f8560459218ed5dff3834f6ccc6cb05ca /cli/tools/vendor/mod.rs | |
parent | ff5163af05d95409cbb3d1a13f49a43fefd4849a (diff) |
feat: deprecate `deno vendor` (#22183)
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 <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tools/vendor/mod.rs')
-rw-r--r-- | cli/tools/vendor/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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(), |