Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Feb 5, 2024
1 parent 565c01f commit f6f56fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,18 @@ fn config_changes() {

fn verify_packages_content(packages: &PackagesContent) {
// verify the specifiers
for (_req, id) in &packages.specifiers {
for id in packages.specifiers.values() {
if let Some(npm_id) = id.strip_prefix("npm:") {
assert!(packages.npm.contains_key(npm_id), "Missing: {}", id);
} else if let Some(_) = id.strip_prefix("jsr:") {
// todo(dsherret): actually include them here because we need to lock the manifest version
} else if id.strip_prefix("jsr:").is_some() {
// ignore jsr packages because they won't be in the lockfile when they don't have dependencies
// todo(dsherret): actually include them here because we need to lock the manifest version
} else {
panic!("Invalid package id: {}", id);
}
}
for (pkg_id, package) in &packages.npm {
for (_name, dep_id) in &package.dependencies {
for dep_id in package.dependencies.values() {
assert!(
packages.npm.contains_key(dep_id),
"Missing '{}' dep in '{}'",
Expand Down

0 comments on commit f6f56fb

Please sign in to comment.