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