summaryrefslogtreecommitdiff
path: root/cli/tests/integration
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-10-19 23:30:44 +0200
committerGitHub <noreply@github.com>2022-10-19 23:30:44 +0200
commit973069b341de65e8e32b91072ff5a745fe7e704a (patch)
tree48fef8a8e9792b26f2d438b0769c99184d3493a7 /cli/tests/integration
parente3a30954811238ce55a9d0f8b193c3a58535b72d (diff)
feat: Add new lockfile format (#16349)
Introduces a new lockfile format that will be used to support locking "npm" dependencies. Currently the format looks as follows: ``` // This file is automatically generated by Deno, do not edit its contents // manually. This file should be commited to your repository. { "version": "2", "remote": { "https://deno.land/std@0.160.0/http/server.ts": "asdwetsw44523asdfgfas..", "https://deno.land/std@0.160.0/http/file_server.ts": "asdwetsw44523asdfgfas.." } } ``` A follow up PR will add "npm" key that will be used to store information related to "npm" dependencies and their resolution. The new format is used when `--lock-write` is present, if user tries to load a lock file using the old format it will still work.
Diffstat (limited to 'cli/tests/integration')
-rw-r--r--cli/tests/integration/run_tests.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index 156940185..71b26b356 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -658,6 +658,40 @@ itest!(lock_check_err2 {
http_server: true,
});
+itest!(lock_v2_check_ok {
+ args:
+ "run --lock=run/lock_v2_check_ok.json http://127.0.0.1:4545/run/003_relative_import.ts",
+ output: "run/003_relative_import.ts.out",
+ http_server: true,
+});
+
+itest!(lock_v2_check_ok2 {
+ args: "run --lock=run/lock_v2_check_ok2.json run/019_media_types.ts",
+ output: "run/019_media_types.ts.out",
+ http_server: true,
+});
+
+itest!(lock_v2_dynamic_imports {
+ args: "run --lock=run/lock_v2_dynamic_imports.json --allow-read --allow-net http://127.0.0.1:4545/run/013_dynamic_import.ts",
+ output: "run/lock_v2_dynamic_imports.out",
+ exit_code: 10,
+ http_server: true,
+});
+
+itest!(lock_v2_check_err {
+ args: "run --lock=run/lock_v2_check_err.json http://127.0.0.1:4545/run/003_relative_import.ts",
+ output: "run/lock_v2_check_err.out",
+ exit_code: 10,
+ http_server: true,
+});
+
+itest!(lock_v2_check_err2 {
+ args: "run --lock=run/lock_v2_check_err2.json run/019_media_types.ts",
+ output: "run/lock_v2_check_err2.out",
+ exit_code: 10,
+ http_server: true,
+});
+
itest!(mts_dmts_mjs {
args: "run subdir/import.mts",
output: "run/mts_dmts_mjs.out",