From a8d472f88e79703b1890bfdc87d7a3bb20b21428 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 26 Jun 2023 21:53:17 +0200 Subject: feat(lock): skip saving declaration files in the lockfile (#19447) This is also a performance improvement because declaration file hashes don't need to be stored in the lockfile. Closes #19444 --- cli/tests/testdata/lockfile/no_dts/deno.lock.out | 6 ++++++ cli/tests/testdata/lockfile/no_dts/main.cache.out | 2 ++ cli/tests/testdata/lockfile/no_dts/main.ts | 3 +++ cli/tests/testdata/lockfile/no_dts/mod.d.ts | 1 + cli/tests/testdata/lockfile/no_dts/mod.js | 4 ++++ 5 files changed, 16 insertions(+) create mode 100644 cli/tests/testdata/lockfile/no_dts/deno.lock.out create mode 100644 cli/tests/testdata/lockfile/no_dts/main.cache.out create mode 100644 cli/tests/testdata/lockfile/no_dts/main.ts create mode 100644 cli/tests/testdata/lockfile/no_dts/mod.d.ts create mode 100644 cli/tests/testdata/lockfile/no_dts/mod.js (limited to 'cli/tests/testdata/lockfile') diff --git a/cli/tests/testdata/lockfile/no_dts/deno.lock.out b/cli/tests/testdata/lockfile/no_dts/deno.lock.out new file mode 100644 index 000000000..9bf784113 --- /dev/null +++ b/cli/tests/testdata/lockfile/no_dts/deno.lock.out @@ -0,0 +1,6 @@ +{ + "version": "2", + "remote": { + "http://localhost:4545/lockfile/no_dts/mod.js": "3f576f37a301d298c3032eb1835240bd83f3762db26fc1d358c5d67088d6ffc8" + } +} diff --git a/cli/tests/testdata/lockfile/no_dts/main.cache.out b/cli/tests/testdata/lockfile/no_dts/main.cache.out new file mode 100644 index 000000000..ee8ad33ab --- /dev/null +++ b/cli/tests/testdata/lockfile/no_dts/main.cache.out @@ -0,0 +1,2 @@ +Download http://localhost:4545/lockfile/no_dts/mod.js +Download http://localhost:4545/lockfile/no_dts/mod.d.ts diff --git a/cli/tests/testdata/lockfile/no_dts/main.ts b/cli/tests/testdata/lockfile/no_dts/main.ts new file mode 100644 index 000000000..7596e1e1a --- /dev/null +++ b/cli/tests/testdata/lockfile/no_dts/main.ts @@ -0,0 +1,3 @@ +import { test } from "http://localhost:4545/lockfile/no_dts/mod.js"; + +console.log(test()); diff --git a/cli/tests/testdata/lockfile/no_dts/mod.d.ts b/cli/tests/testdata/lockfile/no_dts/mod.d.ts new file mode 100644 index 000000000..7d3fae61c --- /dev/null +++ b/cli/tests/testdata/lockfile/no_dts/mod.d.ts @@ -0,0 +1 @@ +export declare function test(): number; diff --git a/cli/tests/testdata/lockfile/no_dts/mod.js b/cli/tests/testdata/lockfile/no_dts/mod.js new file mode 100644 index 000000000..8ac948700 --- /dev/null +++ b/cli/tests/testdata/lockfile/no_dts/mod.js @@ -0,0 +1,4 @@ +/// +export function test() { + return 5; +} -- cgit v1.2.3