mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 15:49:44 -05:00
refactor: set removal version for deno bundle
(#22062)
This change sets the removal version for the `deno bundle` sub-command for Deno v2. The warnings appear when `deno bundle` is run and in the `--help` menu.
This commit is contained in:
parent
46b91eceb1
commit
4c0b66baab
3 changed files with 8 additions and 8 deletions
|
@ -1169,7 +1169,10 @@ fn bundle_subcommand() -> Command {
|
|||
Command::new("bundle")
|
||||
.about("Bundle module and dependencies into single file")
|
||||
.long_about(
|
||||
"Output a single JavaScript file with all dependencies.
|
||||
"⚠️ Warning: `deno bundle` is deprecated and will be removed in Deno 2.0.
|
||||
Use an alternative bundler like \"deno_emit\", \"esbuild\" or \"rollup\" instead.
|
||||
|
||||
Output a single JavaScript file with all dependencies.
|
||||
|
||||
deno bundle https://deno.land/std/http/file_server.ts file_server.bundle.js
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Warning "deno bundle" is deprecated and will be removed in the future.
|
||||
Use alternative bundlers like "deno_emit", "esbuild" or "rollup" instead.
|
||||
⚠️ Warning: `deno bundle` is deprecated and will be removed in Deno 2.0.
|
||||
Use an alternative bundler like "deno_emit", "esbuild" or "rollup" instead.
|
||||
Bundle file:///[WILDCARD]/subdir/shebang_file.js
|
||||
#!/usr/bin/env -S deno run --allow-read
|
||||
// deno-fmt-ignore-file
|
||||
|
|
|
@ -21,11 +21,8 @@ pub async fn bundle(
|
|||
bundle_flags: BundleFlags,
|
||||
) -> Result<(), AnyError> {
|
||||
log::info!(
|
||||
"{} \"deno bundle\" is deprecated and will be removed in the future.",
|
||||
colors::yellow("Warning"),
|
||||
);
|
||||
log::info!(
|
||||
"Use alternative bundlers like \"deno_emit\", \"esbuild\" or \"rollup\" instead."
|
||||
"{}",
|
||||
colors::yellow("⚠️ Warning: `deno bundle` is deprecated and will be removed in Deno 2.0.\nUse an alternative bundler like \"deno_emit\", \"esbuild\" or \"rollup\" instead."),
|
||||
);
|
||||
|
||||
if let Some(watch_flags) = &bundle_flags.watch {
|
||||
|
|
Loading…
Reference in a new issue