summaryrefslogtreecommitdiff
path: root/tests/integration/check_tests.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-08-28 14:17:47 -0400
committerGitHub <noreply@github.com>2024-08-28 14:17:47 -0400
commitb708a13eb02510925b5fd964fe933b4896093185 (patch)
treee20a84f95680439a3eb665245fc7ede27bf4be02 /tests/integration/check_tests.rs
parent7dd861aa36974d5afa9633078b51c4c7f17cf181 (diff)
feat: improve lockfile v4 to store normalized version constraints and be more terse (#25247)
Stores normalized version constraints in the lockfile, which will improve reproducibility and will fix a bug with duplicate specifiers ending up in the lockfile. Also, gets rid of some duplicate data in the specifiers area of the lockfile.
Diffstat (limited to 'tests/integration/check_tests.rs')
-rw-r--r--tests/integration/check_tests.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/integration/check_tests.rs b/tests/integration/check_tests.rs
index f0e3dfb5a..ce464135b 100644
--- a/tests/integration/check_tests.rs
+++ b/tests/integration/check_tests.rs
@@ -1,6 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
use deno_lockfile::NewLockfileOptions;
+use deno_semver::jsr::JsrDepPackageReq;
use test_util as util;
use test_util::itest;
use util::env_vars_for_npm_tests;
@@ -372,8 +373,11 @@ fn npm_module_check_then_error() {
// make the specifier resolve to version 1
lockfile.content.packages.specifiers.insert(
- "npm:@denotest/breaking-change-between-versions".to_string(),
- "npm:@denotest/breaking-change-between-versions@1.0.0".to_string(),
+ JsrDepPackageReq::from_str(
+ "npm:@denotest/breaking-change-between-versions",
+ )
+ .unwrap(),
+ "1.0.0".to_string(),
);
lockfile_path.write(lockfile.as_json_string());
temp_dir.write(
@@ -387,8 +391,11 @@ fn npm_module_check_then_error() {
// now update the lockfile to use version 2 instead, which should cause a
// type checking error because the oldName no longer exists
lockfile.content.packages.specifiers.insert(
- "npm:@denotest/breaking-change-between-versions".to_string(),
- "npm:@denotest/breaking-change-between-versions@2.0.0".to_string(),
+ JsrDepPackageReq::from_str(
+ "npm:@denotest/breaking-change-between-versions",
+ )
+ .unwrap(),
+ "2.0.0".to_string(),
);
lockfile_path.write(lockfile.as_json_string());