diff options
author | Bartek Iwańczuk <biwanczuk@gmail.com> | 2024-08-30 18:58:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-30 13:58:58 -0400 |
commit | b1c6142f741a507ba6594ab174065e00213100b9 (patch) | |
tree | f3dce3e55e4b10b6cf0570dddb6f69340da7a0cf /tests/integration/install_tests.rs | |
parent | 4639ae655e9db396fdf4408961db59372334b69b (diff) |
BREAKING: `DENO_FUTURE=1` by default, or welcome to Deno 2.0 (#25213)
This commit effectively turns Deno into Deno 2.0.
This is done by forcing `DENO_FUTURE=1` env var, that was available in
the past few months to try Deno 2 changes.
This commit contains several breaking changes scheduled for Deno 2:
- all deprecated JavaScript APIs are not available any more, mostly
`Deno.*` APIs
- `window` global is removed
- FFI, WebGPU and FS APIs are now stable and don't require
`--unstable-*` flags
- import assertions are no longer supported
- "bring your own node modules" is enabled by default
This is the first commit in a series that are scheduled before the Deno
2 release.
Follow up work is tracked in
https://github.com/denoland/deno/issues/25241.
---------
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
Co-authored-by: Nathan Whitaker <nathan@deno.com>
Diffstat (limited to 'tests/integration/install_tests.rs')
-rw-r--r-- | tests/integration/install_tests.rs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/integration/install_tests.rs b/tests/integration/install_tests.rs index 744f97493..7d671e020 100644 --- a/tests/integration/install_tests.rs +++ b/tests/integration/install_tests.rs @@ -20,7 +20,7 @@ fn install_basic() { let output = context .new_command() - .args("install --check --name echo_test http://localhost:4545/echo.ts") + .args("install --check --name echo_test -g http://localhost:4545/echo.ts") .envs([ ("HOME", temp_dir_str.as_str()), ("USERPROFILE", temp_dir_str.as_str()), @@ -30,10 +30,7 @@ fn install_basic() { output.assert_exit_code(0); let output_text = output.combined_output(); - assert_contains!( - output_text, - "`deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag." - ); + assert_contains!(output_text, "✅ Successfully installed echo_test"); // no lockfile should be created locally assert!(!temp_dir.path().join("deno.lock").exists()); @@ -167,7 +164,7 @@ fn install_custom_dir_env_var() { context .new_command() .current_dir(util::root_path()) // different cwd - .args("install --check --name echo_test http://localhost:4545/echo.ts") + .args("install --check --name echo_test -g http://localhost:4545/echo.ts") .envs([ ("HOME", temp_dir_str.as_str()), ("USERPROFILE", temp_dir_str.as_str()), @@ -210,6 +207,7 @@ fn installer_test_local_module_run() { .current_dir(util::root_path()) .args_vec([ "install", + "-g", "--name", "echo_test", "--root", @@ -254,7 +252,7 @@ fn installer_test_remote_module_run() { let bin_dir = root_dir.join("bin"); context .new_command() - .args("install --name echo_test --root ./root http://localhost:4545/echo.ts hello") + .args("install --name echo_test --root ./root -g http://localhost:4545/echo.ts hello") .run() .skip_output_check() .assert_exit_code(0); @@ -296,7 +294,7 @@ fn check_local_by_default() { let script_path_str = script_path.to_string_lossy().to_string(); context .new_command() - .args_vec(["install", script_path_str.as_str()]) + .args_vec(["install", "-g", script_path_str.as_str()]) .envs([ ("HOME", temp_dir_str.as_str()), ("USERPROFILE", temp_dir_str.as_str()), @@ -320,7 +318,7 @@ fn check_local_by_default2() { let script_path_str = script_path.to_string_lossy().to_string(); context .new_command() - .args_vec(["install", script_path_str.as_str()]) + .args_vec(["install", "-g", script_path_str.as_str()]) .envs([ ("HOME", temp_dir_str.as_str()), ("NO_COLOR", "1"), |