diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-11-02 16:32:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 16:32:30 +0100 |
commit | 5dea510b021d78a2c9b6aef9462ae6f4e0fd527a (patch) | |
tree | 728b3663f2852fae25df72ab2599c3cbebfc8ac9 /cli/tests/integration/run_tests.rs | |
parent | 630abb58b08827e63e56f519bf59a84c3283ab23 (diff) |
fix(lock): autodiscovery of lockfile (#16498)
This commit adds autodiscovery of lockfile.
This only happens if Deno discovers the configuration file (either
"deno.json" or "deno.jsonc"). In such case Deno tries to load
"deno.lock"
file that sits next to the configuration file, or creates one for user
if
the lockfile doesn't exist yet.
As a consequence, "--lock" and "--lock-write" flags had been updated.
"--lock" no longer requires a value, if one is not provided, it defaults
to "./deno.lock" resolved from the current working directory.
"--lock-write"
description was updated to say that it forces to overwrite a lockfile.
Autodiscovery is currently not handled by the LSP.
Diffstat (limited to 'cli/tests/integration/run_tests.rs')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 99e122c69..68d15bfd9 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -609,12 +609,6 @@ itest!(private_field_presence_no_check { output: "run/private_field_presence.ts.out", }); -itest!(lock_write_requires_lock { - args: "run --lock-write some_file.ts", - output: "run/lock_write_requires_lock.out", - exit_code: 1, -}); - // TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized itest!(lock_write_fetch { args: @@ -3634,3 +3628,10 @@ fn websocket_server_idletimeout() { assert!(child.wait().unwrap().success()); } + +itest!(auto_discover_lockfile { + args: "run run/auto_discover_lockfile/main.ts", + output: "run/auto_discover_lockfile/main.out", + http_server: true, + exit_code: 10, +}); |