From 5dea510b021d78a2c9b6aef9462ae6f4e0fd527a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 2 Nov 2022 16:32:30 +0100 Subject: 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. --- cli/tests/testdata/npm/lock_file/main.out | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'cli/tests/testdata/npm') diff --git a/cli/tests/testdata/npm/lock_file/main.out b/cli/tests/testdata/npm/lock_file/main.out index 4c034d03b..b8447bee6 100644 --- a/cli/tests/testdata/npm/lock_file/main.out +++ b/cli/tests/testdata/npm/lock_file/main.out @@ -1,4 +1,9 @@ Download [WILDCARD] -error: Integrity check failed for npm package: "@babel/parser@7.19.0". - Cache has "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==" and lockfile has "sha512-foobar!". - Use "--lock-write" flag to update the lockfile. +error: Integrity check failed for npm package: "@babel/parser@7.19.0". Unable to verify that the package +is the same as when the lockfile was generated. + +This could be caused by: + * the lock file may be corrupt + * the source itself may be corrupt + +Use "--lock-write" flag to regenerate the lockfile at "[WILDCARD]lock.json". -- cgit v1.2.3