From 795ed23b356dc044cfb497a6189d588604a6c335 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:37:13 -0700 Subject: fix(future): Emit `deno install` warning less often, suggest `deno install` in error message (#24706) Two small changes: - In our BYONM errors, suggest running `deno install` instead of `npm install` if `DENO_FUTURE` is set - Only emit warning about `deno install` changes if you do `deno install ` with deno_future unset --- tests/specs/install/future_install_local_add_deno/install.out | 1 - tests/specs/install/future_install_local_add_npm/install.out | 1 - tests/specs/install/future_install_local_deno/install.out | 1 - tests/specs/install/future_install_node_modules/corrupted.out | 1 - tests/specs/install/future_install_node_modules/install.out | 1 - tests/specs/install/future_install_node_modules/install_lockfile.out | 1 - 6 files changed, 6 deletions(-) (limited to 'tests/specs/install') diff --git a/tests/specs/install/future_install_local_add_deno/install.out b/tests/specs/install/future_install_local_add_deno/install.out index df58284fc..0c87a04aa 100644 --- a/tests/specs/install/future_install_local_add_deno/install.out +++ b/tests/specs/install/future_install_local_add_deno/install.out @@ -1,4 +1,3 @@ -⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag. Add @denotest/esm-basic - npm:@denotest/esm-basic@^1.0.0 Download http://localhost:4260/@denotest/esm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz diff --git a/tests/specs/install/future_install_local_add_npm/install.out b/tests/specs/install/future_install_local_add_npm/install.out index d9c23abf0..76939659f 100644 --- a/tests/specs/install/future_install_local_add_npm/install.out +++ b/tests/specs/install/future_install_local_add_npm/install.out @@ -1,4 +1,3 @@ -⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag. Add @denotest/esm-basic - npm:@denotest/esm-basic@^1.0.0 Download http://localhost:4260/@denotest/esm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz diff --git a/tests/specs/install/future_install_local_deno/install.out b/tests/specs/install/future_install_local_deno/install.out index 713507f02..eecba1299 100644 --- a/tests/specs/install/future_install_local_deno/install.out +++ b/tests/specs/install/future_install_local_deno/install.out @@ -1,4 +1,3 @@ -⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag. [UNORDERED_START] Download http://localhost:4545/v1/extensionless Download http://localhost:4545/subdir/mod1.ts diff --git a/tests/specs/install/future_install_node_modules/corrupted.out b/tests/specs/install/future_install_node_modules/corrupted.out index 9943c1ce9..ade075744 100644 --- a/tests/specs/install/future_install_node_modules/corrupted.out +++ b/tests/specs/install/future_install_node_modules/corrupted.out @@ -1,3 +1,2 @@ -[WILDCARD] error: Integrity check failed for package: "npm:@denotest/esm-basic@1.0.0".[WILDCARD] Use the --lock-write flag to regenerate the lockfile at [WILDCARD] \ No newline at end of file diff --git a/tests/specs/install/future_install_node_modules/install.out b/tests/specs/install/future_install_node_modules/install.out index 22574688a..b8114c12a 100644 --- a/tests/specs/install/future_install_node_modules/install.out +++ b/tests/specs/install/future_install_node_modules/install.out @@ -1,4 +1,3 @@ -⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag. Download http://localhost:4260/@denotest/esm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/install/future_install_node_modules/install_lockfile.out b/tests/specs/install/future_install_node_modules/install_lockfile.out index 3e27e3d20..05a104a3a 100644 --- a/tests/specs/install/future_install_node_modules/install_lockfile.out +++ b/tests/specs/install/future_install_node_modules/install_lockfile.out @@ -1,2 +1 @@ -⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag. Initialize @denotest/esm-basic@1.0.0 -- cgit v1.2.3