summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-28 14:58:43 -0400
committerGitHub <noreply@github.com>2024-05-28 14:58:43 -0400
commit448fe67b7a2142f62332b651f9d215534dceb1f5 (patch)
tree3cfc763f39bf275a537e6228767b3e43866f5d0f /tests/specs
parentcd8f5f53f7616e4c74de0f1ff5eadd6ef024118a (diff)
feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979)
Includes: * https://github.com/denoland/deno_graph/pull/486 * https://github.com/denoland/deno_graph/pull/488 * https://github.com/denoland/deno_lockfile/pull/25 * https://github.com/denoland/deno_lockfile/pull/22 * https://github.com/denoland/deno_graph/pull/483 * https://github.com/denoland/deno_graph/pull/470
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/bundle/lockfile/__test__.jsonc5
-rw-r--r--tests/specs/bundle/lockfile/check_error.json5
-rw-r--r--tests/specs/bundle/lockfile/check_error.out12
-rw-r--r--tests/specs/install/future_install_node_modules/corrupted.out2
-rw-r--r--tests/specs/jsr/version_not_found/main.out3
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/__test__.jsonc16
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/add.ts1
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/deno.json9
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/lock01.out20
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/lock02.out24
-rw-r--r--tests/specs/lockfile/adding_jsr_dep/subtract.ts1
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/__test__.jsonc16
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/add.ts1
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/deno.json8
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/lock01.out26
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/lock02.out31
-rw-r--r--tests/specs/lockfile/adding_jsr_export_new_dep/subtract.ts1
-rw-r--r--tests/specs/lockfile/adding_npm_dep/__test__.jsonc16
-rw-r--r--tests/specs/lockfile/adding_npm_dep/add.ts1
-rw-r--r--tests/specs/lockfile/adding_npm_dep/deno.json9
-rw-r--r--tests/specs/lockfile/adding_npm_dep/lock01.out21
-rw-r--r--tests/specs/lockfile/adding_npm_dep/lock02.out26
-rw-r--r--tests/specs/lockfile/adding_npm_dep/subtract.ts1
-rw-r--r--tests/specs/lockfile/adding_redirect/1.ts1
-rw-r--r--tests/specs/lockfile/adding_redirect/2.ts1
-rw-r--r--tests/specs/lockfile/adding_redirect/__test__.jsonc16
-rw-r--r--tests/specs/lockfile/adding_redirect/deno.json5
-rw-r--r--tests/specs/lockfile/adding_redirect/lock01.out6
-rw-r--r--tests/specs/lockfile/adding_redirect/lock02.out9
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/deno.json3
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/deno.lock7
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/main.out13
-rw-r--r--tests/specs/lockfile/auto_discover_lockfile/main.ts1
-rw-r--r--tests/specs/lockfile/checksum_at_redirect/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/checksum_at_redirect/deno.json2
-rw-r--r--tests/specs/lockfile/checksum_at_redirect/deno.lock6
-rw-r--r--tests/specs/lockfile/checksum_at_redirect/run.out12
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc13
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/deno.lock7
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/false.json3
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/false.main.out2
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/main.ts1
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/true.json3
-rw-r--r--tests/specs/lockfile/config_file_lock_boolean/true.main.out11
-rw-r--r--tests/specs/lockfile/config_file_lock_path/019_media_types.ts.out1
-rw-r--r--tests/specs/lockfile/config_file_lock_path/__test__.jsonc13
-rw-r--r--tests/specs/lockfile/config_file_lock_path/config_file_lock_path.json3
-rw-r--r--tests/specs/lockfile/config_file_lock_path/config_file_lock_path.out11
-rw-r--r--tests/specs/lockfile/config_file_lock_path/lock_check_err2.json10
-rw-r--r--tests/specs/lockfile/config_file_lock_path/lock_check_err2.out11
-rw-r--r--tests/specs/lockfile/config_file_lock_path/lock_check_ok2.json13
-rw-r--r--tests/specs/lockfile/config_file_lock_path/run/lock_check_ok2.json14
-rw-r--r--tests/specs/lockfile/lock_check_err/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_check_err/lock_check_err.json4
-rw-r--r--tests/specs/lockfile/lock_check_err/lock_check_err.out11
-rw-r--r--tests/specs/lockfile/lock_check_err2/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_check_err2/lock_check_err2.json10
-rw-r--r--tests/specs/lockfile/lock_check_err2/lock_check_err2.out11
-rw-r--r--tests/specs/lockfile/lock_dynamic_imports/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.json6
-rw-r--r--tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.out12
-rw-r--r--tests/specs/lockfile/lock_v2_check_err/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.json7
-rw-r--r--tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.out11
-rw-r--r--tests/specs/lockfile/lock_v2_check_err2/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.json13
-rw-r--r--tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.out11
-rw-r--r--tests/specs/lockfile/lock_v2_dynamic_imports/__test__.jsonc5
-rw-r--r--tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.json9
-rw-r--r--tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.out12
-rw-r--r--tests/specs/lockfile/no_lock/__test__.jsonc67
-rw-r--r--tests/specs/lockfile/no_lock/bench.nolock.out1
-rw-r--r--tests/specs/lockfile/no_lock/doc.nolock.out1
-rw-r--r--tests/specs/lockfile/no_lock/fail.out15
-rw-r--r--tests/specs/lockfile/no_lock/fail_initial.out4
-rw-r--r--tests/specs/lockfile/no_lock/info.nolock.out1
-rw-r--r--tests/specs/lockfile/no_lock/test.nolock.out1
-rw-r--r--tests/specs/npm/lock_file_integrity_failure/__test__.jsonc5
-rw-r--r--tests/specs/npm/lock_file_integrity_failure/lock.json164
-rw-r--r--tests/specs/npm/lock_file_integrity_failure/main.js5
-rw-r--r--tests/specs/npm/lock_file_integrity_failure/main.out12
82 files changed, 847 insertions, 39 deletions
diff --git a/tests/specs/bundle/lockfile/__test__.jsonc b/tests/specs/bundle/lockfile/__test__.jsonc
new file mode 100644
index 000000000..3fe64a28b
--- /dev/null
+++ b/tests/specs/bundle/lockfile/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "bundle --lock=check_error.json http://127.0.0.1:4545/subdir/mod1.ts",
+ "output": "check_error.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/bundle/lockfile/check_error.json b/tests/specs/bundle/lockfile/check_error.json
new file mode 100644
index 000000000..a218d7000
--- /dev/null
+++ b/tests/specs/bundle/lockfile/check_error.json
@@ -0,0 +1,5 @@
+{
+ "http://127.0.0.1:4545/subdir/mod1.ts": "bfc1037b02c99abc20367f739bca7455813a5950066abd77965bff33b6eece0f",
+ "http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
+ "http://127.0.0.1:4545/subdir/subdir2/mod2.ts": "bad"
+}
diff --git a/tests/specs/bundle/lockfile/check_error.out b/tests/specs/bundle/lockfile/check_error.out
new file mode 100644
index 000000000..2b8bdfc96
--- /dev/null
+++ b/tests/specs/bundle/lockfile/check_error.out
@@ -0,0 +1,12 @@
+[WILDCARD]
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://127.0.0.1:4545/subdir/subdir2/mod2.ts
+ Actual: 8b3b670d25d238dfa72df119140406b96766a00fee635f3606429fe065b18fd1
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/install/future_install_node_modules/corrupted.out b/tests/specs/install/future_install_node_modules/corrupted.out
index 89578cbe2..9943c1ce9 100644
--- a/tests/specs/install/future_install_node_modules/corrupted.out
+++ b/tests/specs/install/future_install_node_modules/corrupted.out
@@ -1,3 +1,3 @@
[WILDCARD]
error: Integrity check failed for package: "npm:@denotest/esm-basic@1.0.0".[WILDCARD]
-Use "--lock-write" flag to regenerate the lockfile at [WILDCARD] \ No newline at end of file
+Use the --lock-write flag to regenerate the lockfile at [WILDCARD] \ No newline at end of file
diff --git a/tests/specs/jsr/version_not_found/main.out b/tests/specs/jsr/version_not_found/main.out
index 6a32b5d81..081917d71 100644
--- a/tests/specs/jsr/version_not_found/main.out
+++ b/tests/specs/jsr/version_not_found/main.out
@@ -1,5 +1,4 @@
Download http://127.0.0.1:4250/@denotest/deps/meta.json
Download http://127.0.0.1:4250/@denotest/deps/meta.json
-error: Could not find constraint in the list of versions: @denotest/deps@0.1.4
- Specifier: jsr:@denotest/deps@0.1.4/mod.ts
+error: Could not find version of '@denotest/deps' that matches specified version constraint '0.1.4'
at file:///[WILDCARD]/version_not_found/main.ts:1:19
diff --git a/tests/specs/lockfile/adding_jsr_dep/__test__.jsonc b/tests/specs/lockfile/adding_jsr_dep/__test__.jsonc
new file mode 100644
index 000000000..905aaf49c
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": "run add.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock01.out"
+ }, {
+ "args": "run subtract.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock02.out"
+ }]
+}
diff --git a/tests/specs/lockfile/adding_jsr_dep/add.ts b/tests/specs/lockfile/adding_jsr_dep/add.ts
new file mode 100644
index 000000000..c0fe70808
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/add.ts
@@ -0,0 +1 @@
+import "add";
diff --git a/tests/specs/lockfile/adding_jsr_dep/deno.json b/tests/specs/lockfile/adding_jsr_dep/deno.json
new file mode 100644
index 000000000..c37f65adc
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/deno.json
@@ -0,0 +1,9 @@
+{
+ "tasks": {
+ "cat": "cat"
+ },
+ "imports": {
+ "add": "jsr:@denotest/add@1",
+ "subtract": "jsr:@denotest/subtract@1"
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_dep/lock01.out b/tests/specs/lockfile/adding_jsr_dep/lock01.out
new file mode 100644
index 000000000..0ac007526
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/lock01.out
@@ -0,0 +1,20 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "jsr:@denotest/add@1": "jsr:@denotest/add@1.0.0"
+ },
+ "jsr": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]"
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "jsr:@denotest/add@1",
+ "jsr:@denotest/subtract@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_dep/lock02.out b/tests/specs/lockfile/adding_jsr_dep/lock02.out
new file mode 100644
index 000000000..4293c7dfe
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/lock02.out
@@ -0,0 +1,24 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "jsr:@denotest/add@1": "jsr:@denotest/add@1.0.0",
+ "jsr:@denotest/subtract@1": "jsr:@denotest/subtract@1.0.0"
+ },
+ "jsr": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]"
+ },
+ "@denotest/subtract@1.0.0": {
+ "integrity": "[WILDLINE]"
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "jsr:@denotest/add@1",
+ "jsr:@denotest/subtract@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_dep/subtract.ts b/tests/specs/lockfile/adding_jsr_dep/subtract.ts
new file mode 100644
index 000000000..b07f2cdfd
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_dep/subtract.ts
@@ -0,0 +1 @@
+import "subtract";
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/__test__.jsonc b/tests/specs/lockfile/adding_jsr_export_new_dep/__test__.jsonc
new file mode 100644
index 000000000..905aaf49c
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": "run add.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock01.out"
+ }, {
+ "args": "run subtract.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock02.out"
+ }]
+}
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/add.ts b/tests/specs/lockfile/adding_jsr_export_new_dep/add.ts
new file mode 100644
index 000000000..06492d2ec
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/add.ts
@@ -0,0 +1 @@
+import "different-deps-per-export/add";
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/deno.json b/tests/specs/lockfile/adding_jsr_export_new_dep/deno.json
new file mode 100644
index 000000000..b26a08521
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/deno.json
@@ -0,0 +1,8 @@
+{
+ "tasks": {
+ "cat": "cat"
+ },
+ "imports": {
+ "different-deps-per-export": "jsr:@denotest/different-deps-per-export@1"
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/lock01.out b/tests/specs/lockfile/adding_jsr_export_new_dep/lock01.out
new file mode 100644
index 000000000..e78ea355a
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/lock01.out
@@ -0,0 +1,26 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "jsr:@denotest/add@1": "jsr:@denotest/add@1.0.0",
+ "jsr:@denotest/different-deps-per-export@1": "jsr:@denotest/different-deps-per-export@1.0.0"
+ },
+ "jsr": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]"
+ },
+ "@denotest/different-deps-per-export@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": [
+ "jsr:@denotest/add@1"
+ ]
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "jsr:@denotest/different-deps-per-export@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/lock02.out b/tests/specs/lockfile/adding_jsr_export_new_dep/lock02.out
new file mode 100644
index 000000000..0f4a388c6
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/lock02.out
@@ -0,0 +1,31 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "jsr:@denotest/add@1": "jsr:@denotest/add@1.0.0",
+ "jsr:@denotest/different-deps-per-export@1": "jsr:@denotest/different-deps-per-export@1.0.0",
+ "jsr:@denotest/subtract@1": "jsr:@denotest/subtract@1.0.0"
+ },
+ "jsr": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]"
+ },
+ "@denotest/different-deps-per-export@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": [
+ "jsr:@denotest/add@1",
+ "jsr:@denotest/subtract@1"
+ ]
+ },
+ "@denotest/subtract@1.0.0": {
+ "integrity": "[WILDLINE]"
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "jsr:@denotest/different-deps-per-export@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_jsr_export_new_dep/subtract.ts b/tests/specs/lockfile/adding_jsr_export_new_dep/subtract.ts
new file mode 100644
index 000000000..1576e29e2
--- /dev/null
+++ b/tests/specs/lockfile/adding_jsr_export_new_dep/subtract.ts
@@ -0,0 +1 @@
+import "different-deps-per-export/subtract";
diff --git a/tests/specs/lockfile/adding_npm_dep/__test__.jsonc b/tests/specs/lockfile/adding_npm_dep/__test__.jsonc
new file mode 100644
index 000000000..905aaf49c
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": "run add.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock01.out"
+ }, {
+ "args": "run subtract.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock02.out"
+ }]
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/add.ts b/tests/specs/lockfile/adding_npm_dep/add.ts
new file mode 100644
index 000000000..c0fe70808
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/add.ts
@@ -0,0 +1 @@
+import "add";
diff --git a/tests/specs/lockfile/adding_npm_dep/deno.json b/tests/specs/lockfile/adding_npm_dep/deno.json
new file mode 100644
index 000000000..b3bfef815
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/deno.json
@@ -0,0 +1,9 @@
+{
+ "tasks": {
+ "cat": "cat"
+ },
+ "imports": {
+ "add": "npm:@denotest/add@1",
+ "subtract": "npm:@denotest/subtract@1"
+ }
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/lock01.out b/tests/specs/lockfile/adding_npm_dep/lock01.out
new file mode 100644
index 000000000..5d5567dc0
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/lock01.out
@@ -0,0 +1,21 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "npm:@denotest/add@1": "npm:@denotest/add@1.0.0"
+ },
+ "npm": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": {}
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "npm:@denotest/add@1",
+ "npm:@denotest/subtract@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/lock02.out b/tests/specs/lockfile/adding_npm_dep/lock02.out
new file mode 100644
index 000000000..6042b1cb9
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/lock02.out
@@ -0,0 +1,26 @@
+{
+ "version": "3",
+ "packages": {
+ "specifiers": {
+ "npm:@denotest/add@1": "npm:@denotest/add@1.0.0",
+ "npm:@denotest/subtract@1": "npm:@denotest/subtract@1.0.0"
+ },
+ "npm": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": {}
+ },
+ "@denotest/subtract@1.0.0": {
+ "integrity": "[WILDLINE]",
+ "dependencies": {}
+ }
+ }
+ },
+ "remote": {},
+ "workspace": {
+ "dependencies": [
+ "npm:@denotest/add@1",
+ "npm:@denotest/subtract@1"
+ ]
+ }
+}
diff --git a/tests/specs/lockfile/adding_npm_dep/subtract.ts b/tests/specs/lockfile/adding_npm_dep/subtract.ts
new file mode 100644
index 000000000..b07f2cdfd
--- /dev/null
+++ b/tests/specs/lockfile/adding_npm_dep/subtract.ts
@@ -0,0 +1 @@
+import "subtract";
diff --git a/tests/specs/lockfile/adding_redirect/1.ts b/tests/specs/lockfile/adding_redirect/1.ts
new file mode 100644
index 000000000..7556f2266
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/1.ts
@@ -0,0 +1 @@
+import "http://localhost:4545/welcome.ts";
diff --git a/tests/specs/lockfile/adding_redirect/2.ts b/tests/specs/lockfile/adding_redirect/2.ts
new file mode 100644
index 000000000..525b6bc7e
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/2.ts
@@ -0,0 +1 @@
+import "http://localhost:4546/welcome.ts";
diff --git a/tests/specs/lockfile/adding_redirect/__test__.jsonc b/tests/specs/lockfile/adding_redirect/__test__.jsonc
new file mode 100644
index 000000000..d53beedbd
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/__test__.jsonc
@@ -0,0 +1,16 @@
+{
+ "tempDir": true,
+ "steps": [{
+ "args": "run 1.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock01.out"
+ }, {
+ "args": "run 2.ts",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "task --quiet cat deno.lock",
+ "output": "lock02.out"
+ }]
+}
diff --git a/tests/specs/lockfile/adding_redirect/deno.json b/tests/specs/lockfile/adding_redirect/deno.json
new file mode 100644
index 000000000..75cddd826
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/deno.json
@@ -0,0 +1,5 @@
+{
+ "tasks": {
+ "cat": "cat"
+ }
+}
diff --git a/tests/specs/lockfile/adding_redirect/lock01.out b/tests/specs/lockfile/adding_redirect/lock01.out
new file mode 100644
index 000000000..f00cefa6a
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/lock01.out
@@ -0,0 +1,6 @@
+{
+ "version": "3",
+ "remote": {
+ "http://localhost:4545/welcome.ts": "7353d5fcbc36c45d26bcbca478cf973092523b07c45999f41319820092b4de31"
+ }
+}
diff --git a/tests/specs/lockfile/adding_redirect/lock02.out b/tests/specs/lockfile/adding_redirect/lock02.out
new file mode 100644
index 000000000..70c38c966
--- /dev/null
+++ b/tests/specs/lockfile/adding_redirect/lock02.out
@@ -0,0 +1,9 @@
+{
+ "version": "3",
+ "redirects": {
+ "http://localhost:4546/welcome.ts": "http://localhost:4545/welcome.ts"
+ },
+ "remote": {
+ "http://localhost:4545/welcome.ts": "7353d5fcbc36c45d26bcbca478cf973092523b07c45999f41319820092b4de31"
+ }
+}
diff --git a/tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc b/tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc
new file mode 100644
index 000000000..50213381a
--- /dev/null
+++ b/tests/specs/lockfile/auto_discover_lockfile/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run main.ts",
+ "output": "main.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/auto_discover_lockfile/deno.json b/tests/specs/lockfile/auto_discover_lockfile/deno.json
new file mode 100644
index 000000000..90faa728a
--- /dev/null
+++ b/tests/specs/lockfile/auto_discover_lockfile/deno.json
@@ -0,0 +1,3 @@
+{
+ "tasks": {}
+}
diff --git a/tests/specs/lockfile/auto_discover_lockfile/deno.lock b/tests/specs/lockfile/auto_discover_lockfile/deno.lock
new file mode 100644
index 000000000..059f66789
--- /dev/null
+++ b/tests/specs/lockfile/auto_discover_lockfile/deno.lock
@@ -0,0 +1,7 @@
+{
+ "version": "2",
+ "remote": {
+ "http://localhost:4545/subdir/mod2.ts": "cae1d3e9f3c38cd415ff52dff854be8f3d17d35f8d7b3d285e813fb0f6393a2f",
+ "http://localhost:4545/subdir/print_hello.ts": "foobar"
+ }
+}
diff --git a/tests/specs/lockfile/auto_discover_lockfile/main.out b/tests/specs/lockfile/auto_discover_lockfile/main.out
new file mode 100644
index 000000000..aa24320d1
--- /dev/null
+++ b/tests/specs/lockfile/auto_discover_lockfile/main.out
@@ -0,0 +1,13 @@
+Download http://localhost:4545/subdir/mod2.ts
+Download http://localhost:4545/subdir/print_hello.ts
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/print_hello.ts
+ Actual: fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c
+ Expected: foobar
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/auto_discover_lockfile/main.ts b/tests/specs/lockfile/auto_discover_lockfile/main.ts
new file mode 100644
index 000000000..baa52775d
--- /dev/null
+++ b/tests/specs/lockfile/auto_discover_lockfile/main.ts
@@ -0,0 +1 @@
+import "http://localhost:4545/subdir/mod2.ts";
diff --git a/tests/specs/lockfile/checksum_at_redirect/__test__.jsonc b/tests/specs/lockfile/checksum_at_redirect/__test__.jsonc
new file mode 100644
index 000000000..66d9850da
--- /dev/null
+++ b/tests/specs/lockfile/checksum_at_redirect/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --config=deno.json http://localhost:4546/run/001_hello.js",
+ "output": "run.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/checksum_at_redirect/deno.json b/tests/specs/lockfile/checksum_at_redirect/deno.json
new file mode 100644
index 000000000..2c63c0851
--- /dev/null
+++ b/tests/specs/lockfile/checksum_at_redirect/deno.json
@@ -0,0 +1,2 @@
+{
+}
diff --git a/tests/specs/lockfile/checksum_at_redirect/deno.lock b/tests/specs/lockfile/checksum_at_redirect/deno.lock
new file mode 100644
index 000000000..12e84cd01
--- /dev/null
+++ b/tests/specs/lockfile/checksum_at_redirect/deno.lock
@@ -0,0 +1,6 @@
+{
+ "version": "3",
+ "remote": {
+ "http://localhost:4546/run/001_hello.js": "c479db5ea26965387423ca438bb977d0b4788d5901efcef52f69871e4c1048c5"
+ }
+}
diff --git a/tests/specs/lockfile/checksum_at_redirect/run.out b/tests/specs/lockfile/checksum_at_redirect/run.out
new file mode 100644
index 000000000..75a34777f
--- /dev/null
+++ b/tests/specs/lockfile/checksum_at_redirect/run.out
@@ -0,0 +1,12 @@
+Download http://localhost:4546/run/001_hello.js
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4546/run/001_hello.js
+ Actual: Redirect to http://localhost:4545/run/001_hello.js
+ Expected: c479db5ea26965387423ca438bb977d0b4788d5901efcef52f69871e4c1048c5
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc b/tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc
new file mode 100644
index 000000000..65679a1c8
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/__test__.jsonc
@@ -0,0 +1,13 @@
+{
+ "tests": {
+ "true": {
+ "args": "run --config=true.json main.ts",
+ "output": "true.main.out",
+ "exitCode": 10
+ },
+ "false": {
+ "args": "run --config=false.json main.ts",
+ "output": "false.main.out"
+ }
+ }
+}
diff --git a/tests/specs/lockfile/config_file_lock_boolean/deno.lock b/tests/specs/lockfile/config_file_lock_boolean/deno.lock
new file mode 100644
index 000000000..059f66789
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/deno.lock
@@ -0,0 +1,7 @@
+{
+ "version": "2",
+ "remote": {
+ "http://localhost:4545/subdir/mod2.ts": "cae1d3e9f3c38cd415ff52dff854be8f3d17d35f8d7b3d285e813fb0f6393a2f",
+ "http://localhost:4545/subdir/print_hello.ts": "foobar"
+ }
+}
diff --git a/tests/specs/lockfile/config_file_lock_boolean/false.json b/tests/specs/lockfile/config_file_lock_boolean/false.json
new file mode 100644
index 000000000..358b7d299
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/false.json
@@ -0,0 +1,3 @@
+{
+ "lock": false
+}
diff --git a/tests/specs/lockfile/config_file_lock_boolean/false.main.out b/tests/specs/lockfile/config_file_lock_boolean/false.main.out
new file mode 100644
index 000000000..0d8f0a237
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/false.main.out
@@ -0,0 +1,2 @@
+Download http://localhost:4545/subdir/mod2.ts
+Download http://localhost:4545/subdir/print_hello.ts
diff --git a/tests/specs/lockfile/config_file_lock_boolean/main.ts b/tests/specs/lockfile/config_file_lock_boolean/main.ts
new file mode 100644
index 000000000..baa52775d
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/main.ts
@@ -0,0 +1 @@
+import "http://localhost:4545/subdir/mod2.ts";
diff --git a/tests/specs/lockfile/config_file_lock_boolean/true.json b/tests/specs/lockfile/config_file_lock_boolean/true.json
new file mode 100644
index 000000000..090481af9
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/true.json
@@ -0,0 +1,3 @@
+{
+ "lock": true
+}
diff --git a/tests/specs/lockfile/config_file_lock_boolean/true.main.out b/tests/specs/lockfile/config_file_lock_boolean/true.main.out
new file mode 100644
index 000000000..11dfc0740
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_boolean/true.main.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/print_hello.ts
+ Actual: fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c
+ Expected: foobar
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/config_file_lock_path/019_media_types.ts.out b/tests/specs/lockfile/config_file_lock_path/019_media_types.ts.out
new file mode 100644
index 000000000..b3e94678c
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/019_media_types.ts.out
@@ -0,0 +1 @@
+[WILDCARD]success true true true true true true true true
diff --git a/tests/specs/lockfile/config_file_lock_path/__test__.jsonc b/tests/specs/lockfile/config_file_lock_path/__test__.jsonc
new file mode 100644
index 000000000..defb113b3
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/__test__.jsonc
@@ -0,0 +1,13 @@
+{
+ "tests": {
+ "error_bad_checksum": {
+ "args": "run --config=config_file_lock_path.json http://localhost:4545/run/019_media_types.ts",
+ "output": "config_file_lock_path.out",
+ "exitCode": 10
+ },
+ "lock_flag_override": {
+ "args": "run --lock=run/lock_check_ok2.json --config=config_file_lock_path.json http://localhost:4545/run/019_media_types.ts",
+ "output": "019_media_types.ts.out"
+ }
+ }
+}
diff --git a/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.json b/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.json
new file mode 100644
index 000000000..2c393f76e
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.json
@@ -0,0 +1,3 @@
+{
+ "lock": "./lock_check_err2.json"
+}
diff --git a/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.out b/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.out
new file mode 100644
index 000000000..1383d945d
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/config_file_lock_path.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js
+ Actual: 3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/config_file_lock_path/lock_check_err2.json b/tests/specs/lockfile/config_file_lock_path/lock_check_err2.json
new file mode 100644
index 000000000..a59cbc9e3
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/lock_check_err2.json
@@ -0,0 +1,10 @@
+{
+ "http://localhost:4545/subdir/mt_application_ecmascript.j2.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_javascript.j4.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_ecmascript.j3.js": "bad",
+ "http://localhost:4545/subdir/mt_text_javascript.j1.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_typescript.t1.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_mp2t.t3.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_vdn.t2.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18"
+}
diff --git a/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out b/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out
new file mode 100644
index 000000000..1383d945d
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/lock_check_err2.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js
+ Actual: 3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/config_file_lock_path/lock_check_ok2.json b/tests/specs/lockfile/config_file_lock_path/lock_check_ok2.json
new file mode 100644
index 000000000..14d8b7117
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/lock_check_ok2.json
@@ -0,0 +1,13 @@
+{
+ "version": "3",
+ "remote": {
+ "http://localhost:4545/subdir/mt_application_ecmascript.j2.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_javascript.j4.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_ecmascript.j3.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_javascript.j1.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_typescript.t1.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_mp2t.t3.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_vdn.t2.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18"
+ }
+}
diff --git a/tests/specs/lockfile/config_file_lock_path/run/lock_check_ok2.json b/tests/specs/lockfile/config_file_lock_path/run/lock_check_ok2.json
new file mode 100644
index 000000000..e1bf67c8f
--- /dev/null
+++ b/tests/specs/lockfile/config_file_lock_path/run/lock_check_ok2.json
@@ -0,0 +1,14 @@
+{
+ "version": "3",
+ "remote": {
+ "http://localhost:4545/run/019_media_types.ts": "6b099d422b8a83e19d6672ad28c1c42dd3523eaadd8029f185bf4d10c1dc6e92",
+ "http://localhost:4545/subdir/mt_application_ecmascript.j2.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_javascript.j4.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_ecmascript.j3.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_javascript.j1.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_typescript.t1.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_mp2t.t3.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_vdn.t2.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18"
+ }
+}
diff --git a/tests/specs/lockfile/lock_check_err/__test__.jsonc b/tests/specs/lockfile/lock_check_err/__test__.jsonc
new file mode 100644
index 000000000..7b4777fad
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_check_err.json http://127.0.0.1:4545/run/003_relative_import.ts",
+ "output": "lock_check_err.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_check_err/lock_check_err.json b/tests/specs/lockfile/lock_check_err/lock_check_err.json
new file mode 100644
index 000000000..fc6c2d45c
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err/lock_check_err.json
@@ -0,0 +1,4 @@
+{
+ "http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
+ "http://127.0.0.1:4545/run/003_relative_import.ts": "bad"
+}
diff --git a/tests/specs/lockfile/lock_check_err/lock_check_err.out b/tests/specs/lockfile/lock_check_err/lock_check_err.out
new file mode 100644
index 000000000..25d22490d
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err/lock_check_err.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://127.0.0.1:4545/run/003_relative_import.ts
+ Actual: a1572e8fd2c2712b33f04aed2561505b5feb2c8696f1f2cded3de7127931b97e
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/lock_check_err2/__test__.jsonc b/tests/specs/lockfile/lock_check_err2/__test__.jsonc
new file mode 100644
index 000000000..adcf816c4
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err2/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_check_err2.json http://localhost:4545/run/019_media_types.ts",
+ "output": "lock_check_err2.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_check_err2/lock_check_err2.json b/tests/specs/lockfile/lock_check_err2/lock_check_err2.json
new file mode 100644
index 000000000..a59cbc9e3
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err2/lock_check_err2.json
@@ -0,0 +1,10 @@
+{
+ "http://localhost:4545/subdir/mt_application_ecmascript.j2.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_javascript.j4.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_ecmascript.j3.js": "bad",
+ "http://localhost:4545/subdir/mt_text_javascript.j1.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_typescript.t1.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_mp2t.t3.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_vdn.t2.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18"
+}
diff --git a/tests/specs/lockfile/lock_check_err2/lock_check_err2.out b/tests/specs/lockfile/lock_check_err2/lock_check_err2.out
new file mode 100644
index 000000000..1383d945d
--- /dev/null
+++ b/tests/specs/lockfile/lock_check_err2/lock_check_err2.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js
+ Actual: 3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/lock_dynamic_imports/__test__.jsonc b/tests/specs/lockfile/lock_dynamic_imports/__test__.jsonc
new file mode 100644
index 000000000..54b993295
--- /dev/null
+++ b/tests/specs/lockfile/lock_dynamic_imports/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_dynamic_imports.json --allow-read --allow-net http://127.0.0.1:4545/run/013_dynamic_import.ts",
+ "output": "lock_dynamic_imports.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.json b/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.json
new file mode 100644
index 000000000..0269b9409
--- /dev/null
+++ b/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.json
@@ -0,0 +1,6 @@
+{
+ "http://127.0.0.1:4545/run/013_dynamic_import.ts": "3f83e653329dc1f963761a986997d710b9763f667fc243eef89b3a5decacda30",
+ "http://127.0.0.1:4545/subdir/mod1.ts": "bfc1037b02c99abc20367f739bca7455813a5950066abd77965bff33b6eece0f",
+ "http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
+ "http://127.0.0.1:4545/subdir/subdir2/mod2.ts": "bad"
+}
diff --git a/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.out b/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.out
new file mode 100644
index 000000000..2b8bdfc96
--- /dev/null
+++ b/tests/specs/lockfile/lock_dynamic_imports/lock_dynamic_imports.out
@@ -0,0 +1,12 @@
+[WILDCARD]
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://127.0.0.1:4545/subdir/subdir2/mod2.ts
+ Actual: 8b3b670d25d238dfa72df119140406b96766a00fee635f3606429fe065b18fd1
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/lock_v2_check_err/__test__.jsonc b/tests/specs/lockfile/lock_v2_check_err/__test__.jsonc
new file mode 100644
index 000000000..b58fddeec
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_v2_check_err.json http://127.0.0.1:4545/run/003_relative_import.ts",
+ "output": "lock_v2_check_err.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.json b/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.json
new file mode 100644
index 000000000..6bd6491c6
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.json
@@ -0,0 +1,7 @@
+{
+ "version": "2",
+ "remote": {
+ "http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
+ "http://127.0.0.1:4545/run/003_relative_import.ts": "bad"
+ }
+}
diff --git a/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.out b/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.out
new file mode 100644
index 000000000..25d22490d
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err/lock_v2_check_err.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://127.0.0.1:4545/run/003_relative_import.ts
+ Actual: a1572e8fd2c2712b33f04aed2561505b5feb2c8696f1f2cded3de7127931b97e
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/lock_v2_check_err2/__test__.jsonc b/tests/specs/lockfile/lock_v2_check_err2/__test__.jsonc
new file mode 100644
index 000000000..bb02b41e2
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err2/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_v2_check_err2.json http://localhost:4545/run/019_media_types.ts",
+ "output": "lock_v2_check_err2.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.json b/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.json
new file mode 100644
index 000000000..30fbcdf4b
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.json
@@ -0,0 +1,13 @@
+{
+ "version": "2",
+ "remote": {
+ "http://localhost:4545/subdir/mt_application_ecmascript.j2.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_javascript.j4.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_application_x_typescript.t4.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_ecmascript.j3.js": "bad",
+ "http://localhost:4545/subdir/mt_text_javascript.j1.js": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_text_typescript.t1.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_mp2t.t3.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18",
+ "http://localhost:4545/subdir/mt_video_vdn.t2.ts": "3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18"
+ }
+}
diff --git a/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.out b/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.out
new file mode 100644
index 000000000..1383d945d
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_check_err2/lock_v2_check_err2.out
@@ -0,0 +1,11 @@
+[WILDCARD]Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js
+ Actual: 3a3e002e2f92dc8f045bd4a7c66b4791453ad0417b038dd2b2d9d0f277c44f18
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/lock_v2_dynamic_imports/__test__.jsonc b/tests/specs/lockfile/lock_v2_dynamic_imports/__test__.jsonc
new file mode 100644
index 000000000..8d8913431
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_dynamic_imports/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --lock=lock_v2_dynamic_imports.json --allow-read --allow-net http://127.0.0.1:4545/run/013_dynamic_import.ts",
+ "output": "lock_v2_dynamic_imports.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.json b/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.json
new file mode 100644
index 000000000..eadbee272
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.json
@@ -0,0 +1,9 @@
+{
+ "version": "2",
+ "remote": {
+ "http://127.0.0.1:4545/run/013_dynamic_import.ts": "3f83e653329dc1f963761a986997d710b9763f667fc243eef89b3a5decacda30",
+ "http://127.0.0.1:4545/subdir/mod1.ts": "bfc1037b02c99abc20367f739bca7455813a5950066abd77965bff33b6eece0f",
+ "http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
+ "http://127.0.0.1:4545/subdir/subdir2/mod2.ts": "bad"
+ }
+}
diff --git a/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.out b/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.out
new file mode 100644
index 000000000..2b8bdfc96
--- /dev/null
+++ b/tests/specs/lockfile/lock_v2_dynamic_imports/lock_v2_dynamic_imports.out
@@ -0,0 +1,12 @@
+[WILDCARD]
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://127.0.0.1:4545/subdir/subdir2/mod2.ts
+ Actual: 8b3b670d25d238dfa72df119140406b96766a00fee635f3606429fe065b18fd1
+ Expected: bad
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/no_lock/__test__.jsonc b/tests/specs/lockfile/no_lock/__test__.jsonc
index 60bbd17e0..75821ac64 100644
--- a/tests/specs/lockfile/no_lock/__test__.jsonc
+++ b/tests/specs/lockfile/no_lock/__test__.jsonc
@@ -1,31 +1,40 @@
{
- "steps": [{
- "args": "info main.ts",
- "output": "fail_initial.out",
- "exitCode": 10
- }, {
- "args": "info --no-lock main.ts",
- "output": "info.nolock.out"
- }, {
- "args": "bench",
- "output": "fail.out",
- "exitCode": 10
- }, {
- "args": "bench --no-lock",
- "output": "bench.nolock.out"
- }, {
- "args": "doc main.ts",
- "exitCode": 10,
- "output": "fail.out"
- }, {
- "args": "doc --no-lock main.ts",
- "output": "doc.nolock.out"
- }, {
- "args": "test",
- "exitCode": 10,
- "output": "fail.out"
- }, {
- "args": "test --no-lock",
- "output": "test.nolock.out"
- }]
+ "tests": {
+ "info": {
+ "args": "info main.ts",
+ "output": "fail.out",
+ "exitCode": 10
+ },
+ "info_no_lock": {
+ "args": "info --no-lock main.ts",
+ "output": "info.nolock.out"
+ },
+ "bench": {
+ "args": "bench",
+ "output": "fail.out",
+ "exitCode": 10
+ },
+ "bench_no_lock": {
+ "args": "bench --no-lock",
+ "output": "bench.nolock.out"
+ },
+ "doc": {
+ "args": "doc main.ts",
+ "exitCode": 10,
+ "output": "fail.out"
+ },
+ "doc_no_lock": {
+ "args": "doc --no-lock main.ts",
+ "output": "doc.nolock.out"
+ },
+ "test": {
+ "args": "test",
+ "exitCode": 10,
+ "output": "fail.out"
+ },
+ "test_no_lock": {
+ "args": "test --no-lock",
+ "output": "test.nolock.out"
+ }
+ }
}
diff --git a/tests/specs/lockfile/no_lock/bench.nolock.out b/tests/specs/lockfile/no_lock/bench.nolock.out
index 351efc970..83e4de242 100644
--- a/tests/specs/lockfile/no_lock/bench.nolock.out
+++ b/tests/specs/lockfile/no_lock/bench.nolock.out
@@ -1,3 +1,4 @@
+Download http://localhost:4545/lockfile/basic/mod.ts
Check file:///[WILDCARD]/main.bench.ts
cpu: [WILDCARD]
runtime: [WILDCARD]
diff --git a/tests/specs/lockfile/no_lock/doc.nolock.out b/tests/specs/lockfile/no_lock/doc.nolock.out
index e69de29bb..e2d66c027 100644
--- a/tests/specs/lockfile/no_lock/doc.nolock.out
+++ b/tests/specs/lockfile/no_lock/doc.nolock.out
@@ -0,0 +1 @@
+Download http://localhost:4545/lockfile/basic/mod.ts
diff --git a/tests/specs/lockfile/no_lock/fail.out b/tests/specs/lockfile/no_lock/fail.out
index 4c2b04423..0d67cd478 100644
--- a/tests/specs/lockfile/no_lock/fail.out
+++ b/tests/specs/lockfile/no_lock/fail.out
@@ -1,3 +1,12 @@
-error: The source code is invalid, as it does not match the expected hash in the lock file.
- Specifier: [WILDCARD]mod.ts
- Lock file: [WILDCARD]deno.lock
+Download http://localhost:4545/lockfile/basic/mod.ts
+error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.
+
+ Specifier: http://localhost:4545/lockfile/basic/mod.ts
+ Actual: [WILDLINE]
+ Expected: invalid
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
diff --git a/tests/specs/lockfile/no_lock/fail_initial.out b/tests/specs/lockfile/no_lock/fail_initial.out
deleted file mode 100644
index 6a808c0a5..000000000
--- a/tests/specs/lockfile/no_lock/fail_initial.out
+++ /dev/null
@@ -1,4 +0,0 @@
-Download http://localhost:4545/lockfile/basic/mod.ts
-error: The source code is invalid, as it does not match the expected hash in the lock file.
- Specifier: [WILDCARD]mod.ts
- Lock file: [WILDCARD]deno.lock
diff --git a/tests/specs/lockfile/no_lock/info.nolock.out b/tests/specs/lockfile/no_lock/info.nolock.out
index b03661193..313377780 100644
--- a/tests/specs/lockfile/no_lock/info.nolock.out
+++ b/tests/specs/lockfile/no_lock/info.nolock.out
@@ -1,3 +1,4 @@
+Download http://localhost:4545/lockfile/basic/mod.ts
local: [WILDLINE]main.ts
type: TypeScript
dependencies: 1 unique
diff --git a/tests/specs/lockfile/no_lock/test.nolock.out b/tests/specs/lockfile/no_lock/test.nolock.out
index b5039c2d6..1332dfa8f 100644
--- a/tests/specs/lockfile/no_lock/test.nolock.out
+++ b/tests/specs/lockfile/no_lock/test.nolock.out
@@ -1,3 +1,4 @@
+Download http://localhost:4545/lockfile/basic/mod.ts
Check file:///[WILDCARD]/main.test.ts
running 1 test from [WILDCARD]/main.test.ts
[WILDCARD]
diff --git a/tests/specs/npm/lock_file_integrity_failure/__test__.jsonc b/tests/specs/npm/lock_file_integrity_failure/__test__.jsonc
new file mode 100644
index 000000000..d2f1b06a2
--- /dev/null
+++ b/tests/specs/npm/lock_file_integrity_failure/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run --allow-read --allow-env --lock lock.json main.js",
+ "output": "main.out",
+ "exitCode": 10
+}
diff --git a/tests/specs/npm/lock_file_integrity_failure/lock.json b/tests/specs/npm/lock_file_integrity_failure/lock.json
new file mode 100644
index 000000000..57253314e
--- /dev/null
+++ b/tests/specs/npm/lock_file_integrity_failure/lock.json
@@ -0,0 +1,164 @@
+{
+ "version": "2",
+ "remote": {},
+ "npm": {
+ "specifiers": { "fs-extra@10.1.0": "fs-extra@10.1.0", "vue": "vue@3.2.38" },
+ "packages": {
+ "@babel/parser@7.19.0": {
+ "integrity": "sha512-foobar!",
+ "dependencies": {}
+ },
+ "@vue/compiler-core@3.2.38": {
+ "integrity": "sha512-/FsvnSu7Z+lkd/8KXMa4yYNUiqQrI22135gfsQYVGuh5tqEgOB0XqrUdb/KnCLa5+TmQLPwvyUnKMyCpu+SX3Q==",
+ "dependencies": {
+ "@babel/parser": "@babel/parser@7.19.0",
+ "@vue/shared": "@vue/shared@3.2.38",
+ "estree-walker": "estree-walker@2.0.2",
+ "source-map": "source-map@0.6.1"
+ }
+ },
+ "@vue/compiler-dom@3.2.38": {
+ "integrity": "sha512-zqX4FgUbw56kzHlgYuEEJR8mefFiiyR3u96498+zWPsLeh1WKvgIReoNE+U7gG8bCUdvsrJ0JRmev0Ky6n2O0g==",
+ "dependencies": {
+ "@vue/compiler-core": "@vue/compiler-core@3.2.38",
+ "@vue/shared": "@vue/shared@3.2.38"
+ }
+ },
+ "@vue/compiler-sfc@3.2.38": {
+ "integrity": "sha512-KZjrW32KloMYtTcHAFuw3CqsyWc5X6seb8KbkANSWt3Cz9p2qA8c1GJpSkksFP9ABb6an0FLCFl46ZFXx3kKpg==",
+ "dependencies": {
+ "@babel/parser": "@babel/parser@7.19.0",
+ "@vue/compiler-core": "@vue/compiler-core@3.2.38",
+ "@vue/compiler-dom": "@vue/compiler-dom@3.2.38",
+ "@vue/compiler-ssr": "@vue/compiler-ssr@3.2.38",
+ "@vue/reactivity-transform": "@vue/reactivity-transform@3.2.38",
+ "@vue/shared": "@vue/shared@3.2.38",
+ "estree-walker": "estree-walker@2.0.2",
+ "magic-string": "magic-string@0.25.9",
+ "postcss": "postcss@8.4.16",
+ "source-map": "source-map@0.6.1"
+ }
+ },
+ "@vue/compiler-ssr@3.2.38": {
+ "integrity": "sha512-bm9jOeyv1H3UskNm4S6IfueKjUNFmi2kRweFIGnqaGkkRePjwEcfCVqyS3roe7HvF4ugsEkhf4+kIvDhip6XzQ==",
+ "dependencies": {
+ "@vue/compiler-dom": "@vue/compiler-dom@3.2.38",
+ "@vue/shared": "@vue/shared@3.2.38"
+ }
+ },
+ "@vue/reactivity-transform@3.2.38": {
+ "integrity": "sha512-3SD3Jmi1yXrDwiNJqQ6fs1x61WsDLqVk4NyKVz78mkaIRh6d3IqtRnptgRfXn+Fzf+m6B1KxBYWq1APj6h4qeA==",
+ "dependencies": {
+ "@babel/parser": "@babel/parser@7.19.0",
+ "@vue/compiler-core": "@vue/compiler-core@3.2.38",
+ "@vue/shared": "@vue/shared@3.2.38",
+ "estree-walker": "estree-walker@2.0.2",
+ "magic-string": "magic-string@0.25.9"
+ }
+ },
+ "@vue/reactivity@3.2.38": {
+ "integrity": "sha512-6L4myYcH9HG2M25co7/BSo0skKFHpAN8PhkNPM4xRVkyGl1K5M3Jx4rp5bsYhvYze2K4+l+pioN4e6ZwFLUVtw==",
+ "dependencies": { "@vue/shared": "@vue/shared@3.2.38" }
+ },
+ "@vue/runtime-core@3.2.38": {
+ "integrity": "sha512-kk0qiSiXUU/IKxZw31824rxmFzrLr3TL6ZcbrxWTKivadoKupdlzbQM4SlGo4MU6Zzrqv4fzyUasTU1jDoEnzg==",
+ "dependencies": {
+ "@vue/reactivity": "@vue/reactivity@3.2.38",
+ "@vue/shared": "@vue/shared@3.2.38"
+ }
+ },
+ "@vue/runtime-dom@3.2.38": {
+ "integrity": "sha512-4PKAb/ck2TjxdMSzMsnHViOrrwpudk4/A56uZjhzvusoEU9xqa5dygksbzYepdZeB5NqtRw5fRhWIiQlRVK45A==",
+ "dependencies": {
+ "@vue/runtime-core": "@vue/runtime-core@3.2.38",
+ "@vue/shared": "@vue/shared@3.2.38",
+ "csstype": "csstype@2.6.20"
+ }
+ },
+ "@vue/server-renderer@3.2.38": {
+ "integrity": "sha512-pg+JanpbOZ5kEfOZzO2bt02YHd+ELhYP8zPeLU1H0e7lg079NtuuSB8fjLdn58c4Ou8UQ6C1/P+528nXnLPAhA==",
+ "dependencies": {
+ "@vue/compiler-ssr": "@vue/compiler-ssr@3.2.38",
+ "@vue/shared": "@vue/shared@3.2.38"
+ }
+ },
+ "@vue/shared@3.2.38": {
+ "integrity": "sha512-dTyhTIRmGXBjxJE+skC8tTWCGLCVc4wQgRRLt8+O9p5ewBAjoBwtCAkLPrtToSr1xltoe3st21Pv953aOZ7alg==",
+ "dependencies": {}
+ },
+ "csstype@2.6.20": {
+ "integrity": "sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==",
+ "dependencies": {}
+ },
+ "estree-walker@2.0.2": {
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dependencies": {}
+ },
+ "fs-extra@10.1.0": {
+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
+ "dependencies": {
+ "graceful-fs": "graceful-fs@4.2.10",
+ "jsonfile": "jsonfile@6.1.0",
+ "universalify": "universalify@2.0.0"
+ }
+ },
+ "graceful-fs@4.2.10": {
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+ "dependencies": {}
+ },
+ "jsonfile@6.1.0": {
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
+ "dependencies": {
+ "graceful-fs": "graceful-fs@4.2.10",
+ "universalify": "universalify@2.0.0"
+ }
+ },
+ "magic-string@0.25.9": {
+ "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
+ "dependencies": { "sourcemap-codec": "sourcemap-codec@1.4.8" }
+ },
+ "nanoid@3.3.4": {
+ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
+ "dependencies": {}
+ },
+ "picocolors@1.0.0": {
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dependencies": {}
+ },
+ "postcss@8.4.16": {
+ "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==",
+ "dependencies": {
+ "nanoid": "nanoid@3.3.4",
+ "picocolors": "picocolors@1.0.0",
+ "source-map-js": "source-map-js@1.0.2"
+ }
+ },
+ "source-map-js@1.0.2": {
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "dependencies": {}
+ },
+ "source-map@0.6.1": {
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dependencies": {}
+ },
+ "sourcemap-codec@1.4.8": {
+ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
+ "dependencies": {}
+ },
+ "universalify@2.0.0": {
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
+ "dependencies": {}
+ },
+ "vue@3.2.38": {
+ "integrity": "sha512-hHrScEFSmDAWL0cwO4B6WO7D3sALZPbfuThDsGBebthrNlDxdJZpGR3WB87VbjpPh96mep1+KzukYEhpHDFa8Q==",
+ "dependencies": {
+ "@vue/compiler-dom": "@vue/compiler-dom@3.2.38",
+ "@vue/compiler-sfc": "@vue/compiler-sfc@3.2.38",
+ "@vue/runtime-dom": "@vue/runtime-dom@3.2.38",
+ "@vue/server-renderer": "@vue/server-renderer@3.2.38",
+ "@vue/shared": "@vue/shared@3.2.38"
+ }
+ }
+ }
+ }
+}
diff --git a/tests/specs/npm/lock_file_integrity_failure/main.js b/tests/specs/npm/lock_file_integrity_failure/main.js
new file mode 100644
index 000000000..a7b5960ca
--- /dev/null
+++ b/tests/specs/npm/lock_file_integrity_failure/main.js
@@ -0,0 +1,5 @@
+import fsx from "npm:fs-extra@10.1.0";
+import { createApp } from "npm:vue";
+
+console.log(fsx.access);
+console.log(createApp);
diff --git a/tests/specs/npm/lock_file_integrity_failure/main.out b/tests/specs/npm/lock_file_integrity_failure/main.out
new file mode 100644
index 000000000..741edd9d2
--- /dev/null
+++ b/tests/specs/npm/lock_file_integrity_failure/main.out
@@ -0,0 +1,12 @@
+Download [WILDCARD]
+error: Integrity check failed for package: "npm:@babel/parser@7.19.0". Unable to verify that the package
+is the same as when the lockfile was generated.
+
+Actual: sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==
+Expected: sha512-foobar!
+
+This could be caused by:
+ * the lock file may be corrupt
+ * the source itself may be corrupt
+
+Use the --lock-write flag to regenerate the lockfile at "[WILDCARD]lock.json".