From 448fe67b7a2142f62332b651f9d215534dceb1f5 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 28 May 2024 14:58:43 -0400 Subject: 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 --- tests/specs/bundle/lockfile/__test__.jsonc | 5 +++++ tests/specs/bundle/lockfile/check_error.json | 5 +++++ tests/specs/bundle/lockfile/check_error.out | 12 ++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 tests/specs/bundle/lockfile/__test__.jsonc create mode 100644 tests/specs/bundle/lockfile/check_error.json create mode 100644 tests/specs/bundle/lockfile/check_error.out (limited to 'tests/specs/bundle/lockfile') 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. -- cgit v1.2.3