summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-08-18 23:01:39 -0400
committerGitHub <noreply@github.com>2024-08-19 03:01:39 +0000
commit526f39fbb9dacce12c69d24a55798d0bde8f2707 (patch)
treeca4891a8f8ca6e66ce8298e57218f19b05111f8f /tests/specs
parent28bebce54445f248614eca493cff6b8d3659df40 (diff)
feat(FUTURE): terse lockfile (v4) (#25059)
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/install/future_install_local_deno/deno.lock.out24
-rw-r--r--tests/specs/install/future_install_node_modules/corrupt.js2
-rw-r--r--tests/specs/install/future_install_node_modules/deno.lock.out15
-rw-r--r--tests/specs/lockfile/frozen_lockfile/__test__.jsonc9
-rw-r--r--tests/specs/lockfile/frozen_lockfile/frozen_package_json_changed.out39
-rw-r--r--tests/specs/lockfile/frozen_lockfile/frozen_package_json_changed_install.out37
6 files changed, 61 insertions, 65 deletions
diff --git a/tests/specs/install/future_install_local_deno/deno.lock.out b/tests/specs/install/future_install_local_deno/deno.lock.out
index fd3d52e42..188de5de9 100644
--- a/tests/specs/install/future_install_local_deno/deno.lock.out
+++ b/tests/specs/install/future_install_local_deno/deno.lock.out
@@ -1,15 +1,17 @@
{
- "version": "3",
- "packages": {
- "specifiers": {
- "jsr:@denotest/add": "jsr:@denotest/add@1.0.0",
- "npm:@denotest/esm-basic@^1.0.0": "npm:@denotest/esm-basic@1.0.0"
- },
- "jsr": {
- "@denotest/add@1.0.0": [WILDCARD]
- },
- "npm": {
- "@denotest/esm-basic@1.0.0": [WILDCARD]
+ "version": "4",
+ "specifiers": {
+ "jsr:@denotest/add": "jsr:@denotest/add@1.0.0",
+ "npm:@denotest/esm-basic@^1.0.0": "npm:@denotest/esm-basic@1.0.0"
+ },
+ "jsr": {
+ "@denotest/add@1.0.0": {
+ "integrity": "[WILDCARD]"
+ }
+ },
+ "npm": {
+ "@denotest/esm-basic@1.0.0": {
+ "integrity": "[WILDCARD]"
}
},
"remote": [WILDCARD],
diff --git a/tests/specs/install/future_install_node_modules/corrupt.js b/tests/specs/install/future_install_node_modules/corrupt.js
index fcc146081..f10384024 100644
--- a/tests/specs/install/future_install_node_modules/corrupt.js
+++ b/tests/specs/install/future_install_node_modules/corrupt.js
@@ -1,5 +1,5 @@
const lock = JSON.parse(Deno.readTextFileSync("./deno.lock"));
-const pkg = lock.packages.npm["@denotest/esm-basic@1.0.0"];
+const pkg = lock.npm["@denotest/esm-basic@1.0.0"];
// Corrupt the integrity hash
pkg.integrity = pkg.integrity.slice(0, -1);
Deno.writeTextFileSync("./deno.lock", JSON.stringify(lock));
diff --git a/tests/specs/install/future_install_node_modules/deno.lock.out b/tests/specs/install/future_install_node_modules/deno.lock.out
index b30232996..c8071adad 100644
--- a/tests/specs/install/future_install_node_modules/deno.lock.out
+++ b/tests/specs/install/future_install_node_modules/deno.lock.out
@@ -1,14 +1,13 @@
{
- "version": "3",
- "packages": {
- "specifiers": {
- "npm:@denotest/esm-basic": "npm:@denotest/esm-basic@1.0.0"
- },
- "npm": {
- "@denotest/esm-basic@1.0.0": [WILDCARD]
+ "version": "4",
+ "specifiers": {
+ "npm:@denotest/esm-basic": "npm:@denotest/esm-basic@1.0.0"
+ },
+ "npm": {
+ "@denotest/esm-basic@1.0.0": {
+ "integrity": "[WILDCARD]"
}
},
- "remote": {},
"workspace": {
"packageJson": {
"dependencies": [
diff --git a/tests/specs/lockfile/frozen_lockfile/__test__.jsonc b/tests/specs/lockfile/frozen_lockfile/__test__.jsonc
index 76712a913..8faa45b4e 100644
--- a/tests/specs/lockfile/frozen_lockfile/__test__.jsonc
+++ b/tests/specs/lockfile/frozen_lockfile/__test__.jsonc
@@ -60,10 +60,16 @@
"error_when_package_json_changed": {
"steps": [
{
+ "envs": {
+ "DENO_FUTURE": "1"
+ },
"args": "cache add.ts",
"output": "[WILDCARD]"
},
{
+ "envs": {
+ "DENO_FUTURE": "1"
+ },
"args": [
"eval",
"Deno.writeTextFileSync(\"package.json\", JSON.stringify({ dependencies: { \"@denotest/bin\": \"0.7.0\" } }))"
@@ -71,6 +77,9 @@
"output": ""
},
{
+ "envs": {
+ "DENO_FUTURE": "1"
+ },
"args": "cache --frozen add.ts",
"output": "frozen_package_json_changed.out",
"exitCode": 1
diff --git a/tests/specs/lockfile/frozen_lockfile/frozen_package_json_changed.out b/tests/specs/lockfile/frozen_lockfile/frozen_package_json_changed.out
index 066aa2303..60a01158d 100644
--- a/tests/specs/lockfile/frozen_lockfile/frozen_package_json_changed.out
+++ b/tests/specs/lockfile/frozen_lockfile/frozen_package_json_changed.out
@@ -1,25 +1,18 @@
Download http://localhost:4260/@denotest/bin
-error: The lockfile is out of date. Run `deno cache --frozen=false` or rerun with `--frozen=false` to update it.
+error: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
changes:
- 5 | - "npm:@denotest/add@1": "npm:@denotest/add@1.0.0"
- 5 | + "npm:@denotest/add@1": "npm:@denotest/add@1.0.0",
- 6 | + "npm:@denotest/bin@0.7.0": "npm:@denotest/bin@0.7.0"
-11 | - }
-12 | - }
-13 | - },
-14 | - "remote": {}
-12 | + },
-13 | + "@denotest/bin@0.7.0": {
-14 | + "integrity": "[WILDCARD]",
-15 | + "dependencies": {}
-16 | + }
-17 | + }
-18 | + },
-19 | + "remote": {},
-20 | + "workspace": {
-21 | + "packageJson": {
-22 | + "dependencies": [
-23 | + "npm:@denotest/bin@0.7.0"
-24 | + ]
-25 | + }
-26 | + }
+ 4 | - "npm:@denotest/add@1": "npm:@denotest/add@1.0.0"
+ 4 | + "npm:@denotest/add@1": "npm:@denotest/add@1.0.0",
+ 5 | + "npm:@denotest/bin@0.7.0": "npm:@denotest/bin@0.7.0"
+ 9 | - }
+10 | + },
+11 | + "@denotest/bin@0.7.0": {
+12 | + "integrity": "[WILDLINE]"
+13 | + }
+14 | + },
+15 | + "workspace": {
+16 | + "packageJson": {
+17 | + "dependencies": [
+18 | + "npm:@denotest/bin@0.7.0"
+19 | + ]
+20 | + }
diff --git a/tests/specs/lockfile/frozen_lockfile/frozen_package_json_changed_install.out b/tests/specs/lockfile/frozen_lockfile/frozen_package_json_changed_install.out
index 6b7d1dc5f..397179596 100644
--- a/tests/specs/lockfile/frozen_lockfile/frozen_package_json_changed_install.out
+++ b/tests/specs/lockfile/frozen_lockfile/frozen_package_json_changed_install.out
@@ -1,24 +1,17 @@
error: The lockfile is out of date. Run `deno cache --frozen=false`, `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
changes:
- 5 | - "npm:@denotest/add@1": "npm:@denotest/add@1.0.0"
- 5 | + "npm:@denotest/add@1": "npm:@denotest/add@1.0.0",
- 6 | + "npm:@denotest/bin@0.7.0": "npm:@denotest/bin@0.7.0"
-11 | - }
-12 | - }
-13 | - },
-14 | - "remote": {}
-12 | + },
-13 | + "@denotest/bin@0.7.0": {
-14 | + "integrity": "[WILDCARD]",
-15 | + "dependencies": {}
-16 | + }
-17 | + }
-18 | + },
-19 | + "remote": {},
-20 | + "workspace": {
-21 | + "packageJson": {
-22 | + "dependencies": [
-23 | + "npm:@denotest/bin@0.7.0"
-24 | + ]
-25 | + }
-26 | + }
+ 4 | - "npm:@denotest/add@1": "npm:@denotest/add@1.0.0"
+ 4 | + "npm:@denotest/add@1": "npm:@denotest/add@1.0.0",
+ 5 | + "npm:@denotest/bin@0.7.0": "npm:@denotest/bin@0.7.0"
+ 9 | - }
+10 | + },
+11 | + "@denotest/bin@0.7.0": {
+12 | + "integrity": "[WILDLINE]"
+13 | + }
+14 | + },
+15 | + "workspace": {
+16 | + "packageJson": {
+17 | + "dependencies": [
+18 | + "npm:@denotest/bin@0.7.0"
+19 | + ]
+20 | + }