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/lockfile/adding_jsr_dep/__test__.jsonc | 16 +++++++++++++++ tests/specs/lockfile/adding_jsr_dep/add.ts | 1 + tests/specs/lockfile/adding_jsr_dep/deno.json | 9 ++++++++ tests/specs/lockfile/adding_jsr_dep/lock01.out | 20 ++++++++++++++++++ tests/specs/lockfile/adding_jsr_dep/lock02.out | 24 ++++++++++++++++++++++ tests/specs/lockfile/adding_jsr_dep/subtract.ts | 1 + 6 files changed, 71 insertions(+) create mode 100644 tests/specs/lockfile/adding_jsr_dep/__test__.jsonc create mode 100644 tests/specs/lockfile/adding_jsr_dep/add.ts create mode 100644 tests/specs/lockfile/adding_jsr_dep/deno.json create mode 100644 tests/specs/lockfile/adding_jsr_dep/lock01.out create mode 100644 tests/specs/lockfile/adding_jsr_dep/lock02.out create mode 100644 tests/specs/lockfile/adding_jsr_dep/subtract.ts (limited to 'tests/specs/lockfile/adding_jsr_dep') 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"; -- cgit v1.2.3