From d77733bcc28ed349d07c2e981ed9b4a9e76131a1 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 15 Jan 2024 13:59:08 -0500 Subject: [PATCH 01/38] feat: store package.json and import map in lockfile --- Cargo.lock | 114 +++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 5 +++ src/lib.rs | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 244 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cae0d7e..de3b283 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,6 +21,8 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" name = "deno_lockfile" version = "0.17.2" dependencies = [ + "deno_semver", + "indexmap", "pretty_assertions", "ring", "serde", @@ -29,12 +31,38 @@ dependencies = [ "thiserror", ] +[[package]] +name = "deno_semver" +version = "0.5.2" +dependencies = [ + "monch", + "once_cell", + "serde", + "thiserror", + "url", +] + [[package]] name = "diff" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + [[package]] name = "getrandom" version = "0.2.10" @@ -46,6 +74,33 @@ dependencies = [ "wasi", ] +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown", + "serde", +] + [[package]] name = "itoa" version = "1.0.6" @@ -58,6 +113,24 @@ version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +[[package]] +name = "monch" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4519a88847ba2d5ead3dc53f1060ec6a571de93f325d9c5c4968147382b1cbc3" + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + [[package]] name = "pretty_assertions" version = "1.4.0" @@ -180,18 +253,59 @@ dependencies = [ "syn", ] +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "unicode-bidi" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + [[package]] name = "unicode-ident" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + [[package]] name = "untrusted" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index ddfd17a..d42c989 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,11 +8,16 @@ license = "MIT" description = "An implementation of a lockfile used in Deno" [dependencies] +indexmap = { version = "2.1.0", features = ["serde"] } ring = "^0.17.0" serde = { version = "1.0.149", features = ["derive"] } serde_json = "1.0.85" thiserror = "1.0.40" +deno_semver = "0.5.2" [dev-dependencies] pretty_assertions = "1.4.0" temp-dir = "0.1.11" + +[patch.crates-io] +deno_semver = { path = "../deno_semver" } \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index bbfc740..ab0fd8c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,18 +1,50 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. mod error; -pub use error::LockfileError as Error; use std::collections::BTreeMap; +use std::collections::HashMap; use std::io::Write; +use std::path::PathBuf; +use deno_semver::npm::NpmPackageId; +use deno_semver::npm::NpmPackageIdDeserializationError; +use deno_semver::package::PackageReq; +use deno_semver::package::PackageReqParseError; +use indexmap::IndexMap; use ring::digest; use serde::Deserialize; use serde::Serialize; -use std::path::PathBuf; mod transforms; +pub use error::LockfileError as Error; +use thiserror::Error; + +#[derive(Debug, Error)] +pub enum LockfileNpmSnapshotDeserializationError { + #[error("Unable to parse npm specifier: {key}")] + ReqParse { + key: String, + #[source] + source: PackageReqParseError, + }, + #[error(transparent)] + PackageIdDeserialization(#[from] NpmPackageIdDeserializationError), +} + +#[derive(Debug, Clone)] +pub struct LockfileNpmPackageInfo { + pub id: NpmPackageId, + pub dependencies: HashMap, +} + +#[derive(Debug, Clone)] +pub struct LockfileNpmSnapshot { + pub root_packages: HashMap, + pub packages: Vec, +} + pub struct NpmPackageLockfileInfo { pub display_id: String, pub serialized_id: String, @@ -89,7 +121,47 @@ impl PackagesContent { } } +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct LockfileImportMap { + #[serde(skip_serializing_if = "IndexMap::is_empty")] + #[serde(default)] + pub imports: IndexMap, + #[serde(skip_serializing_if = "IndexMap::is_empty")] + #[serde(default)] + pub scopes: IndexMap>, +} + +// IndexMap doesn't implement Hash, so we need to do it ourselves +impl std::hash::Hash for LockfileImportMap { + fn hash(&self, state: &mut H) { + for (key, value) in &self.imports { + key.hash(state); + value.hash(state); + } + for (key, scope_map) in &self.scopes { + key.hash(state); + for (scope_key, scope_value) in scope_map { + scope_key.hash(state); + scope_value.hash(state); + } + } + } +} + +#[derive(Debug, Clone, Serialize, Deserialize, Hash)] +#[serde(rename_all = "camelCase")] +pub struct LockfilePackageJsonDeps { + #[serde(skip_serializing_if = "BTreeMap::is_empty")] + #[serde(default)] + pub dependencies: BTreeMap, + #[serde(skip_serializing_if = "BTreeMap::is_empty")] + #[serde(default)] + pub dev_dependencies: BTreeMap, +} + #[derive(Debug, Clone, Serialize, Deserialize, Hash)] +#[serde(rename_all = "camelCase")] pub struct LockfileContent { version: String, // order these based on auditability @@ -101,6 +173,12 @@ pub struct LockfileContent { pub redirects: BTreeMap, /// Mapping between URLs and their checksums for "http:" and "https:" deps remote: BTreeMap, + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(default)] + pub import_map: Option, + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(default)] + pub package_json: Option, } impl LockfileContent { @@ -110,7 +188,52 @@ impl LockfileContent { packages: Default::default(), redirects: Default::default(), remote: BTreeMap::new(), + import_map: None, + package_json: None, + } + } + + pub fn as_lockfile_npm_snapshot( + &self, + ) -> Result { + let mut root_packages = HashMap::::with_capacity( + self.packages.specifiers.len(), + ); + // collect the specifiers to version mappings + for (key, value) in &self.packages.specifiers { + if let Some(key) = key.strip_prefix("npm:") { + if let Some(value) = value.strip_prefix("npm:") { + let package_req = PackageReq::from_str(key).map_err(|e| { + LockfileNpmSnapshotDeserializationError::ReqParse { + key: key.to_string(), + source: e, + } + })?; + let package_id = NpmPackageId::from_serialized(value)?; + root_packages.insert(package_req, package_id.clone()); + } + } } + + // now fill the packages except for the dist information + let mut packages = Vec::with_capacity(self.packages.npm.len()); + for (key, package) in &self.packages.npm { + let id = NpmPackageId::from_serialized(key)?; + + // collect the dependencies + let mut dependencies = HashMap::with_capacity(package.dependencies.len()); + for (name, specifier) in &package.dependencies { + let dep_id = NpmPackageId::from_serialized(specifier)?; + dependencies.insert(name.clone(), dep_id); + } + + packages.push(LockfileNpmPackageInfo { id, dependencies }); + } + + Ok(LockfileNpmSnapshot { + root_packages, + packages, + }) } } From ca6a30d6789e689e355888494d480635d8d6bee4 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 15 Jan 2024 20:45:12 -0500 Subject: [PATCH 02/38] Better. No need for NpmPackageId --- src/lib.rs | 243 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 163 insertions(+), 80 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ab0fd8c..f08c8cb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,13 +4,11 @@ mod error; use std::collections::BTreeMap; use std::collections::HashMap; +use std::collections::HashSet; +use std::collections::VecDeque; use std::io::Write; use std::path::PathBuf; -use deno_semver::npm::NpmPackageId; -use deno_semver::npm::NpmPackageIdDeserializationError; -use deno_semver::package::PackageReq; -use deno_semver::package::PackageReqParseError; use indexmap::IndexMap; use ring::digest; use serde::Deserialize; @@ -19,30 +17,116 @@ use serde::Serialize; mod transforms; pub use error::LockfileError as Error; -use thiserror::Error; - -#[derive(Debug, Error)] -pub enum LockfileNpmSnapshotDeserializationError { - #[error("Unable to parse npm specifier: {key}")] - ReqParse { - key: String, - #[source] - source: PackageReqParseError, - }, - #[error(transparent)] - PackageIdDeserialization(#[from] NpmPackageIdDeserializationError), + +#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +struct LockfileNpmPackageId(String); + +struct LockfileNpmGraphPackage { + reference_count: usize, + integrity: String, + dependencies: BTreeMap, } -#[derive(Debug, Clone)] -pub struct LockfileNpmPackageInfo { - pub id: NpmPackageId, - pub dependencies: HashMap, +struct LockfileNpmGraph { + pub root_packages: HashMap, + pub packages: HashMap, } -#[derive(Debug, Clone)] -pub struct LockfileNpmSnapshot { - pub root_packages: HashMap, - pub packages: Vec, +impl LockfileNpmGraph { + pub fn from_lockfile(content: &PackagesContent) -> Self { + let mut root_packages = + HashMap::::with_capacity( + content.specifiers.len(), + ); + // collect the specifiers to version mappings + for (key, value) in &content.specifiers { + if let Some(key) = key.strip_prefix("npm:") { + if let Some(value) = value.strip_prefix("npm:") { + root_packages + .insert(key.to_string(), LockfileNpmPackageId(value.to_string())); + } + } + } + + let mut packages = HashMap::new(); + for (id, package) in &content.npm { + packages.insert( + LockfileNpmPackageId(id.clone()), + LockfileNpmGraphPackage { + reference_count: 0, + integrity: package.integrity.clone(), + dependencies: package + .dependencies + .iter() + .map(|(key, dep_id)| { + (key.clone(), LockfileNpmPackageId(dep_id.clone())) + }) + .collect(), + }, + ); + } + + let mut visited = HashSet::new(); + let mut pending = root_packages.values().cloned().collect::>(); + while let Some(id) = pending.pop_back() { + if let Some(package) = packages.get_mut(&id) { + package.reference_count += 1; + if visited.insert(id) { + for dep_id in package.dependencies.values() { + pending.push_back(dep_id.clone()); + } + } + } + } + + Self { + root_packages, + packages, + } + } + + pub fn remove_root_package(&mut self, package_req: &String) { + let mut pending = VecDeque::new(); + if let Some(package_id) = self.root_packages.remove(package_req) { + pending.push_back(package_id); + } + + while let Some(id) = pending.pop_back() { + eprintln!("HANDLING: {}", id.0); + if let Some(package) = self.packages.get_mut(&id) { + package.reference_count -= 1; + if package.reference_count == 0 { + for dep_id in package.dependencies.values() { + pending.push_back(dep_id.clone()); + } + self.packages.remove(&id); + } + } + } + } + + fn populate_packages(self, packages: &mut PackagesContent) { + for (req, id) in self.root_packages { + eprintln!("ADDING: {:#?}", req); + packages + .specifiers + .insert(format!("npm:{}", req), format!("npm:{}", id.0)); + } + for (id, package) in self.packages { + eprintln!("ADDING: {}", id.0); + packages.npm.insert( + id.0, + NpmPackageInfo { + integrity: package.integrity.clone(), + dependencies: package + .dependencies + .into_iter() + .map(|(name, id)| (name, id.0)) + .collect(), + }, + ); + } + } } pub struct NpmPackageLockfileInfo { @@ -119,6 +203,14 @@ impl PackagesContent { fn is_empty(&self) -> bool { self.specifiers.is_empty() && self.npm.is_empty() } + + pub fn clear_npm(&mut self) { + self.specifiers.retain(|k, v| { + let has_npm = k.starts_with("npm:") || v.starts_with("npm:"); + !has_npm + }); + self.npm.clear(); + } } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -132,7 +224,8 @@ pub struct LockfileImportMap { pub scopes: IndexMap>, } -// IndexMap doesn't implement Hash, so we need to do it ourselves +// IndexMap doesn't implement Hash, so we need to do this ourselves. +// Hashing is used in the LSP to tell when the lockfile has changed. impl std::hash::Hash for LockfileImportMap { fn hash(&self, state: &mut H) { for (key, value) in &self.imports { @@ -149,17 +242,6 @@ impl std::hash::Hash for LockfileImportMap { } } -#[derive(Debug, Clone, Serialize, Deserialize, Hash)] -#[serde(rename_all = "camelCase")] -pub struct LockfilePackageJsonDeps { - #[serde(skip_serializing_if = "BTreeMap::is_empty")] - #[serde(default)] - pub dependencies: BTreeMap, - #[serde(skip_serializing_if = "BTreeMap::is_empty")] - #[serde(default)] - pub dev_dependencies: BTreeMap, -} - #[derive(Debug, Clone, Serialize, Deserialize, Hash)] #[serde(rename_all = "camelCase")] pub struct LockfileContent { @@ -178,7 +260,7 @@ pub struct LockfileContent { pub import_map: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] - pub package_json: Option, + pub package_json: Option>, } impl LockfileContent { @@ -192,49 +274,6 @@ impl LockfileContent { package_json: None, } } - - pub fn as_lockfile_npm_snapshot( - &self, - ) -> Result { - let mut root_packages = HashMap::::with_capacity( - self.packages.specifiers.len(), - ); - // collect the specifiers to version mappings - for (key, value) in &self.packages.specifiers { - if let Some(key) = key.strip_prefix("npm:") { - if let Some(value) = value.strip_prefix("npm:") { - let package_req = PackageReq::from_str(key).map_err(|e| { - LockfileNpmSnapshotDeserializationError::ReqParse { - key: key.to_string(), - source: e, - } - })?; - let package_id = NpmPackageId::from_serialized(value)?; - root_packages.insert(package_req, package_id.clone()); - } - } - } - - // now fill the packages except for the dist information - let mut packages = Vec::with_capacity(self.packages.npm.len()); - for (key, package) in &self.packages.npm { - let id = NpmPackageId::from_serialized(key)?; - - // collect the dependencies - let mut dependencies = HashMap::with_capacity(package.dependencies.len()); - for (name, specifier) in &package.dependencies { - let dep_id = NpmPackageId::from_serialized(specifier)?; - dependencies.insert(name.clone(), dep_id); - } - - packages.push(LockfileNpmPackageInfo { id, dependencies }); - } - - Ok(LockfileNpmSnapshot { - root_packages, - packages, - }) - } } #[derive(Debug, Clone, Hash)] @@ -287,6 +326,7 @@ impl Lockfile { content: &str, overwrite: bool, ) -> Result { + eprintln!("NEW LOCKFILE: {} {}", filename.display(), overwrite); // Writing a lock file always uses the new format. if overwrite { return Ok(Lockfile { @@ -332,11 +372,54 @@ impl Lockfile { json_string } + pub fn set_package_json_deps( + &mut self, + package_json_deps: Option>, + ) { + if let Some(new_package_json_deps) = package_json_deps { + match &mut self.content.package_json { + Some(current_package_json) => { + if new_package_json_deps != *current_package_json { + let current_package_json = + std::mem::replace(current_package_json, new_package_json_deps); + let mut graph = + LockfileNpmGraph::from_lockfile(&self.content.packages); + for package_req in ¤t_package_json { + eprintln!("LOOKING AT: {}", package_req); + graph.remove_root_package(&package_req); + } + + // clear out the npm packages + eprintln!("CLEARING OUT"); + self.content.packages.clear_npm(); + // now populate the graph back into the packages + eprintln!("POPULATING"); + graph.populate_packages(&mut self.content.packages); + + self.has_content_changed = true; + eprintln!("RESULT: {}", self.as_json_string()); + } + } + None => { + self.content.package_json = Some(new_package_json_deps); + // clear out all npm related specifiers when adding a package.json + self.content.packages.clear_npm(); + self.has_content_changed = true; + } + } + } else { + // don't clear the package.json field because someone might + // be running a one-off script without a package.json + } + } + // Synchronize lock file to disk - noop if --lock-write file is not specified. pub fn write(&self) -> Result<(), Error> { if !self.has_content_changed && !self.overwrite { return Ok(()); } + eprintln!("WRITING"); + eprintln!("RESULT: {}", self.as_json_string()); let mut f = std::fs::OpenOptions::new() .write(true) From 1b0deff8ef0d0a36a3ee8ef711161c3b85ce0209 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 16 Jan 2024 19:12:26 -0500 Subject: [PATCH 03/38] Getting this working with import maps --- Cargo.toml | 2 +- src/graphs.rs | 274 ++++++++++++++++++++++++++++++++++++ src/lib.rs | 374 +++++++++++++++++++++++++------------------------- 3 files changed, 461 insertions(+), 189 deletions(-) create mode 100644 src/graphs.rs diff --git a/Cargo.toml b/Cargo.toml index d42c989..8c427f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,4 +20,4 @@ pretty_assertions = "1.4.0" temp-dir = "0.1.11" [patch.crates-io] -deno_semver = { path = "../deno_semver" } \ No newline at end of file +deno_semver = { path = "../deno_semver" } diff --git a/src/graphs.rs b/src/graphs.rs new file mode 100644 index 0000000..1738d81 --- /dev/null +++ b/src/graphs.rs @@ -0,0 +1,274 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +use std::borrow::Cow; +use std::collections::BTreeMap; +use std::collections::BTreeSet; +use std::collections::HashMap; +use std::collections::HashSet; +use std::collections::VecDeque; + +use crate::NpmPackageInfo; +use crate::PackagesContent; + +#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +struct LockfileNpmPackageId(String); + +struct LockfileNpmGraphPackage { + reference_count: usize, + integrity: String, + dependencies: BTreeMap, +} + +pub struct LockfileNpmGraph { + root_packages: HashMap, + packages: HashMap, +} + +impl LockfileNpmGraph { + pub fn from_lockfile(content: &PackagesContent) -> Self { + let mut root_packages = + HashMap::::with_capacity( + content.specifiers.len(), + ); + // collect the specifiers to version mappings + for (key, value) in &content.specifiers { + if let Some(key) = key.strip_prefix("npm:") { + if let Some(value) = value.strip_prefix("npm:") { + root_packages + .insert(key.to_string(), LockfileNpmPackageId(value.to_string())); + } + } + } + + let mut packages = HashMap::new(); + for (id, package) in &content.npm { + packages.insert( + LockfileNpmPackageId(id.clone()), + LockfileNpmGraphPackage { + reference_count: 0, + integrity: package.integrity.clone(), + dependencies: package + .dependencies + .iter() + .map(|(key, dep_id)| { + (key.clone(), LockfileNpmPackageId(dep_id.clone())) + }) + .collect(), + }, + ); + } + + let mut visited = HashSet::new(); + let mut pending = root_packages.values().cloned().collect::>(); + while let Some(id) = pending.pop_back() { + if let Some(package) = packages.get_mut(&id) { + package.reference_count += 1; + if visited.insert(id) { + for dep_id in package.dependencies.values() { + pending.push_back(dep_id.clone()); + } + } + } + } + + Self { + root_packages, + packages, + } + } + + pub fn remove_root_packages<'a>( + &mut self, + package_reqs: impl Iterator, + ) { + fn package_id_parts( + package_id: &LockfileNpmPackageId, + ) -> impl Iterator { + let package_id = &package_id.0; + let package_id = package_id.strip_prefix("npm:").unwrap_or(package_id); + package_id.split("_").filter(|s| !s.is_empty()) + } + + let mut pending = VecDeque::new(); + let mut pending_reqs = package_reqs + .map(|req| Cow::Borrowed(req)) + .collect::>(); + while let Some(pending_req) = pending_reqs.pop_front() { + if let Some(package_id) = self.root_packages.remove(pending_req.as_ref()) + { + if let Some(first_part) = package_id_parts(&package_id).next() { + for (req, id) in &self.root_packages { + if package_id_parts(id).any(|part| part == first_part) { + pending_reqs.push_back(Cow::Owned(req.clone())); + } + } + } + pending.push_back(package_id); + } + } + + while let Some(id) = pending.pop_back() { + eprintln!("HANDLING: {}", id.0); + if let Some(package) = self.packages.get_mut(&id) { + package.reference_count -= 1; + if package.reference_count == 0 { + for dep_id in package.dependencies.values() { + pending.push_back(dep_id.clone()); + } + self.packages.remove(&id); + } + } + } + } + + pub fn populate_packages(self, packages: &mut PackagesContent) { + for (req, id) in self.root_packages { + eprintln!("ADDING: {:#?}", req); + packages + .specifiers + .insert(format!("npm:{}", req), format!("npm:{}", id.0)); + } + for (id, package) in self.packages { + eprintln!("ADDING: {}", id.0); + packages.npm.insert( + id.0, + NpmPackageInfo { + integrity: package.integrity.clone(), + dependencies: package + .dependencies + .into_iter() + .map(|(name, id)| (name, id.0)) + .collect(), + }, + ); + } + } +} + +#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +struct LockfileJsrNv(String); + +#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +struct LockfileJsrReq(String); + +struct LockfileJsrGraphPackage { + reference_count: usize, + dependencies: BTreeSet, +} + +pub struct LockfileJsrGraph { + root_packages: HashMap, + packages: HashMap, +} + +impl LockfileJsrGraph { + pub fn from_lockfile(content: &PackagesContent) -> Self { + let mut root_packages = + HashMap::::with_capacity( + content.specifiers.len(), + ); + // collect the specifiers to version mappings + for (key, value) in &content.specifiers { + if let Some(key) = key.strip_prefix("jsr:") { + if let Some(value) = value.strip_prefix("jsr:") { + root_packages.insert( + LockfileJsrReq(key.to_string()), + LockfileJsrNv(value.to_string()), + ); + } + } + } + + let mut packages = HashMap::new(); + for (nv, package) in &content.jsr { + packages.insert( + LockfileJsrNv(nv.clone()), + LockfileJsrGraphPackage { + reference_count: 0, + dependencies: package + .dependencies + .iter() + .map(|req| LockfileJsrReq(req.clone())) + .collect(), + }, + ); + } + + let mut visited = HashSet::new(); + let mut pending = root_packages.values().cloned().collect::>(); + while let Some(nv) = pending.pop_back() { + if let Some(package) = packages.get_mut(&nv) { + package.reference_count += 1; + if visited.insert(nv) { + for req in &package.dependencies { + if let Some(nv) = root_packages.get(req) { + pending.push_back(nv.clone()); + } + } + } + } + } + + Self { + root_packages, + packages, + } + } + + pub fn remove_root_packages<'a>( + &mut self, + package_reqs: impl Iterator, + ) { + let mut pending = VecDeque::new(); + for package_req in package_reqs { + eprintln!("REMOVING package req: {}", package_req); + if let Some(package_nv) = self + .root_packages + .remove(&LockfileJsrReq(package_req.to_string())) + { + pending.push_back(package_nv); + } + } + + while let Some(nv) = pending.pop_back() { + if let Some(package) = self.packages.get_mut(&nv) { + package.reference_count -= 1; + if package.reference_count == 0 { + for req in &package.dependencies { + if let Some(nv) = self.root_packages.get(req) { + pending.push_back(nv.clone()); + } + } + self.packages.remove(&nv); + if let Some((req, _)) = + self.root_packages.iter().find(|(_, pkg_nv)| **pkg_nv == nv) + { + self.root_packages.remove(&req.clone()); + } + } + } + } + } + + pub fn populate_packages(self, packages: &mut PackagesContent) { + for (req, nv) in self.root_packages { + eprintln!("ADDING: {:#?}", req.0); + packages + .specifiers + .insert(format!("jsr:{}", req.0), format!("jsr:{}", nv.0)); + } + for (nv, package) in self.packages { + eprintln!("ADDING: {}", nv.0); + packages.jsr.insert( + nv.0, + crate::JsrPackageInfo { + dependencies: package + .dependencies + .into_iter() + .map(|req| req.0) + .collect(), + }, + ); + } + } +} diff --git a/src/lib.rs b/src/lib.rs index f08c8cb..ae407f9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,14 +1,15 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. mod error; +mod graphs; use std::collections::BTreeMap; -use std::collections::HashMap; +use std::collections::BTreeSet; use std::collections::HashSet; -use std::collections::VecDeque; use std::io::Write; use std::path::PathBuf; +use deno_semver::jsr; use indexmap::IndexMap; use ring::digest; use serde::Deserialize; @@ -17,117 +18,10 @@ use serde::Serialize; mod transforms; pub use error::LockfileError as Error; +use thiserror::Error; -#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -struct LockfileNpmPackageId(String); - -struct LockfileNpmGraphPackage { - reference_count: usize, - integrity: String, - dependencies: BTreeMap, -} - -struct LockfileNpmGraph { - pub root_packages: HashMap, - pub packages: HashMap, -} - -impl LockfileNpmGraph { - pub fn from_lockfile(content: &PackagesContent) -> Self { - let mut root_packages = - HashMap::::with_capacity( - content.specifiers.len(), - ); - // collect the specifiers to version mappings - for (key, value) in &content.specifiers { - if let Some(key) = key.strip_prefix("npm:") { - if let Some(value) = value.strip_prefix("npm:") { - root_packages - .insert(key.to_string(), LockfileNpmPackageId(value.to_string())); - } - } - } - - let mut packages = HashMap::new(); - for (id, package) in &content.npm { - packages.insert( - LockfileNpmPackageId(id.clone()), - LockfileNpmGraphPackage { - reference_count: 0, - integrity: package.integrity.clone(), - dependencies: package - .dependencies - .iter() - .map(|(key, dep_id)| { - (key.clone(), LockfileNpmPackageId(dep_id.clone())) - }) - .collect(), - }, - ); - } - - let mut visited = HashSet::new(); - let mut pending = root_packages.values().cloned().collect::>(); - while let Some(id) = pending.pop_back() { - if let Some(package) = packages.get_mut(&id) { - package.reference_count += 1; - if visited.insert(id) { - for dep_id in package.dependencies.values() { - pending.push_back(dep_id.clone()); - } - } - } - } - - Self { - root_packages, - packages, - } - } - - pub fn remove_root_package(&mut self, package_req: &String) { - let mut pending = VecDeque::new(); - if let Some(package_id) = self.root_packages.remove(package_req) { - pending.push_back(package_id); - } - - while let Some(id) = pending.pop_back() { - eprintln!("HANDLING: {}", id.0); - if let Some(package) = self.packages.get_mut(&id) { - package.reference_count -= 1; - if package.reference_count == 0 { - for dep_id in package.dependencies.values() { - pending.push_back(dep_id.clone()); - } - self.packages.remove(&id); - } - } - } - } - - fn populate_packages(self, packages: &mut PackagesContent) { - for (req, id) in self.root_packages { - eprintln!("ADDING: {:#?}", req); - packages - .specifiers - .insert(format!("npm:{}", req), format!("npm:{}", id.0)); - } - for (id, package) in self.packages { - eprintln!("ADDING: {}", id.0); - packages.npm.insert( - id.0, - NpmPackageInfo { - integrity: package.integrity.clone(), - dependencies: package - .dependencies - .into_iter() - .map(|(name, id)| (name, id.0)) - .collect(), - }, - ); - } - } -} +use crate::graphs::LockfileJsrGraph; +use crate::graphs::LockfileNpmGraph; pub struct NpmPackageLockfileInfo { pub display_id: String, @@ -155,16 +49,31 @@ fn gen_checksum(v: &[impl AsRef<[u8]>]) -> String { out.join("") } -#[derive(Debug)] -pub struct LockfileError(String); - -impl std::fmt::Display for LockfileError { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - f.write_str(&self.0) - } +#[derive(Debug, Error)] +pub enum LockfileError { + #[error(transparent)] + IntegrityCheckFailed(#[from] IntegrityCheckFailedError), } -impl std::error::Error for LockfileError {} +#[derive(Debug, Error)] +#[error("Integrity check failed for npm package: \"{package_display_id}\". Unable to verify that the package +is the same as when the lockfile was generated. + +Actual: {actual} +Expected: {expected} + +This could be caused by: +* the lock file may be corrupt +* the source itself may be corrupt + +Use \"--lock-write\" flag to regenerate the lockfile at \"{filename}\".", +)] +pub struct IntegrityCheckFailedError { + pub package_display_id: String, + pub actual: String, + pub expected: String, + pub filename: String, +} #[derive(Debug, Clone, Serialize, Deserialize, Hash)] pub struct NpmPackageInfo { @@ -172,13 +81,19 @@ pub struct NpmPackageInfo { pub dependencies: BTreeMap, } +#[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] +pub struct JsrPackageInfo { + /// List of package requirements found in the dependency. + /// + /// This is used to tell when a package can be removed from the lockfile. + pub dependencies: BTreeSet, +} + #[derive(Clone, Debug, Default, Serialize, Deserialize, Hash)] pub struct PackagesContent { /// Mapping between requests for deno specifiers and resolved packages, eg. /// { - /// "deno:path": "deno:@std/path@1.0.0", - /// "deno:ts-morph@11": "npm:ts-morph@11.0.0", - /// "deno:@foo/bar@^2.1": "deno:@foo/bar@2.1.3", + /// "jsr:@foo/bar@^2.1": "jsr:@foo/bar@2.1.3", /// "npm:@ts-morph/common@^11": "npm:@ts-morph/common@11.0.0", /// } #[serde(skip_serializing_if = "BTreeMap::is_empty")] @@ -197,6 +112,18 @@ pub struct PackagesContent { #[serde(skip_serializing_if = "BTreeMap::is_empty")] #[serde(default)] pub npm: BTreeMap, + + /// Mapping between resolved jsr specifiers and their associated info, eg. + /// { + /// "@std/fs@1.0.0": { + /// "dependencies": [ + /// "@std/fs@^1.0", + /// ] + /// } + /// } + #[serde(skip_serializing_if = "BTreeMap::is_empty")] + #[serde(default)] + pub jsr: BTreeMap, } impl PackagesContent { @@ -204,41 +131,20 @@ impl PackagesContent { self.specifiers.is_empty() && self.npm.is_empty() } - pub fn clear_npm(&mut self) { + fn clear_npm(&mut self) { self.specifiers.retain(|k, v| { let has_npm = k.starts_with("npm:") || v.starts_with("npm:"); !has_npm }); self.npm.clear(); } -} -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct LockfileImportMap { - #[serde(skip_serializing_if = "IndexMap::is_empty")] - #[serde(default)] - pub imports: IndexMap, - #[serde(skip_serializing_if = "IndexMap::is_empty")] - #[serde(default)] - pub scopes: IndexMap>, -} - -// IndexMap doesn't implement Hash, so we need to do this ourselves. -// Hashing is used in the LSP to tell when the lockfile has changed. -impl std::hash::Hash for LockfileImportMap { - fn hash(&self, state: &mut H) { - for (key, value) in &self.imports { - key.hash(state); - value.hash(state); - } - for (key, scope_map) in &self.scopes { - key.hash(state); - for (scope_key, scope_value) in scope_map { - scope_key.hash(state); - scope_value.hash(state); - } - } + fn clear_jsr(&mut self) { + self.specifiers.retain(|k, v| { + let has_npm = k.starts_with("jsr:") || v.starts_with("jsr:"); + !has_npm + }); + self.jsr.clear(); } } @@ -257,10 +163,10 @@ pub struct LockfileContent { remote: BTreeMap, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] - pub import_map: Option, + pub import_map: Option>, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] - pub package_json: Option>, + pub package_json: Option>, } impl LockfileContent { @@ -374,37 +280,36 @@ impl Lockfile { pub fn set_package_json_deps( &mut self, - package_json_deps: Option>, + package_json_deps: Option>, ) { if let Some(new_package_json_deps) = package_json_deps { match &mut self.content.package_json { - Some(current_package_json) => { - if new_package_json_deps != *current_package_json { - let current_package_json = - std::mem::replace(current_package_json, new_package_json_deps); - let mut graph = - LockfileNpmGraph::from_lockfile(&self.content.packages); - for package_req in ¤t_package_json { - eprintln!("LOOKING AT: {}", package_req); - graph.remove_root_package(&package_req); + Some(current_package_json_deps) => { + if new_package_json_deps != *current_package_json_deps { + // update self.content.package_json + let old_package_json_deps = std::mem::replace( + current_package_json_deps, + new_package_json_deps, + ); + let new_package_json_deps = current_package_json_deps; + + // figure out the removed package.json deps + let removed_package_json_deps = old_package_json_deps + .iter() + .filter(|c| !new_package_json_deps.contains(*c)) + .map(|s| s.as_str()) + .collect::>(); + if !removed_package_json_deps.is_empty() { + // there exists some, so create a graph and remove them from the lockfile + self.remove_npm_deps(removed_package_json_deps.into_iter()); } - // clear out the npm packages - eprintln!("CLEARING OUT"); - self.content.packages.clear_npm(); - // now populate the graph back into the packages - eprintln!("POPULATING"); - graph.populate_packages(&mut self.content.packages); - self.has_content_changed = true; eprintln!("RESULT: {}", self.as_json_string()); } } None => { - self.content.package_json = Some(new_package_json_deps); - // clear out all npm related specifiers when adding a package.json - self.content.packages.clear_npm(); - self.has_content_changed = true; + // todo(THIS PR): document how it would be nice to clear out the npm deps in this scenario } } } else { @@ -413,13 +318,93 @@ impl Lockfile { } } + fn remove_npm_deps<'a>( + &mut self, + package_reqs: impl Iterator, + ) { + let mut graph = LockfileNpmGraph::from_lockfile(&self.content.packages); + + graph.remove_root_packages(package_reqs); + + // clear out the npm packages + self.content.packages.clear_npm(); + // now populate the graph back into the packages + graph.populate_packages(&mut self.content.packages); + } + + pub fn set_import_map_deps( + &mut self, + import_map_deps: Option>, + ) { + if let Some(new_import_map_deps) = import_map_deps { + match &mut self.content.import_map { + Some(current_import_map_deps) => { + if new_import_map_deps != *current_import_map_deps { + let old_import_map_deps = + std::mem::replace(current_import_map_deps, new_import_map_deps); + let new_import_map_deps = current_import_map_deps; + + // figure out the removed import map deps + let mut removed_import_map_deps = old_import_map_deps + .iter() + .filter(|c| !new_import_map_deps.contains(*c)) + .peekable(); + if removed_import_map_deps.peek().is_some() { + // there exists some, so partition out to jsr and npm packages + let mut npm_packages = Vec::new(); + let mut jsr_packages = Vec::new(); + for req in removed_import_map_deps { + if let Some(req) = req.strip_prefix("jsr:") { + jsr_packages.push(req); + } else if let Some(req) = req.strip_prefix("npm:") { + npm_packages.push(req); + } + } + + if !npm_packages.is_empty() { + self.remove_npm_deps(npm_packages.into_iter()); + } + if !jsr_packages.is_empty() { + self.remove_jsr_deps(jsr_packages.into_iter()); + } + + self.has_content_changed = true; + } + } + } + None => { + // todo(THIS PR): document how it would be nice to clear out the npm deps in this scenario too + self.content.import_map = Some(new_import_map_deps); + // clear out all jsr related specifiers when adding an import map + self.content.packages.clear_jsr(); + self.has_content_changed = true; + } + } + } else { + // don't clear the import map field because someone might + // be running a one-off script without an import map + } + } + + fn remove_jsr_deps<'a>( + &mut self, + package_reqs: impl Iterator, + ) { + let mut graph = LockfileJsrGraph::from_lockfile(&self.content.packages); + graph.remove_root_packages(package_reqs); + + // clear out the jsr packages + self.content.packages.clear_jsr(); + + // now populate the graph back into the packages + graph.populate_packages(&mut self.content.packages); + } + // Synchronize lock file to disk - noop if --lock-write file is not specified. pub fn write(&self) -> Result<(), Error> { if !self.has_content_changed && !self.overwrite { return Ok(()); } - eprintln!("WRITING"); - eprintln!("RESULT: {}", self.as_json_string()); let mut f = std::fs::OpenOptions::new() .write(true) @@ -487,18 +472,17 @@ impl Lockfile { if let Some(package_info) = self.content.packages.npm.get(&package.serialized_id) { - if package_info.integrity.as_str() != package.integrity { - return Err(LockfileError(format!( - "Integrity check failed for npm package: \"{}\". Unable to verify that the package -is the same as when the lockfile was generated. - -This could be caused by: - * the lock file may be corrupt - * the source itself may be corrupt - -Use \"--lock-write\" flag to regenerate the lockfile at \"{}\".", - package.display_id, self.filename.display() - ))); + let actual = package_info.integrity.as_str(); + let expected = &package.integrity; + if actual != expected { + return Err(LockfileError::IntegrityCheckFailed( + IntegrityCheckFailedError { + package_display_id: package.display_id, + filename: self.filename.display().to_string(), + actual: actual.to_string(), + expected: expected.to_string(), + }, + )); } } else { self.insert_npm_package(package); @@ -545,6 +529,20 @@ Use \"--lock-write\" flag to regenerate the lockfile at \"{}\".", } } + pub fn insert_package_deps( + &mut self, + name: String, + deps: impl Iterator, + ) { + let package = self.content.packages.jsr.entry(name).or_default(); + let start_count = package.dependencies.len(); + package.dependencies.extend(deps); + let end_count = package.dependencies.len(); + if start_count != end_count { + self.has_content_changed = true; + } + } + pub fn insert_redirect(&mut self, from: String, to: String) { let maybe_prev = self.content.redirects.get(&from); From 8f2ac7d20b77d7f5d777179cbb859606d7396d72 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 17 Jan 2024 11:14:25 -0500 Subject: [PATCH 04/38] Combine graphs --- src/graphs.rs | 333 +++++++++++++++++++++++--------------------------- src/lib.rs | 96 +++++---------- 2 files changed, 182 insertions(+), 247 deletions(-) diff --git a/src/graphs.rs b/src/graphs.rs index 1738d81..b3d6d76 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -10,41 +10,90 @@ use std::collections::VecDeque; use crate::NpmPackageInfo; use crate::PackagesContent; +#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +enum LockfilePkgId { + Npm(LockfileNpmPackageId), + Jsr(LockfileJsrPkgNv), +} + +#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +struct LockfileJsrPkgNv(String); + #[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] struct LockfileNpmPackageId(String); +impl LockfileNpmPackageId { + pub fn parts(&self) -> impl Iterator { + let package_id = &self.0; + let package_id = package_id.strip_prefix("npm:").unwrap_or(package_id); + package_id.split("_").filter(|s| !s.is_empty()) + } +} + +#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +struct LockfilePkgReq(String); + +// TODO(THIS PR): REFERENCE_COUNT SHOULD INCLUDE THE ROOT PACKAGES REFERENCING IT +enum LockfileGraphPackage { + Jsr(LockfileJsrGraphPackage), + Npm(LockfileNpmGraphPackage), +} + struct LockfileNpmGraphPackage { reference_count: usize, integrity: String, dependencies: BTreeMap, } -pub struct LockfileNpmGraph { - root_packages: HashMap, - packages: HashMap, +struct LockfileJsrGraphPackage { + reference_count: usize, + dependencies: BTreeSet, +} + +pub struct LockfilePackageGraph { + root_packages: HashMap, + packages: HashMap, } -impl LockfileNpmGraph { +impl LockfilePackageGraph { pub fn from_lockfile(content: &PackagesContent) -> Self { let mut root_packages = - HashMap::::with_capacity( + HashMap::::with_capacity( content.specifiers.len(), ); // collect the specifiers to version mappings for (key, value) in &content.specifiers { - if let Some(key) = key.strip_prefix("npm:") { - if let Some(value) = value.strip_prefix("npm:") { - root_packages - .insert(key.to_string(), LockfileNpmPackageId(value.to_string())); - } + if let Some(value) = value.strip_prefix("npm:") { + root_packages.insert( + LockfilePkgReq(key.to_string()), + LockfilePkgId::Npm(LockfileNpmPackageId(value.to_string())), + ); + } else if let Some(value) = value.strip_prefix("jsr:") { + root_packages.insert( + LockfilePkgReq(key.to_string()), + LockfilePkgId::Jsr(LockfileJsrPkgNv(value.to_string())), + ); } } let mut packages = HashMap::new(); + for (nv, package) in &content.jsr { + packages.insert( + LockfilePkgId::Jsr(LockfileJsrPkgNv(nv.clone())), + LockfileGraphPackage::Jsr(LockfileJsrGraphPackage { + reference_count: 0, + dependencies: package + .dependencies + .iter() + .map(|req| LockfilePkgReq(req.clone())) + .collect(), + }), + ); + } for (id, package) in &content.npm { packages.insert( - LockfileNpmPackageId(id.clone()), - LockfileNpmGraphPackage { + LockfilePkgId::Npm(LockfileNpmPackageId(id.clone())), + LockfileGraphPackage::Npm(LockfileNpmGraphPackage { reference_count: 0, integrity: package.integrity.clone(), dependencies: package @@ -54,7 +103,7 @@ impl LockfileNpmGraph { (key.clone(), LockfileNpmPackageId(dep_id.clone())) }) .collect(), - }, + }), ); } @@ -62,10 +111,24 @@ impl LockfileNpmGraph { let mut pending = root_packages.values().cloned().collect::>(); while let Some(id) = pending.pop_back() { if let Some(package) = packages.get_mut(&id) { - package.reference_count += 1; - if visited.insert(id) { - for dep_id in package.dependencies.values() { - pending.push_back(dep_id.clone()); + match package { + LockfileGraphPackage::Jsr(package) => { + package.reference_count += 1; + if visited.insert(id) { + for req in &package.dependencies { + if let Some(nv) = root_packages.get(req) { + pending.push_back(nv.clone()); + } + } + } + } + LockfileGraphPackage::Npm(package) => { + package.reference_count += 1; + if visited.insert(id) { + for dep_id in package.dependencies.values() { + pending.push_back(LockfilePkgId::Npm(dep_id.clone())); + } + } } } } @@ -79,43 +142,58 @@ impl LockfileNpmGraph { pub fn remove_root_packages<'a>( &mut self, - package_reqs: impl Iterator, + package_reqs: impl Iterator, ) { - fn package_id_parts( - package_id: &LockfileNpmPackageId, - ) -> impl Iterator { - let package_id = &package_id.0; - let package_id = package_id.strip_prefix("npm:").unwrap_or(package_id); - package_id.split("_").filter(|s| !s.is_empty()) - } - let mut pending = VecDeque::new(); let mut pending_reqs = package_reqs - .map(|req| Cow::Borrowed(req)) + .map(|req| LockfilePkgReq(req.to_string())) .collect::>(); while let Some(pending_req) = pending_reqs.pop_front() { - if let Some(package_id) = self.root_packages.remove(pending_req.as_ref()) - { - if let Some(first_part) = package_id_parts(&package_id).next() { - for (req, id) in &self.root_packages { - if package_id_parts(id).any(|part| part == first_part) { - pending_reqs.push_back(Cow::Owned(req.clone())); + eprintln!("REMOVING package req: {:#?}", pending_req); + if let Some(id) = self.root_packages.remove(&pending_req) { + if let LockfilePkgId::Npm(id) = &id { + if let Some(first_part) = id.parts().next() { + for (req, id) in &self.root_packages { + if let LockfilePkgId::Npm(id) = &id { + if id.parts().any(|part| part == first_part) { + pending_reqs.push_back(req.clone()); + } + } } } } - pending.push_back(package_id); + pending.push_back(id); } } while let Some(id) = pending.pop_back() { - eprintln!("HANDLING: {}", id.0); if let Some(package) = self.packages.get_mut(&id) { - package.reference_count -= 1; - if package.reference_count == 0 { - for dep_id in package.dependencies.values() { - pending.push_back(dep_id.clone()); + match package { + LockfileGraphPackage::Jsr(package) => { + package.reference_count -= 1; + if package.reference_count == 0 { + for req in &package.dependencies { + if let Some(id) = self.root_packages.get(req) { + pending.push_back(id.clone()); + } + } + self.packages.remove(&id); + if let Some((req, _)) = + self.root_packages.iter().find(|(_, pkg_nv)| **pkg_nv == id) + { + self.root_packages.remove(&req.clone()); + } + } + } + LockfileGraphPackage::Npm(package) => { + package.reference_count -= 1; + if package.reference_count == 0 { + for dep_id in package.dependencies.values() { + pending.push_back(LockfilePkgId::Npm(dep_id.clone())); + } + self.packages.remove(&id); + } } - self.packages.remove(&id); } } } @@ -123,152 +201,49 @@ impl LockfileNpmGraph { pub fn populate_packages(self, packages: &mut PackagesContent) { for (req, id) in self.root_packages { - eprintln!("ADDING: {:#?}", req); - packages - .specifiers - .insert(format!("npm:{}", req), format!("npm:{}", id.0)); - } - for (id, package) in self.packages { - eprintln!("ADDING: {}", id.0); - packages.npm.insert( - id.0, - NpmPackageInfo { - integrity: package.integrity.clone(), - dependencies: package - .dependencies - .into_iter() - .map(|(name, id)| (name, id.0)) - .collect(), + packages.specifiers.insert( + req.0, + match id { + LockfilePkgId::Npm(id) => format!("npm:{}", id.0), + LockfilePkgId::Jsr(nv) => format!("jsr:{}", nv.0), }, ); } - } -} - -#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -struct LockfileJsrNv(String); - -#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -struct LockfileJsrReq(String); - -struct LockfileJsrGraphPackage { - reference_count: usize, - dependencies: BTreeSet, -} - -pub struct LockfileJsrGraph { - root_packages: HashMap, - packages: HashMap, -} - -impl LockfileJsrGraph { - pub fn from_lockfile(content: &PackagesContent) -> Self { - let mut root_packages = - HashMap::::with_capacity( - content.specifiers.len(), - ); - // collect the specifiers to version mappings - for (key, value) in &content.specifiers { - if let Some(key) = key.strip_prefix("jsr:") { - if let Some(value) = value.strip_prefix("jsr:") { - root_packages.insert( - LockfileJsrReq(key.to_string()), - LockfileJsrNv(value.to_string()), + for (id, package) in self.packages { + eprintln!("ADDING: {:#?}", id); + match package { + LockfileGraphPackage::Jsr(package) => { + packages.jsr.insert( + match id { + LockfilePkgId::Jsr(nv) => nv.0, + LockfilePkgId::Npm(_) => unreachable!(), + }, + crate::JsrPackageInfo { + dependencies: package + .dependencies + .into_iter() + .map(|req| req.0) + .collect(), + }, ); } - } - } - - let mut packages = HashMap::new(); - for (nv, package) in &content.jsr { - packages.insert( - LockfileJsrNv(nv.clone()), - LockfileJsrGraphPackage { - reference_count: 0, - dependencies: package - .dependencies - .iter() - .map(|req| LockfileJsrReq(req.clone())) - .collect(), - }, - ); - } - - let mut visited = HashSet::new(); - let mut pending = root_packages.values().cloned().collect::>(); - while let Some(nv) = pending.pop_back() { - if let Some(package) = packages.get_mut(&nv) { - package.reference_count += 1; - if visited.insert(nv) { - for req in &package.dependencies { - if let Some(nv) = root_packages.get(req) { - pending.push_back(nv.clone()); - } - } - } - } - } - - Self { - root_packages, - packages, - } - } - - pub fn remove_root_packages<'a>( - &mut self, - package_reqs: impl Iterator, - ) { - let mut pending = VecDeque::new(); - for package_req in package_reqs { - eprintln!("REMOVING package req: {}", package_req); - if let Some(package_nv) = self - .root_packages - .remove(&LockfileJsrReq(package_req.to_string())) - { - pending.push_back(package_nv); - } - } - - while let Some(nv) = pending.pop_back() { - if let Some(package) = self.packages.get_mut(&nv) { - package.reference_count -= 1; - if package.reference_count == 0 { - for req in &package.dependencies { - if let Some(nv) = self.root_packages.get(req) { - pending.push_back(nv.clone()); - } - } - self.packages.remove(&nv); - if let Some((req, _)) = - self.root_packages.iter().find(|(_, pkg_nv)| **pkg_nv == nv) - { - self.root_packages.remove(&req.clone()); - } + LockfileGraphPackage::Npm(package) => { + packages.npm.insert( + match id { + LockfilePkgId::Jsr(_) => unreachable!(), + LockfilePkgId::Npm(id) => id.0, + }, + NpmPackageInfo { + integrity: package.integrity.clone(), + dependencies: package + .dependencies + .into_iter() + .map(|(name, id)| (name, id.0)) + .collect(), + }, + ); } } } } - - pub fn populate_packages(self, packages: &mut PackagesContent) { - for (req, nv) in self.root_packages { - eprintln!("ADDING: {:#?}", req.0); - packages - .specifiers - .insert(format!("jsr:{}", req.0), format!("jsr:{}", nv.0)); - } - for (nv, package) in self.packages { - eprintln!("ADDING: {}", nv.0); - packages.jsr.insert( - nv.0, - crate::JsrPackageInfo { - dependencies: package - .dependencies - .into_iter() - .map(|req| req.0) - .collect(), - }, - ); - } - } } diff --git a/src/lib.rs b/src/lib.rs index ae407f9..fdeab26 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,8 +20,7 @@ mod transforms; pub use error::LockfileError as Error; use thiserror::Error; -use crate::graphs::LockfileJsrGraph; -use crate::graphs::LockfileNpmGraph; +use crate::graphs::LockfilePackageGraph; pub struct NpmPackageLockfileInfo { pub display_id: String, @@ -278,10 +277,12 @@ impl Lockfile { json_string } - pub fn set_package_json_deps( + pub fn set_deps( &mut self, package_json_deps: Option>, + import_map_deps: Option>, ) { + let mut removed_deps = HashSet::new(); if let Some(new_package_json_deps) = package_json_deps { match &mut self.content.package_json { Some(current_package_json_deps) => { @@ -294,18 +295,14 @@ impl Lockfile { let new_package_json_deps = current_package_json_deps; // figure out the removed package.json deps - let removed_package_json_deps = old_package_json_deps - .iter() - .filter(|c| !new_package_json_deps.contains(*c)) - .map(|s| s.as_str()) - .collect::>(); - if !removed_package_json_deps.is_empty() { - // there exists some, so create a graph and remove them from the lockfile - self.remove_npm_deps(removed_package_json_deps.into_iter()); - } + removed_deps.extend( + old_package_json_deps + .iter() + .filter(|c| !new_package_json_deps.contains(*c)) + .map(|s| format!("npm:{}", s)), + ); self.has_content_changed = true; - eprintln!("RESULT: {}", self.as_json_string()); } } None => { @@ -316,26 +313,7 @@ impl Lockfile { // don't clear the package.json field because someone might // be running a one-off script without a package.json } - } - - fn remove_npm_deps<'a>( - &mut self, - package_reqs: impl Iterator, - ) { - let mut graph = LockfileNpmGraph::from_lockfile(&self.content.packages); - - graph.remove_root_packages(package_reqs); - // clear out the npm packages - self.content.packages.clear_npm(); - // now populate the graph back into the packages - graph.populate_packages(&mut self.content.packages); - } - - pub fn set_import_map_deps( - &mut self, - import_map_deps: Option>, - ) { if let Some(new_import_map_deps) = import_map_deps { match &mut self.content.import_map { Some(current_import_map_deps) => { @@ -345,31 +323,13 @@ impl Lockfile { let new_import_map_deps = current_import_map_deps; // figure out the removed import map deps - let mut removed_import_map_deps = old_import_map_deps - .iter() - .filter(|c| !new_import_map_deps.contains(*c)) - .peekable(); - if removed_import_map_deps.peek().is_some() { - // there exists some, so partition out to jsr and npm packages - let mut npm_packages = Vec::new(); - let mut jsr_packages = Vec::new(); - for req in removed_import_map_deps { - if let Some(req) = req.strip_prefix("jsr:") { - jsr_packages.push(req); - } else if let Some(req) = req.strip_prefix("npm:") { - npm_packages.push(req); - } - } - - if !npm_packages.is_empty() { - self.remove_npm_deps(npm_packages.into_iter()); - } - if !jsr_packages.is_empty() { - self.remove_jsr_deps(jsr_packages.into_iter()); - } - - self.has_content_changed = true; - } + removed_deps.extend( + old_import_map_deps + .into_iter() + .filter(|c| !new_import_map_deps.contains(c)), + ); + + self.has_content_changed = true; } } None => { @@ -384,20 +344,20 @@ impl Lockfile { // don't clear the import map field because someone might // be running a one-off script without an import map } - } - fn remove_jsr_deps<'a>( - &mut self, - package_reqs: impl Iterator, - ) { - let mut graph = LockfileJsrGraph::from_lockfile(&self.content.packages); - graph.remove_root_packages(package_reqs); + if !removed_deps.is_empty() { + let mut graph = + LockfilePackageGraph::from_lockfile(&self.content.packages); + graph.remove_root_packages(removed_deps.into_iter()); - // clear out the jsr packages - self.content.packages.clear_jsr(); + // clear out the packages + self.content.packages.specifiers.clear(); + self.content.packages.npm.clear(); + self.content.packages.jsr.clear(); - // now populate the graph back into the packages - graph.populate_packages(&mut self.content.packages); + // now populate the graph back into the packages + graph.populate_packages(&mut self.content.packages); + } } // Synchronize lock file to disk - noop if --lock-write file is not specified. From 5aea0b223638d7df9314dd8655fd61d1ccc5b1ba Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 17 Jan 2024 17:20:02 -0500 Subject: [PATCH 05/38] Support workspace --- src/graphs.rs | 81 +++++++++++++++++++------ src/lib.rs | 163 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 199 insertions(+), 45 deletions(-) diff --git a/src/graphs.rs b/src/graphs.rs index b3d6d76..7900e38 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -53,10 +53,14 @@ struct LockfileJsrGraphPackage { pub struct LockfilePackageGraph { root_packages: HashMap, packages: HashMap, + removed_jsr_packages: Vec, } impl LockfilePackageGraph { - pub fn from_lockfile(content: &PackagesContent) -> Self { + pub fn from_lockfile<'a>( + content: &PackagesContent, + old_config_file_packages: impl Iterator, + ) -> Self { let mut root_packages = HashMap::::with_capacity( content.specifiers.len(), @@ -108,7 +112,20 @@ impl LockfilePackageGraph { } let mut visited = HashSet::new(); - let mut pending = root_packages.values().cloned().collect::>(); + let mut pending = old_config_file_packages + .filter_map(|value| { + content.specifiers.get(value).and_then(|value| { + if let Some(value) = value.strip_prefix("npm:") { + Some(LockfilePkgId::Npm(LockfileNpmPackageId(value.to_string()))) + } else if let Some(value) = value.strip_prefix("jsr:") { + Some(LockfilePkgId::Jsr(LockfileJsrPkgNv(value.to_string()))) + } else { + None + } + }) + }) + .collect::>(); + eprintln!("PENDING: {:#?}", pending); while let Some(id) = pending.pop_back() { if let Some(package) = packages.get_mut(&id) { match package { @@ -137,6 +154,7 @@ impl LockfilePackageGraph { Self { root_packages, packages, + removed_jsr_packages: Default::default(), } } @@ -148,50 +166,57 @@ impl LockfilePackageGraph { let mut pending_reqs = package_reqs .map(|req| LockfilePkgReq(req.to_string())) .collect::>(); + let mut visited_root_packages = + HashSet::with_capacity(self.root_packages.len()); + visited_root_packages.extend(pending_reqs.iter().cloned()); while let Some(pending_req) = pending_reqs.pop_front() { eprintln!("REMOVING package req: {:#?}", pending_req); - if let Some(id) = self.root_packages.remove(&pending_req) { - if let LockfilePkgId::Npm(id) = &id { + if let Some(id) = self.root_packages.get(&pending_req) { + if let LockfilePkgId::Npm(id) = id { if let Some(first_part) = id.parts().next() { for (req, id) in &self.root_packages { if let LockfilePkgId::Npm(id) = &id { - if id.parts().any(|part| part == first_part) { - pending_reqs.push_back(req.clone()); + if id.parts().skip(1).any(|part| part == first_part) { + if visited_root_packages.insert(req.clone()) { + pending_reqs.push_back(req.clone()); + } } } } } } - pending.push_back(id); + pending.push_back(id.clone()); } } while let Some(id) = pending.pop_back() { + eprintln!("Looking at pending: {:?}", id); if let Some(package) = self.packages.get_mut(&id) { match package { LockfileGraphPackage::Jsr(package) => { - package.reference_count -= 1; - if package.reference_count == 0 { + eprintln!("Package: {:?} - Count: {}", id, package.reference_count); + if package.reference_count > 1 { + package.reference_count -= 1; + } else { + debug_assert_eq!(package.reference_count, 1, "Package: {:?}", id); for req in &package.dependencies { if let Some(id) = self.root_packages.get(req) { pending.push_back(id.clone()); } } - self.packages.remove(&id); - if let Some((req, _)) = - self.root_packages.iter().find(|(_, pkg_nv)| **pkg_nv == id) - { - self.root_packages.remove(&req.clone()); - } + self.remove_package(id); } } LockfileGraphPackage::Npm(package) => { - package.reference_count -= 1; - if package.reference_count == 0 { + eprintln!("Package: {:?} - Count: {}", id, package.reference_count); + if package.reference_count > 1 { + package.reference_count -= 1; + } else { + debug_assert_eq!(package.reference_count, 1, "Package: {:?}", id); for dep_id in package.dependencies.values() { pending.push_back(LockfilePkgId::Npm(dep_id.clone())); } - self.packages.remove(&id); + self.remove_package(id); } } } @@ -199,6 +224,14 @@ impl LockfilePackageGraph { } } + fn remove_package(&mut self, id: LockfilePkgId) { + self.packages.remove(&id); + self.root_packages.retain(|_, pkg_id| *pkg_id != id); + if let LockfilePkgId::Jsr(nv) = id { + self.removed_jsr_packages.push(nv); + } + } + pub fn populate_packages(self, packages: &mut PackagesContent) { for (req, id) in self.root_packages { packages.specifiers.insert( @@ -246,4 +279,16 @@ impl LockfilePackageGraph { } } } + + pub fn clear_remotes_for_removed_jsr_packages( + &self, + redirects: &mut BTreeMap, + ) { + for nv in &self.removed_jsr_packages { + // todo: should be parsed in deno's cli + let path = format!("@{}", nv.0[1..].replace("@", "/")); + let start = format!("https://jsr.io/{}/", path); + redirects.retain(|k, _| !k.starts_with(&start)); + } + } } diff --git a/src/lib.rs b/src/lib.rs index fdeab26..a278bc7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,8 +9,6 @@ use std::collections::HashSet; use std::io::Write; use std::path::PathBuf; -use deno_semver::jsr; -use indexmap::IndexMap; use ring::digest; use serde::Deserialize; use serde::Serialize; @@ -22,6 +20,18 @@ use thiserror::Error; use crate::graphs::LockfilePackageGraph; +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct WorkspaceConfig { + pub deps: Option>, + pub package_json_deps: Option>, + pub members: BTreeMap>, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct WorkspaceMemberConfig { + pub deps: BTreeSet, +} + pub struct NpmPackageLockfileInfo { pub display_id: String, pub serialized_id: String, @@ -114,9 +124,11 @@ pub struct PackagesContent { /// Mapping between resolved jsr specifiers and their associated info, eg. /// { - /// "@std/fs@1.0.0": { + /// "@oak/oak@12.6.3": { /// "dependencies": [ - /// "@std/fs@^1.0", + /// "jsr:@std/bytes@0.210", + /// // ...etc... + /// "npm:path-to-regexpr@6.2.1" /// ] /// } /// } @@ -147,6 +159,42 @@ impl PackagesContent { } } +#[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] +#[serde(rename_all = "camelCase")] +struct LockfilePackageJsonContent { + #[serde(default)] + deps: BTreeSet, +} + +#[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] +#[serde(rename_all = "camelCase")] +struct WorkspaceMemberConfigContent { + #[serde(default)] + deps: BTreeSet, +} + +#[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] +#[serde(rename_all = "camelCase")] +struct WorkspaceConfigContent { + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(default)] + deps: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(default)] + package_json: Option, + #[serde(skip_serializing_if = "BTreeMap::is_empty")] + #[serde(default)] + members: BTreeMap, +} + +impl WorkspaceConfigContent { + pub fn is_empty(&self) -> bool { + self.deps.is_none() + && self.package_json.is_none() + && self.members.is_empty() + } +} + #[derive(Debug, Clone, Serialize, Deserialize, Hash)] #[serde(rename_all = "camelCase")] pub struct LockfileContent { @@ -160,12 +208,9 @@ pub struct LockfileContent { pub redirects: BTreeMap, /// Mapping between URLs and their checksums for "http:" and "https:" deps remote: BTreeMap, - #[serde(skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "WorkspaceConfigContent::is_empty")] #[serde(default)] - pub import_map: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - #[serde(default)] - pub package_json: Option>, + workspaces: WorkspaceConfigContent, } impl LockfileContent { @@ -175,8 +220,7 @@ impl LockfileContent { packages: Default::default(), redirects: Default::default(), remote: BTreeMap::new(), - import_map: None, - package_json: None, + workspaces: Default::default(), } } } @@ -277,15 +321,31 @@ impl Lockfile { json_string } - pub fn set_deps( - &mut self, - package_json_deps: Option>, - import_map_deps: Option>, - ) { + pub fn update_workspace_config(&mut self, config: WorkspaceConfig) { + let old_deps = self + .content + .workspaces + .package_json + .as_ref() + .map(|s| s.deps.iter().map(|s| format!("npm:{}", s))) + .into_iter() + .flatten() + .chain( + self + .content + .workspaces + .deps + .as_ref() + .map(|s| s.iter().map(|s| s.to_string())) + .into_iter() + .flatten(), + ) + .collect::>(); let mut removed_deps = HashSet::new(); - if let Some(new_package_json_deps) = package_json_deps { - match &mut self.content.package_json { - Some(current_package_json_deps) => { + if let Some(new_package_json_deps) = config.package_json_deps { + match &mut self.content.workspaces.package_json { + Some(current_package_json) => { + let current_package_json_deps = &mut current_package_json.deps; if new_package_json_deps != *current_package_json_deps { // update self.content.package_json let old_package_json_deps = std::mem::replace( @@ -306,6 +366,11 @@ impl Lockfile { } } None => { + self.content.workspaces.package_json = + Some(LockfilePackageJsonContent { + deps: new_package_json_deps, + }); + self.has_content_changed = true; // todo(THIS PR): document how it would be nice to clear out the npm deps in this scenario } } @@ -314,8 +379,8 @@ impl Lockfile { // be running a one-off script without a package.json } - if let Some(new_import_map_deps) = import_map_deps { - match &mut self.content.import_map { + if let Some(new_import_map_deps) = config.deps { + match &mut self.content.workspaces.deps { Some(current_import_map_deps) => { if new_import_map_deps != *current_import_map_deps { let old_import_map_deps = @@ -334,20 +399,59 @@ impl Lockfile { } None => { // todo(THIS PR): document how it would be nice to clear out the npm deps in this scenario too - self.content.import_map = Some(new_import_map_deps); + self.content.workspaces.deps = Some(new_import_map_deps); // clear out all jsr related specifiers when adding an import map self.content.packages.clear_jsr(); self.has_content_changed = true; } } - } else { - // don't clear the import map field because someone might - // be running a one-off script without an import map + } + + if let Some(import_map_deps) = &self.content.workspaces.deps { + removed_deps.retain(|dep| !import_map_deps.contains(dep)); + } + + // now go through the workspaces + for (member_name, new_import_map_deps) in config.members { + match &mut self.content.workspaces.members.get_mut(&member_name) { + Some(member) => { + let current_import_map_deps = &mut member.deps; + if new_import_map_deps != *current_import_map_deps { + let old_import_map_deps = + std::mem::replace(current_import_map_deps, new_import_map_deps); + let new_import_map_deps = current_import_map_deps; + + // figure out the removed import map deps + removed_deps.extend( + old_import_map_deps + .into_iter() + .filter(|c| !new_import_map_deps.contains(c)), + ); + + self.has_content_changed = true; + } + } + None => { + self.content.workspaces.members.insert( + member_name, + WorkspaceMemberConfigContent { + deps: new_import_map_deps, + }, + ); + self.has_content_changed = true; + } + } + } + + for member in self.content.workspaces.members.values() { + removed_deps.retain(|dep| !member.deps.contains(dep)); } if !removed_deps.is_empty() { - let mut graph = - LockfilePackageGraph::from_lockfile(&self.content.packages); + let mut graph = LockfilePackageGraph::from_lockfile( + &self.content.packages, + old_deps.iter().map(|dep| dep.as_str()), + ); graph.remove_root_packages(removed_deps.into_iter()); // clear out the packages @@ -356,6 +460,7 @@ impl Lockfile { self.content.packages.jsr.clear(); // now populate the graph back into the packages + graph.clear_remotes_for_removed_jsr_packages(&mut self.content.remote); graph.populate_packages(&mut self.content.packages); } } @@ -504,6 +609,10 @@ impl Lockfile { } pub fn insert_redirect(&mut self, from: String, to: String) { + if from.starts_with("jsr:") { + return; + } + let maybe_prev = self.content.redirects.get(&from); if maybe_prev.is_none() || maybe_prev != Some(&to) { From 586dbc0af543a1fcc8673142fe3239a0ec72ee77 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 17 Jan 2024 18:27:13 -0500 Subject: [PATCH 06/38] Fixes for workspace support. --- src/graphs.rs | 1 - src/lib.rs | 31 +++++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/graphs.rs b/src/graphs.rs index 7900e38..d02d0fb 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -1,6 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use std::borrow::Cow; use std::collections::BTreeMap; use std::collections::BTreeSet; use std::collections::HashMap; diff --git a/src/lib.rs b/src/lib.rs index a278bc7..af26d71 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -142,14 +142,6 @@ impl PackagesContent { self.specifiers.is_empty() && self.npm.is_empty() } - fn clear_npm(&mut self) { - self.specifiers.retain(|k, v| { - let has_npm = k.starts_with("npm:") || v.starts_with("npm:"); - !has_npm - }); - self.npm.clear(); - } - fn clear_jsr(&mut self) { self.specifiers.retain(|k, v| { let has_npm = k.starts_with("jsr:") || v.starts_with("jsr:"); @@ -340,6 +332,14 @@ impl Lockfile { .into_iter() .flatten(), ) + .chain( + self + .content + .workspaces + .members + .values() + .flat_map(|m| m.deps.iter().map(|s| s.to_string())), + ) .collect::>(); let mut removed_deps = HashSet::new(); if let Some(new_package_json_deps) = config.package_json_deps { @@ -412,9 +412,17 @@ impl Lockfile { } // now go through the workspaces + let mut unhandled_members = self + .content + .workspaces + .members + .keys() + .cloned() + .collect::>(); for (member_name, new_import_map_deps) in config.members { match &mut self.content.workspaces.members.get_mut(&member_name) { Some(member) => { + unhandled_members.remove(&member_name); let current_import_map_deps = &mut member.deps; if new_import_map_deps != *current_import_map_deps { let old_import_map_deps = @@ -443,6 +451,13 @@ impl Lockfile { } } + for member in unhandled_members { + if let Some(member) = self.content.workspaces.members.remove(&member) { + removed_deps.extend(member.deps.into_iter()); + self.has_content_changed = true; + } + } + for member in self.content.workspaces.members.values() { removed_deps.retain(|dep| !member.deps.contains(dep)); } From 52b5635aaa55e8ddd149803ba343a714f1f8d52f Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 16:07:05 -0500 Subject: [PATCH 07/38] Pass in nv -> jsr ulr. Improve each member to also possibly have a package.json, just in case --- Cargo.lock | 4 +- src/graphs.rs | 20 ++-- src/lib.rs | 278 +++++++++++++++++++++++++------------------------- 3 files changed, 148 insertions(+), 154 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de3b283..8242f62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,9 +115,9 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "monch" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4519a88847ba2d5ead3dc53f1060ec6a571de93f325d9c5c4968147382b1cbc3" +checksum = "b52c1b33ff98142aecea13138bd399b68aa7ab5d9546c300988c345004001eea" [[package]] name = "once_cell" diff --git a/src/graphs.rs b/src/graphs.rs index d02d0fb..9da3ce8 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -32,7 +32,6 @@ impl LockfileNpmPackageId { #[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] struct LockfilePkgReq(String); -// TODO(THIS PR): REFERENCE_COUNT SHOULD INCLUDE THE ROOT PACKAGES REFERENCING IT enum LockfileGraphPackage { Jsr(LockfileJsrGraphPackage), Npm(LockfileNpmGraphPackage), @@ -124,7 +123,6 @@ impl LockfilePackageGraph { }) }) .collect::>(); - eprintln!("PENDING: {:#?}", pending); while let Some(id) = pending.pop_back() { if let Some(package) = packages.get_mut(&id) { match package { @@ -169,7 +167,6 @@ impl LockfilePackageGraph { HashSet::with_capacity(self.root_packages.len()); visited_root_packages.extend(pending_reqs.iter().cloned()); while let Some(pending_req) = pending_reqs.pop_front() { - eprintln!("REMOVING package req: {:#?}", pending_req); if let Some(id) = self.root_packages.get(&pending_req) { if let LockfilePkgId::Npm(id) = id { if let Some(first_part) = id.parts().next() { @@ -189,11 +186,9 @@ impl LockfilePackageGraph { } while let Some(id) = pending.pop_back() { - eprintln!("Looking at pending: {:?}", id); if let Some(package) = self.packages.get_mut(&id) { match package { LockfileGraphPackage::Jsr(package) => { - eprintln!("Package: {:?} - Count: {}", id, package.reference_count); if package.reference_count > 1 { package.reference_count -= 1; } else { @@ -207,7 +202,6 @@ impl LockfilePackageGraph { } } LockfileGraphPackage::Npm(package) => { - eprintln!("Package: {:?} - Count: {}", id, package.reference_count); if package.reference_count > 1 { package.reference_count -= 1; } else { @@ -242,7 +236,6 @@ impl LockfilePackageGraph { ); } for (id, package) in self.packages { - eprintln!("ADDING: {:#?}", id); match package { LockfileGraphPackage::Jsr(package) => { packages.jsr.insert( @@ -282,12 +275,17 @@ impl LockfilePackageGraph { pub fn clear_remotes_for_removed_jsr_packages( &self, redirects: &mut BTreeMap, + nv_to_jsr_url: impl Fn(&str) -> Option, ) { for nv in &self.removed_jsr_packages { - // todo: should be parsed in deno's cli - let path = format!("@{}", nv.0[1..].replace("@", "/")); - let start = format!("https://jsr.io/{}/", path); - redirects.retain(|k, _| !k.starts_with(&start)); + if let Some(url) = nv_to_jsr_url(&nv.0) { + debug_assert!( + url.ends_with("/"), + "JSR URL should end with slash: {}", + url + ); + redirects.retain(|k, _| !k.starts_with(&url)); + } } } } diff --git a/src/lib.rs b/src/lib.rs index af26d71..e719a0c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,16 +20,24 @@ use thiserror::Error; use crate::graphs::LockfilePackageGraph; +pub struct SetWorkspaceConfigOptions Option> { + pub config: WorkspaceConfig, + /// Gives a name and version from JSR (ex. `@scope/package@1.0.0`) + /// and expects a URL to the JSR package. This will then be used to + /// remove items from the "remotes" for removed packages. + pub nv_to_jsr_url: F, +} + #[derive(Debug, Clone, PartialEq, Eq)] pub struct WorkspaceConfig { - pub deps: Option>, - pub package_json_deps: Option>, - pub members: BTreeMap>, + pub root: WorkspaceMemberConfig, + pub members: BTreeMap, } #[derive(Debug, Clone, PartialEq, Eq)] pub struct WorkspaceMemberConfig { - pub deps: BTreeSet, + pub deps: Option>, + pub package_json_deps: Option>, } pub struct NpmPackageLockfileInfo { @@ -162,18 +170,33 @@ struct LockfilePackageJsonContent { #[serde(rename_all = "camelCase")] struct WorkspaceMemberConfigContent { #[serde(default)] - deps: BTreeSet, + deps: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(default)] + package_json: Option, +} + +impl WorkspaceMemberConfigContent { + pub fn is_empty(&self) -> bool { + self.deps.is_none() && self.package_json.is_none() + } + + pub fn dep_reqs(&self) -> impl Iterator { + self + .package_json + .as_ref() + .map(|s| s.deps.iter()) + .into_iter() + .chain(self.deps.as_ref().map(|s| s.iter()).into_iter()) + .flatten() + } } #[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] #[serde(rename_all = "camelCase")] struct WorkspaceConfigContent { - #[serde(skip_serializing_if = "Option::is_none")] - #[serde(default)] - deps: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - #[serde(default)] - package_json: Option, + #[serde(default, flatten)] + root: WorkspaceMemberConfigContent, #[serde(skip_serializing_if = "BTreeMap::is_empty")] #[serde(default)] members: BTreeMap, @@ -181,9 +204,14 @@ struct WorkspaceConfigContent { impl WorkspaceConfigContent { pub fn is_empty(&self) -> bool { - self.deps.is_none() - && self.package_json.is_none() - && self.members.is_empty() + self.root.is_empty() && self.members.is_empty() + } + + fn get_all_dep_reqs(&self) -> impl Iterator { + self + .root + .dep_reqs() + .chain(self.members.values().flat_map(|m| m.dep_reqs())) } } @@ -267,7 +295,6 @@ impl Lockfile { content: &str, overwrite: bool, ) -> Result { - eprintln!("NEW LOCKFILE: {} {}", filename.display(), overwrite); // Writing a lock file always uses the new format. if overwrite { return Ok(Lockfile { @@ -295,8 +322,7 @@ impl Lockfile { }; let content = serde_json::from_value::(value.into()) .map_err(|err| { - eprintln!("ERROR: {:#}", err); - Error::ParseError(filename.display().to_string()) + Error::ParseError(format!("{}: {:#}", filename.display(), err)) })?; Ok(Lockfile { @@ -313,104 +339,88 @@ impl Lockfile { json_string } - pub fn update_workspace_config(&mut self, config: WorkspaceConfig) { - let old_deps = self - .content - .workspaces - .package_json - .as_ref() - .map(|s| s.deps.iter().map(|s| format!("npm:{}", s))) - .into_iter() - .flatten() - .chain( - self - .content - .workspaces - .deps - .as_ref() - .map(|s| s.iter().map(|s| s.to_string())) - .into_iter() - .flatten(), - ) - .chain( - self - .content - .workspaces - .members - .values() - .flat_map(|m| m.deps.iter().map(|s| s.to_string())), - ) - .collect::>(); - let mut removed_deps = HashSet::new(); - if let Some(new_package_json_deps) = config.package_json_deps { - match &mut self.content.workspaces.package_json { - Some(current_package_json) => { - let current_package_json_deps = &mut current_package_json.deps; - if new_package_json_deps != *current_package_json_deps { - // update self.content.package_json - let old_package_json_deps = std::mem::replace( - current_package_json_deps, - new_package_json_deps, - ); - let new_package_json_deps = current_package_json_deps; - - // figure out the removed package.json deps - removed_deps.extend( - old_package_json_deps - .iter() - .filter(|c| !new_package_json_deps.contains(*c)) - .map(|s| format!("npm:{}", s)), - ); - - self.has_content_changed = true; + pub fn set_workspace_config Option>( + &mut self, + options: SetWorkspaceConfigOptions, + ) { + fn update_workspace_member( + has_content_changed: &mut bool, + removed_deps: &mut HashSet, + current: &mut WorkspaceMemberConfigContent, + new: WorkspaceMemberConfig, + ) { + if let Some(new_deps) = new.deps { + match &mut current.deps { + Some(current_deps) => { + if new_deps != *current_deps { + let old_deps = std::mem::replace(current_deps, new_deps); + + removed_deps.extend(old_deps); + + *has_content_changed = true; + } + } + None => { + current.deps = Some(new_deps); + *has_content_changed = true; } } - None => { - self.content.workspaces.package_json = - Some(LockfilePackageJsonContent { + } else { + // don't clear the deps because someone might be running + // a one-off script without a deno.json + } + if let Some(new_package_json_deps) = new.package_json_deps { + match &mut current.package_json { + Some(current_package_json) => { + let current_package_json_deps = &mut current_package_json.deps; + if new_package_json_deps != *current_package_json_deps { + // update self.content.package_json + let old_package_json_deps = std::mem::replace( + current_package_json_deps, + new_package_json_deps, + ); + + removed_deps.extend(old_package_json_deps); + + *has_content_changed = true; + } + } + None => { + current.package_json = Some(LockfilePackageJsonContent { deps: new_package_json_deps, }); - self.has_content_changed = true; - // todo(THIS PR): document how it would be nice to clear out the npm deps in this scenario - } - } - } else { - // don't clear the package.json field because someone might - // be running a one-off script without a package.json - } - - if let Some(new_import_map_deps) = config.deps { - match &mut self.content.workspaces.deps { - Some(current_import_map_deps) => { - if new_import_map_deps != *current_import_map_deps { - let old_import_map_deps = - std::mem::replace(current_import_map_deps, new_import_map_deps); - let new_import_map_deps = current_import_map_deps; - - // figure out the removed import map deps - removed_deps.extend( - old_import_map_deps - .into_iter() - .filter(|c| !new_import_map_deps.contains(c)), - ); - - self.has_content_changed = true; + *has_content_changed = true; } } - None => { - // todo(THIS PR): document how it would be nice to clear out the npm deps in this scenario too - self.content.workspaces.deps = Some(new_import_map_deps); - // clear out all jsr related specifiers when adding an import map - self.content.packages.clear_jsr(); - self.has_content_changed = true; - } + } else { + // don't clear the package.json field because someone might + // be running a one-off script without a package.json } } - if let Some(import_map_deps) = &self.content.workspaces.deps { - removed_deps.retain(|dep| !import_map_deps.contains(dep)); + let old_deps = self + .content + .workspaces + .get_all_dep_reqs() + .map(|s| s.to_string()) + .collect::>(); + let mut removed_deps = HashSet::new(); + + // clear out any jsr packages when someone adds an import map + if self.content.workspaces.root.deps.is_none() + && options.config.root.deps.is_some() + { + self.content.packages.clear_jsr() } + // set the root + update_workspace_member( + &mut self.has_content_changed, + &mut removed_deps, + &mut self.content.workspaces.root, + options.config.root, + ); + // now go through the workspaces let mut unhandled_members = self .content @@ -419,47 +429,32 @@ impl Lockfile { .keys() .cloned() .collect::>(); - for (member_name, new_import_map_deps) in config.members { - match &mut self.content.workspaces.members.get_mut(&member_name) { - Some(member) => { - unhandled_members.remove(&member_name); - let current_import_map_deps = &mut member.deps; - if new_import_map_deps != *current_import_map_deps { - let old_import_map_deps = - std::mem::replace(current_import_map_deps, new_import_map_deps); - let new_import_map_deps = current_import_map_deps; - - // figure out the removed import map deps - removed_deps.extend( - old_import_map_deps - .into_iter() - .filter(|c| !new_import_map_deps.contains(c)), - ); - - self.has_content_changed = true; - } - } - None => { - self.content.workspaces.members.insert( - member_name, - WorkspaceMemberConfigContent { - deps: new_import_map_deps, - }, - ); - self.has_content_changed = true; - } - } + for (member_name, new_member) in options.config.members { + unhandled_members.remove(&member_name); + let current_member = self + .content + .workspaces + .members + .entry(member_name) + .or_default(); + update_workspace_member( + &mut self.has_content_changed, + &mut removed_deps, + current_member, + new_member, + ); } for member in unhandled_members { if let Some(member) = self.content.workspaces.members.remove(&member) { - removed_deps.extend(member.deps.into_iter()); + removed_deps.extend(member.dep_reqs().cloned()); self.has_content_changed = true; } } - for member in self.content.workspaces.members.values() { - removed_deps.retain(|dep| !member.deps.contains(dep)); + // update the removed deps to keep what's still found in the workspace + for dep in self.content.workspaces.get_all_dep_reqs() { + removed_deps.remove(dep); } if !removed_deps.is_empty() { @@ -470,12 +465,13 @@ impl Lockfile { graph.remove_root_packages(removed_deps.into_iter()); // clear out the packages - self.content.packages.specifiers.clear(); - self.content.packages.npm.clear(); - self.content.packages.jsr.clear(); + self.content.packages = Default::default(); // now populate the graph back into the packages - graph.clear_remotes_for_removed_jsr_packages(&mut self.content.remote); + graph.clear_remotes_for_removed_jsr_packages( + &mut self.content.remote, + options.nv_to_jsr_url, + ); graph.populate_packages(&mut self.content.packages); } } From a094544686bce22587f0041ac9423a482c8548c4 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 16:57:17 -0500 Subject: [PATCH 08/38] Setup testing infra for this feature. --- src/graphs.rs | 17 +- src/lib.rs | 26 +- tests/helpers/mod.rs | 104 ++++++ tests/integration_test.rs | 46 +++ tests/specs/config_changes/RemovingDep.txt | 385 +++++++++++++++++++++ 5 files changed, 558 insertions(+), 20 deletions(-) create mode 100644 tests/helpers/mod.rs create mode 100644 tests/integration_test.rs create mode 100644 tests/specs/config_changes/RemovingDep.txt diff --git a/src/graphs.rs b/src/graphs.rs index 9da3ce8..d49b9c8 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -25,7 +25,7 @@ impl LockfileNpmPackageId { pub fn parts(&self) -> impl Iterator { let package_id = &self.0; let package_id = package_id.strip_prefix("npm:").unwrap_or(package_id); - package_id.split("_").filter(|s| !s.is_empty()) + package_id.split('_').filter(|s| !s.is_empty()) } } @@ -48,6 +48,8 @@ struct LockfileJsrGraphPackage { dependencies: BTreeSet, } +/// Graph used to analyze a lockfile to determine which packages +/// and remotes can be removed based on config file changes. pub struct LockfilePackageGraph { root_packages: HashMap, packages: HashMap, @@ -113,6 +115,7 @@ impl LockfilePackageGraph { let mut pending = old_config_file_packages .filter_map(|value| { content.specifiers.get(value).and_then(|value| { + #[allow(clippy::manual_map)] // not easier to read if let Some(value) = value.strip_prefix("npm:") { Some(LockfilePkgId::Npm(LockfileNpmPackageId(value.to_string()))) } else if let Some(value) = value.strip_prefix("jsr:") { @@ -155,14 +158,13 @@ impl LockfilePackageGraph { } } - pub fn remove_root_packages<'a>( + pub fn remove_root_packages( &mut self, package_reqs: impl Iterator, ) { let mut pending = VecDeque::new(); - let mut pending_reqs = package_reqs - .map(|req| LockfilePkgReq(req.to_string())) - .collect::>(); + let mut pending_reqs = + package_reqs.map(LockfilePkgReq).collect::>(); let mut visited_root_packages = HashSet::with_capacity(self.root_packages.len()); visited_root_packages.extend(pending_reqs.iter().cloned()); @@ -173,7 +175,8 @@ impl LockfilePackageGraph { for (req, id) in &self.root_packages { if let LockfilePkgId::Npm(id) = &id { if id.parts().skip(1).any(|part| part == first_part) { - if visited_root_packages.insert(req.clone()) { + let has_visited = visited_root_packages.insert(req.clone()); + if has_visited { pending_reqs.push_back(req.clone()); } } @@ -280,7 +283,7 @@ impl LockfilePackageGraph { for nv in &self.removed_jsr_packages { if let Some(url) = nv_to_jsr_url(&nv.0) { debug_assert!( - url.ends_with("/"), + url.ends_with('/'), "JSR URL should end with slash: {}", url ); diff --git a/src/lib.rs b/src/lib.rs index e719a0c..2577484 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,13 +28,13 @@ pub struct SetWorkspaceConfigOptions Option> { pub nv_to_jsr_url: F, } -#[derive(Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WorkspaceConfig { pub root: WorkspaceMemberConfig, pub members: BTreeMap, } -#[derive(Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WorkspaceMemberConfig { pub deps: Option>, pub package_json_deps: Option>, @@ -187,7 +187,7 @@ impl WorkspaceMemberConfigContent { .as_ref() .map(|s| s.deps.iter()) .into_iter() - .chain(self.deps.as_ref().map(|s| s.iter()).into_iter()) + .chain(self.deps.as_ref().map(|s| s.iter())) .flatten() } } @@ -964,14 +964,14 @@ mod tests { } #[test] - fn test_insert_deno() { + fn test_insert_jsr() { let mut lockfile = Lockfile::with_lockfile_content( PathBuf::from("/foo/deno.lock"), r#"{ "version": "3", "packages": { "specifiers": { - "deno:path": "deno:@std/path@0.75.0" + "jsr:path": "jsr:@std/path@0.75.0" } }, "remote": {} @@ -980,18 +980,18 @@ mod tests { ) .unwrap(); lockfile.insert_package_specifier( - "deno:path".to_string(), - "deno:@std/path@0.75.0".to_string(), + "jsr:path".to_string(), + "jsr:@std/path@0.75.0".to_string(), ); assert!(!lockfile.has_content_changed); lockfile.insert_package_specifier( - "deno:path".to_string(), - "deno:@std/path@0.75.1".to_string(), + "jsr:path".to_string(), + "jsr:@std/path@0.75.1".to_string(), ); assert!(lockfile.has_content_changed); lockfile.insert_package_specifier( - "deno:@foo/bar@^2".to_string(), - "deno:@foo/bar@2.1.2".to_string(), + "jsr:@foo/bar@^2".to_string(), + "jsr:@foo/bar@2.1.2".to_string(), ); assert_eq!( lockfile.as_json_string(), @@ -999,8 +999,8 @@ mod tests { "version": "3", "packages": { "specifiers": { - "deno:@foo/bar@^2": "deno:@foo/bar@2.1.2", - "deno:path": "deno:@std/path@0.75.1" + "jsr:@foo/bar@^2": "jsr:@foo/bar@2.1.2", + "jsr:path": "jsr:@std/path@0.75.1" } }, "remote": {} diff --git a/tests/helpers/mod.rs b/tests/helpers/mod.rs new file mode 100644 index 0000000..46d4f79 --- /dev/null +++ b/tests/helpers/mod.rs @@ -0,0 +1,104 @@ +use std::iter::Peekable; +use std::path::Path; +use std::path::PathBuf; + +pub struct ConfigChangeSpec { + pub path: PathBuf, + pub original_text: SpecFile, + pub change: SpecFile, + pub output: SpecFile, +} + +impl ConfigChangeSpec { + pub fn collect_in_dir(dir_path: &Path) -> Vec { + collect_files_in_dir_recursive(dir_path) + .into_iter() + .map(|file| ConfigChangeSpec::parse(file.path.clone(), &file.text)) + .collect() + } + + fn parse(path: PathBuf, text: &str) -> Self { + fn take_next<'a>( + lines: &mut Peekable>, + ) -> String { + let mut result = String::new(); + while let Some(line) = lines.next() { + result.push_str(line); + result.push_str("\n"); + if let Some(next_line) = lines.peek() { + if next_line.starts_with('#') { + break; + } + } + } + result + } + + let mut lines = text.split('\n').peekable(); + let original_text = SpecFile { + title: lines.next().unwrap().to_string(), + text: take_next(&mut lines), + }; + let change = SpecFile { + title: lines.next().unwrap().to_string(), + text: take_next(&mut lines), + }; + let output = SpecFile { + title: lines.next().unwrap().to_string(), + text: take_next(&mut lines), + }; + assert!(lines.next().is_none()); + Self { + path, + original_text, + change, + output, + } + } + + pub fn emit(&self) -> String { + let mut text = String::new(); + text.push_str(&self.original_text.emit()); + text.push_str("\n"); + text.push_str(&self.change.emit()); + text.push_str("\n"); + text.push_str(&self.output.emit()); + text.push_str("\n"); + text + } +} + +pub struct SpecFile { + pub title: String, + pub text: String, +} + +impl SpecFile { + pub fn emit(&self) -> String { + format!("# {}\n{}\n", self.title, self.text) + } +} + +struct CollectedFile { + pub path: PathBuf, + pub text: String, +} + +fn collect_files_in_dir_recursive(path: &Path) -> Vec { + let mut result = Vec::new(); + + for entry in path.read_dir().unwrap().flatten() { + let entry_path = entry.path(); + if entry_path.is_file() { + let text = std::fs::read_to_string(&entry_path).unwrap(); + result.push(CollectedFile { + path: entry_path, + text, + }); + } else { + result.extend(collect_files_in_dir_recursive(&entry_path)); + } + } + + result +} diff --git a/tests/integration_test.rs b/tests/integration_test.rs new file mode 100644 index 0000000..0ff6e88 --- /dev/null +++ b/tests/integration_test.rs @@ -0,0 +1,46 @@ +use deno_lockfile::Lockfile; +use deno_lockfile::SetWorkspaceConfigOptions; +use std::path::PathBuf; + +use helpers::ConfigChangeSpec; + +mod helpers; + +fn nv_to_jsr_url(nv: &str) -> Option { + // very hacky, but good enough for tests + let path = format!("@{}", nv[1..].replace("@", "/")); + Some(format!("https://jsr.io/{}/", path)) +} + +#[test] +fn config_changes() { + let specs = ConfigChangeSpec::collect_in_dir(&PathBuf::from( + "./tests/specs/config_changes", + )); + for mut spec in specs { + eprintln!("Looking at {}...", spec.path.display()); + let mut config_file = Lockfile::with_lockfile_content( + spec.path.with_extension(".lock"), + &spec.original_text.text, + false, + ) + .unwrap(); + config_file.set_workspace_config(SetWorkspaceConfigOptions { + config: serde_json::from_str(&spec.change.text).unwrap(), + nv_to_jsr_url, + }); + let expected_text = spec.output.text.clone(); + let actual_text = config_file.as_json_string(); + if std::env::var("UPDATE") == Ok("1".to_string()) { + spec.output.text = actual_text; + std::fs::write(&spec.path, spec.emit()).unwrap(); + } else { + assert_eq!( + actual_text, + expected_text, + "Failed for: {}", + spec.path.display() + ); + } + } +} diff --git a/tests/specs/config_changes/RemovingDep.txt b/tests/specs/config_changes/RemovingDep.txt new file mode 100644 index 0000000..32b1959 --- /dev/null +++ b/tests/specs/config_changes/RemovingDep.txt @@ -0,0 +1,385 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@dsherret/dax": "jsr:@dsherret/dax@0.0.1", + "jsr:@dsherret/which@0.0.1": "jsr:@dsherret/which@0.0.1", + "jsr:@oak/commons@0.4": "jsr:@oak/commons@0.4.0", + "jsr:@oak/oak": "jsr:@oak/oak@12.6.3", + "jsr:@std/assert@0.210": "jsr:@std/assert@0.210.0", + "jsr:@std/assert@^0.210.0": "jsr:@std/assert@0.210.0", + "jsr:@std/bytes@0.210": "jsr:@std/bytes@0.210.0", + "jsr:@std/bytes@^0.210.0": "jsr:@std/bytes@0.210.0", + "jsr:@std/crypto@0.210": "jsr:@std/crypto@0.210.0", + "jsr:@std/encoding@0.210": "jsr:@std/encoding@0.210.0", + "jsr:@std/encoding@^0.210.0": "jsr:@std/encoding@0.210.0", + "jsr:@std/fmt@0.210.0": "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0": "jsr:@std/fs@0.210.0", + "jsr:@std/http@0.210": "jsr:@std/http@0.210.0", + "jsr:@std/io@0.210": "jsr:@std/io@0.210.0", + "jsr:@std/io@0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/io@^0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/media_types@0.210": "jsr:@std/media_types@0.210.0", + "jsr:@std/path@0.210": "jsr:@std/path@0.210.0", + "jsr:@std/path@0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/path@^0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210": "jsr:@std/streams@0.210.0", + "jsr:@std/streams@0.210.0": "jsr:@std/streams@0.210.0", + "npm:path-to-regexp@6.2.1": "npm:path-to-regexp@6.2.1" + }, + "npm": { + "path-to-regexp@6.2.1": { + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", + "dependencies": {} + } + }, + "jsr": { + "@dsherret/dax@0.0.1": { + "dependencies": [ + "jsr:@dsherret/which@0.0.1", + "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0", + "jsr:@std/io@0.210.0", + "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210.0" + ] + }, + "@dsherret/which@0.0.1": { + "dependencies": [] + }, + "@oak/commons@0.4.0": { + "dependencies": [ + "jsr:@std/assert@0.210" + ] + }, + "@oak/oak@12.6.3": { + "dependencies": [ + "jsr:@oak/commons@0.4", + "jsr:@std/bytes@0.210", + "jsr:@std/crypto@0.210", + "jsr:@std/encoding@0.210", + "jsr:@std/http@0.210", + "jsr:@std/io@0.210", + "jsr:@std/media_types@0.210", + "jsr:@std/path@0.210", + "jsr:@std/streams@0.210", + "npm:path-to-regexp@6.2.1" + ] + }, + "@std/assert@0.210.0": { + "dependencies": [] + }, + "@std/bytes@0.210.0": { + "dependencies": [] + }, + "@std/crypto@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/encoding@^0.210.0" + ] + }, + "@std/encoding@0.210.0": { + "dependencies": [] + }, + "@std/fmt@0.210.0": { + "dependencies": [] + }, + "@std/fs@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/path@^0.210.0" + ] + }, + "@std/http@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/encoding@^0.210.0" + ] + }, + "@std/io@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0" + ] + }, + "@std/media_types@0.210.0": { + "dependencies": [] + }, + "@std/path@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0" + ] + }, + "@std/streams@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0", + "jsr:@std/io@^0.210.0" + ] + } + } + }, + "remote": { + "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@dsherret/dax/0.0.1/src/command.ts": "e5dc7e3af38240657b4b9dc106b044c9c75bf16385c8f8af1c795ca89e27c3bc", + "https://jsr.io/@dsherret/dax/0.0.1/src/command_handler.ts": "56ee6893bf5ec829c370fe5a9367f60b3590e571f7b69153d48686779ab14d98", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/args.ts": "a138aef24294e3cbf13cef08f4836d018e8dd99fd06ad82e7e7f08ef680bbc1d", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cat.ts": "984035bd43b62c12764bcf321d84ce4bbe271aedaac48d251c8db080022d5cbf", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cd.ts": "82e85b573dd3006eefc20d1849ca638e461946688749e9a4ea53ab07c03ef7e4", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cp_mv.ts": "aa09e3ab95c5eaae1186ad9a84d94977e19f4fa3c3fd5ab6a45b0b009600aae6", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/echo.ts": "a4f86022ad4eb5b8e8326e45fd2f571f6bd5e3c842f0c10e0be69f35b0d78180", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/exit.ts": "86b181d0f1e7723b265ec7a8858a43f5cac56cd485375524b4d8f022c5632419", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/export.ts": "1d5012c6b991e3c1112cc5841520e1ae651a20a0fd6c2e8014c79eba571755be", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/mkdir.ts": "620ecc4d690b342ecea9e9849303a4f8e2f65b430b70be846c1de766c9b5bbe7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/printenv.ts": "1efa36e21c6039da424c99753d748a486c3a7621507ca9d8d319e2a6e3e259ac", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/pwd.ts": "d89fac9ca37afe54967acd24744c3255aacc63f51697c27fe8d2e90a9049088f", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/rm.ts": "9c3b200c154c4a3c7e3b9ab9204daaad62b961453e9a8c8fc9a0451953e59f75", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/sleep.ts": "50b162accce6b8f20180f13d01613a6da6d88920d8322ac46ff7a2bbd6fcfbd7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/test.ts": "d4a72076e652b3be65eaec9ff26eb342f5293140a82fa6bc357fa77b895ec3ab", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/touch.ts": "8386148784f92455502f09880306bc859ab61540c80fe0de0686b323662ee1fb", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/unset.ts": "dbebdad7e6e301ee621161a13669ab4164025aee5b323658ab283dab64b9eebf", + "https://jsr.io/@dsherret/dax/0.0.1/src/common.ts": "7295d13ab0023bb09d4c97e3a131cedada6294a33474f136b652a145330c8e3e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/confirm.ts": "ffcc76ebf10c8bfde6e4072b70b271e0453170ab0bd0bb795bc4e52a1237062e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/logger.ts": "e0ab5025915cef70df03681c756e211f25bb2e4331f82ed4256b17ddd9e794ea", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/mod.ts": "de8af7d646f6cb222eee6560171993690247941b13ed9d757789d16f019d73ee", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/multiSelect.ts": "50ff5de156028ff21025917b4c797c877037bf1460974b0f72b6ab0907d0a3d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/format.ts": "15ddbb8051580f88ed499281e12ca6f881f875ab73268d7451d7113ee130bd7d", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/interval.ts": "82bd91b9f8219c8d03b7aad51e7425f3276d96615b32826693dffd5905d663d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/mod.ts": "5ae6cf88fe8caaa5c8218511c9458944201da5fbc9749b200d9e1227c93b3b9e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/prompt.ts": "91c8d03fe2179438629491e71a6bdf0b6ca5bd31cbcc29ac7a2529daefe24d94", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/select.ts": "6b96555d7a13acd6e864a874e5687044932cf2412a45dc2811613cb2f00900ca", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/utils.ts": "4e4f8cf5e435345e4ad94523544dc112e25969a12bdd05fb8073729e078cf47a", + "https://jsr.io/@dsherret/dax/0.0.1/src/deps.ts": "8e1acae3e51645f52fda44ffa528e3c346f00b37afc4bba1c2c90433d551bccb", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/mod.ts": "c992db99c8259ae3bf2d35666585dfefda84cf7cf4e624e42ea2ac7367900fe0", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/rs_lib.generated.js": "932a69348ce575e4a5c2398c896e9cd06cf287f6c18fb25dfdf23badca1c9f54", + "https://jsr.io/@dsherret/dax/0.0.1/src/path.ts": "365ed563f1a7421c20b094f5e56ca1f1ae9608b2a568b7ad394a63bdeabc1313", + "https://jsr.io/@dsherret/dax/0.0.1/src/pipes.ts": "850243b55f40eaad1f0020455c63905a0a41f543c2b7031d38188051398692d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/request.ts": "9856b955ac1a0831a4998b23ba7be2f5e74ab3fd17230bc28476781c9f0f20d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/result.ts": "0908b69c16b25c3b258f6b2ada12e124686df5f7ea2b98daa27a83973c7b118c", + "https://jsr.io/@dsherret/dax/0.0.1/src/shell.ts": "e18dcdccd5edf8ad8cd56b1e58a2b4f094eb969f3499303adde66ee71d231770", + "https://jsr.io/@dsherret/dax/0.0.1/src/vendor/outdent.ts": "d2f45f327f06ac8607a8fb6f6c428f25f8bb03673d07795541cf880e5f5c38e2", + "https://jsr.io/@dsherret/which/0.0.1/mod.ts": "cca0ebcff4f6c9088f7b9d7e5859b3561f0701b83a83b739000bfebb34eaebb5", + "https://jsr.io/@oak/commons/0.4.0/deps.ts": "468549378f3ee4d2c96b66e2913b2029ac0a5a41c7dbd6f41d0b77c4131f46d0", + "https://jsr.io/@oak/commons/0.4.0/http_errors.ts": "e540c727b765af754bfbe3c041f332c288d3682bad1ba27971ce216e139b8cc9", + "https://jsr.io/@oak/commons/0.4.0/method.ts": "819862202d471682773ac6a573dc47553acdae865121adb54a71eee1c9389771", + "https://jsr.io/@oak/commons/0.4.0/server_sent_event.ts": "417937cc14754a632bbbce02f58dad539bb7a99015dc183e19d689887bce667b", + "https://jsr.io/@oak/commons/0.4.0/status.ts": "f13e0e61c2aaf5e254ca528569b03896aee89d96ebc256fa740ea7305a68f53f", + "https://jsr.io/@oak/oak/12.6.3/application.ts": "38f3346ff817d70f368352e9ef0f9f2bf58635c528a44f6f31cdc26ca37b3e28", + "https://jsr.io/@oak/oak/12.6.3/body.ts": "1899761b97fc9d776f3710b2637fb047ba29b968609afc6c0e5219b1108e703c", + "https://jsr.io/@oak/oak/12.6.3/buf_reader.ts": "26640736541598dbd9f2b84a9d0595756afff03c9ca55b66eef1911f7798b56d", + "https://jsr.io/@oak/oak/12.6.3/content_disposition.ts": "8b8c3cb2fba7138cd5b7f82fc3b5ea39b33db924a824b28261659db7e164621e", + "https://jsr.io/@oak/oak/12.6.3/context.ts": "043dc433504cc69a1b596a31ff8063d1647883ff5cf604a73e19a24324137442", + "https://jsr.io/@oak/oak/12.6.3/deps.ts": "2a872896c9ff15627a41d380992897d7e19686786957b75086f47a3ce6ccb1ee", + "https://jsr.io/@oak/oak/12.6.3/etag.ts": "32e47726b41698aefdd71faac5aaf2907c9bdd41ef18a7693863be4f8fee115d", + "https://jsr.io/@oak/oak/12.6.3/forwarded.ts": "e656f96a85574e2a6ee54dc35efc9f72d543c9ae0923760ef426ee7369eef01c", + "https://jsr.io/@oak/oak/12.6.3/headers.ts": "769fd042d34fbcd5667cbd745b5c65d335cc8430e822dbf1f87d65313cab4b47", + "https://jsr.io/@oak/oak/12.6.3/helpers.ts": "6b03c6a2be06ec775d54449e442a2bac234aa952948ca758356eab6dc87af618", + "https://jsr.io/@oak/oak/12.6.3/http_server_native.ts": "7dd27f851e4f47843ad2206aff5d414997d974d97410bacb8fc091d415598407", + "https://jsr.io/@oak/oak/12.6.3/http_server_native_request.ts": "552b174b5e13e92de8897d5b6f716b1e5a53543115481d65a651a41e4ca29ec9", + "https://jsr.io/@oak/oak/12.6.3/isMediaType.ts": "62d638abcf837ece3a8f07a4b7ca59794135cb0d4b73194c7d5837efd4161005", + "https://jsr.io/@oak/oak/12.6.3/mediaTyper.ts": "042b853fc8e9c3f6c628dd389e03ef481552bf07242efc3f8a1af042102a6105", + "https://jsr.io/@oak/oak/12.6.3/middleware.ts": "c7f7a0424a6dd99a00e4b8d7d6e131efc0facc8dea781845d713b63df8ef1862", + "https://jsr.io/@oak/oak/12.6.3/middleware/proxy.ts": "ab1465801b6dcf20e0d5b005ce59a929cb638f47b17143691303b8fd9841ff8e", + "https://jsr.io/@oak/oak/12.6.3/mod.ts": "f6aa47ad1b6099470c9a884cccad9d3ac0fd242ba940896291ab76cd26cf554b", + "https://jsr.io/@oak/oak/12.6.3/multipart.ts": "e76ba8587fdce04b69831ee7b1cc0c5da06919dd2d9c316a01d5aed8aca1307a", + "https://jsr.io/@oak/oak/12.6.3/range.ts": "04dfb168fac62413a430873b304667f850de0162d117103c7f4fb265c79bd2d0", + "https://jsr.io/@oak/oak/12.6.3/request.ts": "7b919fe422f67c74d88d48ad88c72cea106950620f5446e40449105fb3a859b9", + "https://jsr.io/@oak/oak/12.6.3/response.ts": "701ebc0532dce13a2eccdb4f95f0d025cdd0e8dea2604a76dddc8e3dbc7c09a6", + "https://jsr.io/@oak/oak/12.6.3/router.ts": "935c377ed809eb60a90e3534ba426444b71e3d9b45150887627b702485dfa40d", + "https://jsr.io/@oak/oak/12.6.3/send.ts": "5ec49f106294593f468317a0c885da4f3274bf6d0fe9e16a7304391730b4f4fb", + "https://jsr.io/@oak/oak/12.6.3/structured_clone.ts": "c3888b14d1eec558345bfbf13d0993d59bd45aaa8588444e35dd558c3a921cd8", + "https://jsr.io/@oak/oak/12.6.3/testing.ts": "9defd9f2e31080f77b5f7cd6437968f194521cc708b8a631164a633cb0c9b4ef", + "https://jsr.io/@oak/oak/12.6.3/util.ts": "30338dcf9e94c2716438a2fed0330e630ed400716c54876d905e04ba5bfb7b03", + "https://jsr.io/@std/assert/0.210.0/assert.ts": "482cc19da8c816e226caa566d2b146258ecd6744eaac9c11ba7ad4560728f539", + "https://jsr.io/@std/assert/0.210.0/assertion_error.ts": "933921a961c2268d1d6914502b6dc927635952c87945cf4f378e1faa44ed5c41", + "https://jsr.io/@std/bytes/0.210.0/concat.ts": "e2ce8efada37cd155af124be42d8223cbbf8c799d002c453d61b34d4890df68a", + "https://jsr.io/@std/bytes/0.210.0/copy.ts": "7c8aa7f6e8280f34976712c30207ffb9de5c58a6f04dfeebcd34d946010cbe7c", + "https://jsr.io/@std/bytes/0.210.0/ends_with.ts": "21a9860e56476d5327a81269ce4936fe43821e90fed066330f6e18db26303170", + "https://jsr.io/@std/bytes/0.210.0/equals.ts": "fc190cce412b2136979181b163ec7e05f7e7a947e39102eee4b8c0d62519ddf9", + "https://jsr.io/@std/bytes/0.210.0/includes_needle.ts": "52f712898557827096bad92798cbb7a816af6637c1bf5003fc802b573a6a35e8", + "https://jsr.io/@std/bytes/0.210.0/index_of_needle.ts": "f678648ac446b4544fe7ea3ac799f511a201e13c3a9ae1286ad2cad053181262", + "https://jsr.io/@std/bytes/0.210.0/last_index_of_needle.ts": "3d1b5edfa2244538840e92ea728cc30405f8a0b421ebab9d8ba5b868fdf4ea79", + "https://jsr.io/@std/bytes/0.210.0/mod.ts": "9ed597c10cc61cdcd4cf725ad7ed935f6dc7ff481ba6bcc6d6a47633ea1ae0b8", + "https://jsr.io/@std/bytes/0.210.0/repeat.ts": "3a00f65e7b821938d424ae93cee7bf0c7fa188308b64085d027e2e088c1fc09e", + "https://jsr.io/@std/bytes/0.210.0/starts_with.ts": "5b0f2d1f93570639aa832ee21940c8418aa7ebc6ff8a54c1f8b9812b0e98c646", + "https://jsr.io/@std/crypto/0.210.0/timing_safe_equal.ts": "3dfd69a5cf20e4d5e94698dee8de9b596fa36356b04a47a5cdf8879a023abbbc", + "https://jsr.io/@std/crypto/0.210.0/unstable_keystack.ts": "58322099078d73a471146287de70f5e9a12ad52a0e5973a050aedeed54b2167d", + "https://jsr.io/@std/encoding/0.210.0/_util.ts": "f368920189c4fe6592ab2e93bd7ded8f3065b84f95cd3e036a4a10a75649dcba", + "https://jsr.io/@std/encoding/0.210.0/base64.ts": "4d2d7230ff6296e1617bfbd62585996118c9699fdc9b70a3051605b1c329cb91", + "https://jsr.io/@std/encoding/0.210.0/base64url.ts": "f2a5b519052d574f27a06e2a12c34228b1cdd23d81935001606744f2615e4092", + "https://jsr.io/@std/fmt/0.210.0/colors.ts": "9c7152c3104edb8f118139b3270ec46df7a7033225cc7e7a0c4df671228012c9", + "https://jsr.io/@std/fs/0.210.0/_create_walk_entry.ts": "bc8fcc74f6811d934418fa4956e3b75325c63c54970acdefa058499e57313635", + "https://jsr.io/@std/fs/0.210.0/_get_file_info_type.ts": "9c92ff74f39bfba66b09faf9901af6a944cc71f014d9649e7d3e32eac4aeddfc", + "https://jsr.io/@std/fs/0.210.0/_is_same_path.ts": "3327f0ba58f918072a2ce6f7b606c3dd348e39419d187bfaeed845e2c2391df8", + "https://jsr.io/@std/fs/0.210.0/_is_subdir.ts": "7edb37b72e9ce64e8e3684f8115a1298333a9ffaa127394345ce4062261ebdb2", + "https://jsr.io/@std/fs/0.210.0/_to_path_string.ts": "0519fed81d0c52c5fd922e39335e7d84f9ca8b651ec3e2d1e8623ee882a91506", + "https://jsr.io/@std/fs/0.210.0/copy.ts": "9044a577c1b56f03f8476e9b101628617d7c7312c8ee3959c7f447dbf8988211", + "https://jsr.io/@std/fs/0.210.0/empty_dir.ts": "085f7bc11d4b0745e35c089b2b981d1f17c43d2dd25bf52fdfd2270bc356491c", + "https://jsr.io/@std/fs/0.210.0/ensure_dir.ts": "f768f673feb21e59a4f641c7002da783f133d3b0a27bc7a34ee7ce06330bc44b", + "https://jsr.io/@std/fs/0.210.0/ensure_file.ts": "a77e5ab6673aaae81072a4f26ce60a04bd395169ff3cc7362e1c6b7e6eee7af4", + "https://jsr.io/@std/fs/0.210.0/ensure_link.ts": "abf16dee6ea1455acae7ff84647666b888ddb63a597db9f39eb4fe399135f300", + "https://jsr.io/@std/fs/0.210.0/ensure_symlink.ts": "2ac390f6c409068e7184b25ecbd152c7f4955b74f8d2f57831e62f8c3c1d2df8", + "https://jsr.io/@std/fs/0.210.0/eol.ts": "11422201f6483e801ec2db385ff5c893d808e218037d38fee2c0574ea6227440", + "https://jsr.io/@std/fs/0.210.0/exists.ts": "42636533140f9a37d9d22d963fff062eda65a0e3e7c3d626da2a13517fdf13e7", + "https://jsr.io/@std/fs/0.210.0/expand_glob.ts": "09dc879cff29ba647897150008ab483a5583840c0090190ce5155bfbdae7e2c9", + "https://jsr.io/@std/fs/0.210.0/mod.ts": "bc3d0acd488cc7b42627044caf47d72019846d459279544e1934418955ba4898", + "https://jsr.io/@std/fs/0.210.0/move.ts": "fa54fd66e050b0a9f24c4e78e72da6a9de1bd39f6f3d01202236e440956fc5e7", + "https://jsr.io/@std/fs/0.210.0/walk.ts": "b5c2c4e171e98f8911ed9e5c6515b056bd6fa02dd766f9946d7754b2836918cd", + "https://jsr.io/@std/http/0.210.0/_negotiation/common.ts": "14d1a52427ab258a4b7161cd80e1d8a207b7cc64b46e911780f57ead5f4323c6", + "https://jsr.io/@std/http/0.210.0/_negotiation/encoding.ts": "ff747d107277c88cb7a6a62a08eeb8d56dad91564cbcccb30694d5dc126dcc53", + "https://jsr.io/@std/http/0.210.0/_negotiation/language.ts": "7bcddd8db3330bdb7ce4fc00a213c5547c1968139864201efd67ef2d0d51887d", + "https://jsr.io/@std/http/0.210.0/_negotiation/media_type.ts": "58847517cd549384ad677c0fe89e0a4815be36fe7a303ea63cee5f6a1d7e1692", + "https://jsr.io/@std/http/0.210.0/etag.ts": "af7592ca9a65a69713341e401773a6b8c4f68baea2ad7c52d80520c17721a547", + "https://jsr.io/@std/http/0.210.0/negotiation.ts": "1f1c2e447589e8b2a2f42106822a41f22f2ce28a416b3d58366a1f214257b99b", + "https://jsr.io/@std/http/0.210.0/unstable_cookie_map.ts": "ba0bd29cecb30d1628b07a2a4510189618173895f36db420f6efb89b7f6ba637", + "https://jsr.io/@std/http/0.210.0/user_agent.ts": "ec375d4251b8ed23229401a5685d038c709e3d344fd7860b7ed64209200e5b59", + "https://jsr.io/@std/io/0.210.0/buf_reader.ts": "54283f8a528aff9428a4d082fb5b688e0472124274cee683deb35bedd818a3e6", + "https://jsr.io/@std/io/0.210.0/buf_writer.ts": "162459043c3285a316c8ce859ccefadc1336362cb1f8c00682240e284bc68254", + "https://jsr.io/@std/io/0.210.0/buffer.ts": "a868771d439504ac06abb0f3081fa72c9592c1658ad95645f4d7dd5902cc346b", + "https://jsr.io/@std/io/0.210.0/copy_n.ts": "db62715df471ed1a9f4ec2e6828d75f64d02c81cf8e9a216d40f39c72ca3963b", + "https://jsr.io/@std/io/0.210.0/limited_reader.ts": "cbcecd962fa9d292b5a226e657d3c9e60a374d19ae8a3bba9956e6ce4a08d760", + "https://jsr.io/@std/io/0.210.0/mod.ts": "61c2100d3eac23f0574cffb74257069a8308cf5183342d8c344fcf307e1d5b8c", + "https://jsr.io/@std/io/0.210.0/multi_reader.ts": "e7edd9157732776ba5483b2bc2597f7b3b27913207dbf411c79172c1fc8a884d", + "https://jsr.io/@std/io/0.210.0/read_delim.ts": "4dedfd0ff0216bbb5f71bdbbc6513be6d3a327659cfc07c004ef6254bc625618", + "https://jsr.io/@std/io/0.210.0/read_int.ts": "4e96b319f9b82b066c04e13f9f14ad4460bcaf367454844f6395b51820f5b74f", + "https://jsr.io/@std/io/0.210.0/read_lines.ts": "45b1a27df6d046adb7c14c72bfb328734160f1d2cafa4ab42e100ad99fb06e2a", + "https://jsr.io/@std/io/0.210.0/read_long.ts": "b24d81075cd69660ad789948a8413c04038b007890f69418fd3d96dfc5609903", + "https://jsr.io/@std/io/0.210.0/read_range.ts": "bdc3a159054afd1fb0fd0060f841434bc774ea2db67382d9909c0a2defd8cc5f", + "https://jsr.io/@std/io/0.210.0/read_short.ts": "a2dd615728dbb5cf4a16e23ef12a0d208bd36ceff8dc062a34e0cd2140538f53", + "https://jsr.io/@std/io/0.210.0/read_string_delim.ts": "acbc79d5eb807f6c736f861078c152cf3e6a103b0addda8d94335a8baf10b186", + "https://jsr.io/@std/io/0.210.0/slice_long_to_bytes.ts": "970b12c39f2a68dd29a038ae8f9ccf51298973867e97f4da739b669eb57f85b4", + "https://jsr.io/@std/io/0.210.0/string_reader.ts": "fd7e8babd7137e9b622dde2438c7f7d9638902d63f29ca43e91aa67ac957cb5c", + "https://jsr.io/@std/io/0.210.0/string_writer.ts": "5c0f8261b8c1a5a89f1885af091feda7021e25f7b40d567890e7c31ce8ee78eb", + "https://jsr.io/@std/media_types/0.210.0/_db.ts": "7606d83e31f23ce1a7968cbaee852810c2cf477903a095696cdc62eaab7ce570", + "https://jsr.io/@std/media_types/0.210.0/_util.ts": "0879b04cc810ff18d3dcd97d361e03c9dfb29f67d7fc4a9c6c9d387282ef5fe8", + "https://jsr.io/@std/media_types/0.210.0/content_type.ts": "9d610421833ccfefa4b84383f628eabf54939936afb1a99665af933510ba4d3e", + "https://jsr.io/@std/media_types/0.210.0/extension.ts": "3e584be89a6c7fbce1c4f7db4948fcc7cfabf460382cf89191ff4929f31500e5", + "https://jsr.io/@std/media_types/0.210.0/extensions_by_type.ts": "b79817bc5c05e22309f702818702e03979809592952aebbb65cbd4ae48bca107", + "https://jsr.io/@std/media_types/0.210.0/format_media_type.ts": "b7f2db7843a73b96cef6262368483ccd06687ebb726170fa6490012c6209ebc8", + "https://jsr.io/@std/media_types/0.210.0/get_charset.ts": "d8483018dd8ac55b2bcccf933c359b676265abe1226b88c76a8c77722b23ca77", + "https://jsr.io/@std/media_types/0.210.0/mod.ts": "d3f0b99f85053bc0b98ecc24eaa3546dfa09b856dc0bbaf60d8956d2cdd710c8", + "https://jsr.io/@std/media_types/0.210.0/parse_media_type.ts": "419e4245cda84bdfc062e1bfff4ac4bf880851abb1b3952d19bf9db1bc5a5d41", + "https://jsr.io/@std/media_types/0.210.0/type_by_extension.ts": "5645c68a16c1191003a191146916ceaf032a294422fc332b28abbcc3ca0931b2", + "https://jsr.io/@std/media_types/0.210.0/vendor/mime-db.v1.52.0.ts": "6925bbcae81ca37241e3f55908d0505724358cda3384eaea707773b2c7e99586", + "https://jsr.io/@std/path/0.210.0/_common/assert_path.ts": "061e4d093d4ba5aebceb2c4da3318bfe3289e868570e9d3a8e327d91c2958946", + "https://jsr.io/@std/path/0.210.0/_common/basename.ts": "0d978ff818f339cd3b1d09dc914881f4d15617432ae519c1b8fdc09ff8d3789a", + "https://jsr.io/@std/path/0.210.0/_common/common.ts": "9e4233b2eeb50f8b2ae10ecc2108f58583aea6fd3e8907827020282dc2b76143", + "https://jsr.io/@std/path/0.210.0/_common/constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", + "https://jsr.io/@std/path/0.210.0/_common/dirname.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/format.ts": "018a88fb76802286e87a871cafe5e4be147a2a90d794a331121560b66845ab63", + "https://jsr.io/@std/path/0.210.0/_common/from_file_url.ts": "ef1bf3197d2efbf0297a2bdbf3a61d804b18f2bcce45548ae112313ec5be3c22", + "https://jsr.io/@std/path/0.210.0/_common/glob_to_reg_exp.ts": "50386887d6041f15741d0013a703ee63ef673983d465d3a0c9c190e95f8da4fe", + "https://jsr.io/@std/path/0.210.0/_common/normalize.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/normalize_string.ts": "88c472f28ae49525f9fe82de8c8816d93442d46a30d6bb5063b07ff8a89ff589", + "https://jsr.io/@std/path/0.210.0/_common/relative.ts": "1af19d787a2a84b8c534cc487424fe101f614982ae4851382c978ab2216186b4", + "https://jsr.io/@std/path/0.210.0/_common/strip_trailing_separators.ts": "7ffc7c287e97bdeeee31b155828686967f222cd73f9e5780bfe7dfb1b58c6c65", + "https://jsr.io/@std/path/0.210.0/_common/to_file_url.ts": "a8cdd1633bc9175b7eebd3613266d7c0b6ae0fb0cff24120b6092ac31662f9ae", + "https://jsr.io/@std/path/0.210.0/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", + "https://jsr.io/@std/path/0.210.0/_os.ts": "30b0c2875f360c9296dbe6b7f2d528f0f9c741cecad2e97f803f5219e91b40a2", + "https://jsr.io/@std/path/0.210.0/basename.ts": "04bb5ef3e86bba8a35603b8f3b69537112cdd19ce64b77f2522006da2977a5f3", + "https://jsr.io/@std/path/0.210.0/common.ts": "8fcbd9399cd86e390e4160ea56e5afe7c65310e4152845392903e7b9afce4a3d", + "https://jsr.io/@std/path/0.210.0/dirname.ts": "88a0a71c21debafc4da7a4cd44fd32e899462df458fbca152390887d41c40361", + "https://jsr.io/@std/path/0.210.0/extname.ts": "8c6d6112bce335b4d3d5a07cb0451816d0c2094c147049874fca2db5f707044b", + "https://jsr.io/@std/path/0.210.0/format.ts": "3457530cc85d1b4bab175f9ae73998b34fd456c830d01883169af0681b8894fb", + "https://jsr.io/@std/path/0.210.0/from_file_url.ts": "a45def541616dfe357424708c19a9fe890b170893d77d8f2a1381294249774ce", + "https://jsr.io/@std/path/0.210.0/glob.ts": "a00a81a55c02bbe074ab21a50b6495c6f7795f54cd718c824adaa92c6c9b7419", + "https://jsr.io/@std/path/0.210.0/glob_to_regexp.ts": "74d7448c471e293d03f05ccb968df4365fed6aaa508506b6325a8efdc01d8271", + "https://jsr.io/@std/path/0.210.0/is_absolute.ts": "67232b41b860571c5b7537f4954c88d86ae2ba45e883ee37d3dec27b74909d13", + "https://jsr.io/@std/path/0.210.0/is_glob.ts": "567dce5c6656bdedfc6b3ee6c0833e1e4db2b8dff6e62148e94a917f289c06ad", + "https://jsr.io/@std/path/0.210.0/join.ts": "3ee91038e3eaa966897eddda43d5207d7cae5c2de8a658bdbd722e8f8f29206a", + "https://jsr.io/@std/path/0.210.0/join_globs.ts": "9b84d5103b63d3dbed4b2cf8b12477b2ad415c7d343f1488505162dc0e5f4db8", + "https://jsr.io/@std/path/0.210.0/mod.ts": "7c6fe3556d36492aee78badf4e92cecf67ca747e72d70cac6aac268fb5ccd47f", + "https://jsr.io/@std/path/0.210.0/normalize.ts": "aa95be9a92c7bd4f9dc0ba51e942a1973e2b93d266cd74f5ca751c136d520b66", + "https://jsr.io/@std/path/0.210.0/normalize_glob.ts": "674baa82e1c00b6cb153bbca36e06f8e0337cb8062db6d905ab5de16076ca46b", + "https://jsr.io/@std/path/0.210.0/parse.ts": "d87ff0deef3fb495bc0d862278ff96da5a06acf0625ca27769fc52ac0d3d6ece", + "https://jsr.io/@std/path/0.210.0/posix/_util.ts": "80c8e9b22ec44de0ea718f30738d382fb6278af2db504537dd559b064f762355", + "https://jsr.io/@std/path/0.210.0/posix/basename.ts": "86f4db191cc622da3f674d1cde6f8ad343c14d5fc484ff8feedbc8bba796d7d7", + "https://jsr.io/@std/path/0.210.0/posix/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/posix/dirname.ts": "70c73fd302935a05c0f453ab239bb526fb9ddd06e98d7524ff248a0027e5d4c8", + "https://jsr.io/@std/path/0.210.0/posix/extname.ts": "4b96dc7b8ef6ce156c759a126cbe8a00f8d022476425ad32eef01d16a910caa4", + "https://jsr.io/@std/path/0.210.0/posix/format.ts": "df268803afafeba3df4d20b4b7f287339cb4efcfc6caf55585fb45deda6e718f", + "https://jsr.io/@std/path/0.210.0/posix/from_file_url.ts": "e1ee657d8e993dc7a38c85cda95fa83049c35e75336e09d33810480a24a4120f", + "https://jsr.io/@std/path/0.210.0/posix/glob_to_regexp.ts": "e0ce84c7517db460ea9f99558c190584615fff5cb0ddacad98604e96d81edc1e", + "https://jsr.io/@std/path/0.210.0/posix/is_absolute.ts": "7b139bd0574c2cb4940ca3cdb5070258269d29e01d870a5e42ced4e9553cb7b2", + "https://jsr.io/@std/path/0.210.0/posix/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/posix/join.ts": "d8748c1dca2c199a7d371d31ca7f7ba425a2aad0ce25701375449165a7ef6887", + "https://jsr.io/@std/path/0.210.0/posix/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/posix/mod.ts": "30e9a595bb14869559df577cfacf79a35ece94227e814f5c1fc34c513cf9cc4e", + "https://jsr.io/@std/path/0.210.0/posix/normalize.ts": "b8f962d83e1bd5cd305fa5e34742c2ea4238ebb745a2cf641632bf6a09453456", + "https://jsr.io/@std/path/0.210.0/posix/normalize_glob.ts": "b648aa0d42a0d796eec26329c329c1de7b618e02b062a92085560394190a687a", + "https://jsr.io/@std/path/0.210.0/posix/parse.ts": "1df1f2b311ba07be7a83733444be1bae08f2dbaf70b85a084f67a49ebd05b2cf", + "https://jsr.io/@std/path/0.210.0/posix/relative.ts": "c67d8b2c80ddc978d30dc6e5e35b6eed51dd9de3e75b5f1a22afdf1b4080c60b", + "https://jsr.io/@std/path/0.210.0/posix/resolve.ts": "0de87a7a7032ab739b01620f66b51b7fb2b1dc0c6a7bbd3fb3fd402368673cf6", + "https://jsr.io/@std/path/0.210.0/posix/separator.ts": "0b6573b5f3269a3164d8edc9cefc33a02dd51003731c561008c8bb60220ebac1", + "https://jsr.io/@std/path/0.210.0/posix/to_file_url.ts": "2fc025607330c0e8b0a94bc180c07e517881de00f1c8ea8c3abdd0e70a2a404f", + "https://jsr.io/@std/path/0.210.0/posix/to_namespaced_path.ts": "c9228a0e74fd37e76622cd7b142b8416663a9b87db643302fa0926b5a5c83bdc", + "https://jsr.io/@std/path/0.210.0/relative.ts": "23d45ede8b7ac464a8299663a43488aad6b561414e7cbbe4790775590db6349c", + "https://jsr.io/@std/path/0.210.0/resolve.ts": "5b184efc87155a0af9fa305ff68a109e28de9aee81fc3e77cd01380f19daf867", + "https://jsr.io/@std/path/0.210.0/separator.ts": "1a21ffd408bfaa317bffff604e5a799f78a7a5571590bde6b9cdce7685953d74", + "https://jsr.io/@std/path/0.210.0/to_file_url.ts": "8895a9cd369819c689f8e53131c03277c0c79b56acbe0533b42f2f0b4ead7cbe", + "https://jsr.io/@std/path/0.210.0/to_namespaced_path.ts": "cf8734848aac3c7527d1689d2adf82132b1618eff3cc523a775068847416b22a", + "https://jsr.io/@std/path/0.210.0/windows/_util.ts": "4e44914486b5dc4cca98880693971ea15238c6bae67d8131c39e1112ea427909", + "https://jsr.io/@std/path/0.210.0/windows/basename.ts": "9ae2c0d1df814af9d660fd170c239dde1b66cbdf158185b4fbd7dddccc91bac4", + "https://jsr.io/@std/path/0.210.0/windows/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/windows/dirname.ts": "8be11039908fc7d09ac13e37ad2f31b7b19c0a5d6a238181c46e3ea41b910ac2", + "https://jsr.io/@std/path/0.210.0/windows/extname.ts": "0e22da7b84d0a89b79cc7a2e9c7163ab742fc600a8ffd8ea42aae633a5ac5a30", + "https://jsr.io/@std/path/0.210.0/windows/format.ts": "e3d94cb0f2ca1ed31c268ab6231dbd7478dec3cb7b276ece4421474598b55226", + "https://jsr.io/@std/path/0.210.0/windows/from_file_url.ts": "00d145aa2c793781cdc2740612bf897dac81c18a6c15420fb516e4030269108a", + "https://jsr.io/@std/path/0.210.0/windows/glob_to_regexp.ts": "5cbefcad6ae88294d23faf5b0f4766f4e1a0c2369ca14edae02c3876d1fa1ed9", + "https://jsr.io/@std/path/0.210.0/windows/is_absolute.ts": "16bc7d8aa335780336821158a147dba360127bc648699ea4302719454647e160", + "https://jsr.io/@std/path/0.210.0/windows/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/windows/join.ts": "a5c3ce40827eaac55ef52e791bdd30d8d40c9e748227243ea3185ecfe49a85fc", + "https://jsr.io/@std/path/0.210.0/windows/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/windows/mod.ts": "98e5151661d2cf34a0a291ff16e292e5079e9fb7cd64c93684f3f5a29d217123", + "https://jsr.io/@std/path/0.210.0/windows/normalize.ts": "d5c2da8f188f5ec342695f1284e2585ba50678ba187c8897c566569bbf9e4092", + "https://jsr.io/@std/path/0.210.0/windows/normalize_glob.ts": "db339cfb08e9bb38d49ce005ce318a20d03b77dbb75294a68d050f3d254887ad", + "https://jsr.io/@std/path/0.210.0/windows/parse.ts": "307029d3c69e8310452df48c238993e4ee41cbc8f7b9f4be6c1ad1201658c608", + "https://jsr.io/@std/path/0.210.0/windows/relative.ts": "f79960e8b922ed35197e53d2ae09a95ffdce7844c8430bf782f01f9d721731c7", + "https://jsr.io/@std/path/0.210.0/windows/resolve.ts": "c9111c13cbe521d36e3cb54eaeee146d04b9674ecb0df91aa9536f6bfd97903a", + "https://jsr.io/@std/path/0.210.0/windows/separator.ts": "ae21f27015f10510ed1ac4a0ba9c4c9c967cbdd9d9e776a3e4967553c397bd5d", + "https://jsr.io/@std/path/0.210.0/windows/to_file_url.ts": "2be7e66a8321a66cc382ddbeeaf79e0e962c83688e2e3c4be689276099680298", + "https://jsr.io/@std/path/0.210.0/windows/to_namespaced_path.ts": "e4e6f67f9c0f097f8eb913597064aacadb3abb158735773096d55f8d234f466b", + "https://jsr.io/@std/streams/0.210.0/_common.ts": "3b2c1f0287ce2ad51fff4091a7d0f48375c85b0ec341468e76d5ac13bb0014dd", + "https://jsr.io/@std/streams/0.210.0/buffer.ts": "ef343c8e8d51fe8b3e3b9ef5f08e119a630c0565713884efe54200207b8de513", + "https://jsr.io/@std/streams/0.210.0/byte_slice_stream.ts": "1831fdeb6237ab0404dc612eb78e2fcec9d24cb9cfa9519e4bd36188a81df6e2", + "https://jsr.io/@std/streams/0.210.0/copy.ts": "6a33fdb2c93817e33e5fdd78c8e799b914d09f45ac5608a84b56495c7823fdc6", + "https://jsr.io/@std/streams/0.210.0/delimiter_stream.ts": "db0c1d5852853d6fbb60abda6e2067efd6f121d6668367d7dc571aeecc0f1393", + "https://jsr.io/@std/streams/0.210.0/early_zip_readable_streams.ts": "3adf4c78d52fad18c6f201159b7796317c8082620036dd9a3d990204b5764981", + "https://jsr.io/@std/streams/0.210.0/iterate_reader.ts": "12b4d47ca6540a8feab09599828f59a44d431dc1a9c779d54f4d544185e5c326", + "https://jsr.io/@std/streams/0.210.0/limited_bytes_transform_stream.ts": "43c91a66ac7c3066133d007e4a25b802667d80d84c3de221d18a67167c3088e3", + "https://jsr.io/@std/streams/0.210.0/limited_transform_stream.ts": "584af31000cb4dc970d8244c41b2b3b3a6e3f9a078fceefea8c4312c8aee6e51", + "https://jsr.io/@std/streams/0.210.0/merge_readable_streams.ts": "e69a985ac1d4e24d29476c134f2ceb2b517b528649fd4ad8f66b887dbf65a8cf", + "https://jsr.io/@std/streams/0.210.0/mod.ts": "e133c271474f1e9dc19f5c4959406f5c2101540c56a3e7d7abc6bdb7bcef807e", + "https://jsr.io/@std/streams/0.210.0/read_all.ts": "c4c8b499668a7225fcb898274ec00374cf7b331e0d14dfe9bf44da03644a968c", + "https://jsr.io/@std/streams/0.210.0/readable_stream_from_reader.ts": "3d5bfd2567560557291ac6b01f0b045cd2336e3ebdb1f8c6c46726121585752c", + "https://jsr.io/@std/streams/0.210.0/reader_from_iterable.ts": "cbe640306618c4a61b2e43a710b1c89336c343e627f97b03bc5aa2c78a9c97a4", + "https://jsr.io/@std/streams/0.210.0/reader_from_stream_reader.ts": "56ef51217a464551e8efdc65a4c28c6d14148fbfd23ed88401732c50fcb3cf3d", + "https://jsr.io/@std/streams/0.210.0/text_delimiter_stream.ts": "00158278225105fedbadc0cbe5bf0e7d70cb2cf062eb48b4f5db694ba3a2dd61", + "https://jsr.io/@std/streams/0.210.0/text_line_stream.ts": "a74dc71908ebde4bf4d186b6d4be64475d7e43269a44e29c2d38984692501f03", + "https://jsr.io/@std/streams/0.210.0/to_array_buffer.ts": "c1322d7d8601f3e7516f2e1fc391a278b23d13ecd0213b44f4de63f9bdefa227", + "https://jsr.io/@std/streams/0.210.0/to_blob.ts": "0f5750b41e92abeeac81008e6df848206a0b83caf74d398da717d65cbb86a786", + "https://jsr.io/@std/streams/0.210.0/to_json.ts": "8986526388c2520c89abeba59fac3e1b6eaeee630f2bc271da0ba48cc24281c1", + "https://jsr.io/@std/streams/0.210.0/to_text.ts": "914a799c0e931d1f94cb8762d3909e3d9abdd15f20d7136ba2c848128825d8e6", + "https://jsr.io/@std/streams/0.210.0/to_transform_stream.ts": "59ff4acbd3a071daef6ad658213a7a7bac0cb33491b10e96210fb040e870a7c0", + "https://jsr.io/@std/streams/0.210.0/writable_stream_from_writer.ts": "6536e7aa2201e42730f24c901f27376edb092751d1aba6592ff5926c00537998", + "https://jsr.io/@std/streams/0.210.0/write_all.ts": "f96c63b2ab49ce4b7404250e53e0e02b15d499d8e67e950718280252888aae1d", + "https://jsr.io/@std/streams/0.210.0/writer_from_stream_writer.ts": "1e442c1523abf3343070edb598b9f71650ee375b53e7b1c8c41d1a2f1dc16a8b", + "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638" + }, + "workspaces": { + "deps": [ + "jsr:@dsherret/dax", + "jsr:@oak/oak" + ] + } +} + +# new config (removes oak) +{ + "deps": [ + "jsr:@dsherret/dax" + ] +} + +# output From c9afd5282cdbfd9dd8c50e1e043f493ec9cec834 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:09:22 -0500 Subject: [PATCH 09/38] Add test about removing oak then dax --- src/lib.rs | 4 + tests/helpers/mod.rs | 41 +-- tests/integration_test.rs | 39 ++- ...RemovingDep.txt => RemovingOakThenDax.txt} | 285 +++++++++++++++++- 4 files changed, 334 insertions(+), 35 deletions(-) rename tests/specs/config_changes/{RemovingDep.txt => RemovingOakThenDax.txt} (56%) diff --git a/src/lib.rs b/src/lib.rs index 2577484..23ffb62 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,13 +30,17 @@ pub struct SetWorkspaceConfigOptions Option> { #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WorkspaceConfig { + #[serde(flatten)] pub root: WorkspaceMemberConfig, + #[serde(default)] pub members: BTreeMap, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WorkspaceMemberConfig { + #[serde(default)] pub deps: Option>, + #[serde(default)] pub package_json_deps: Option>, } diff --git a/tests/helpers/mod.rs b/tests/helpers/mod.rs index 46d4f79..ad0d398 100644 --- a/tests/helpers/mod.rs +++ b/tests/helpers/mod.rs @@ -2,11 +2,15 @@ use std::iter::Peekable; use std::path::Path; use std::path::PathBuf; +pub struct ChangeAndOutput { + pub change: SpecFile, + pub output: SpecFile, +} + pub struct ConfigChangeSpec { pub path: PathBuf, pub original_text: SpecFile, - pub change: SpecFile, - pub output: SpecFile, + pub change_and_outputs: Vec, } impl ConfigChangeSpec { @@ -39,31 +43,32 @@ impl ConfigChangeSpec { title: lines.next().unwrap().to_string(), text: take_next(&mut lines), }; - let change = SpecFile { - title: lines.next().unwrap().to_string(), - text: take_next(&mut lines), - }; - let output = SpecFile { - title: lines.next().unwrap().to_string(), - text: take_next(&mut lines), - }; - assert!(lines.next().is_none()); + let mut change_and_outputs = Vec::new(); + while lines.peek().is_some() { + let change = SpecFile { + title: lines.next().unwrap().to_string(), + text: take_next(&mut lines), + }; + let output = SpecFile { + title: lines.next().unwrap().to_string(), + text: take_next(&mut lines), + }; + change_and_outputs.push(ChangeAndOutput { change, output }); + } Self { path, original_text, - change, - output, + change_and_outputs, } } pub fn emit(&self) -> String { let mut text = String::new(); text.push_str(&self.original_text.emit()); - text.push_str("\n"); - text.push_str(&self.change.emit()); - text.push_str("\n"); - text.push_str(&self.output.emit()); - text.push_str("\n"); + for change_and_output in &self.change_and_outputs { + text.push_str(&change_and_output.change.emit()); + text.push_str(&change_and_output.output.emit()); + } text } } diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 0ff6e88..3a667cf 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -1,6 +1,8 @@ +use pretty_assertions::assert_eq; +use std::path::PathBuf; + use deno_lockfile::Lockfile; use deno_lockfile::SetWorkspaceConfigOptions; -use std::path::PathBuf; use helpers::ConfigChangeSpec; @@ -17,6 +19,7 @@ fn config_changes() { let specs = ConfigChangeSpec::collect_in_dir(&PathBuf::from( "./tests/specs/config_changes", )); + let is_update = std::env::var("UPDATE") == Ok("1".to_string()); for mut spec in specs { eprintln!("Looking at {}...", spec.path.display()); let mut config_file = Lockfile::with_lockfile_content( @@ -25,22 +28,26 @@ fn config_changes() { false, ) .unwrap(); - config_file.set_workspace_config(SetWorkspaceConfigOptions { - config: serde_json::from_str(&spec.change.text).unwrap(), - nv_to_jsr_url, - }); - let expected_text = spec.output.text.clone(); - let actual_text = config_file.as_json_string(); - if std::env::var("UPDATE") == Ok("1".to_string()) { - spec.output.text = actual_text; + for change_and_output in &mut spec.change_and_outputs { + config_file.set_workspace_config(SetWorkspaceConfigOptions { + config: serde_json::from_str(&change_and_output.change.text).unwrap(), + nv_to_jsr_url, + }); + let expected_text = change_and_output.output.text.clone(); + let actual_text = config_file.as_json_string(); + if is_update { + change_and_output.output.text = actual_text; + } else { + assert_eq!( + actual_text.trim(), + expected_text.trim(), + "Failed for: {}", + spec.path.display() + ); + } + } + if is_update { std::fs::write(&spec.path, spec.emit()).unwrap(); - } else { - assert_eq!( - actual_text, - expected_text, - "Failed for: {}", - spec.path.display() - ); } } } diff --git a/tests/specs/config_changes/RemovingDep.txt b/tests/specs/config_changes/RemovingOakThenDax.txt similarity index 56% rename from tests/specs/config_changes/RemovingDep.txt rename to tests/specs/config_changes/RemovingOakThenDax.txt index 32b1959..de97f86 100644 --- a/tests/specs/config_changes/RemovingDep.txt +++ b/tests/specs/config_changes/RemovingOakThenDax.txt @@ -375,7 +375,7 @@ } } -# new config (removes oak) +# remove oak { "deps": [ "jsr:@dsherret/dax" @@ -383,3 +383,286 @@ } # output +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@dsherret/dax": "jsr:@dsherret/dax@0.0.1", + "jsr:@dsherret/which@0.0.1": "jsr:@dsherret/which@0.0.1", + "jsr:@std/assert@0.210": "jsr:@std/assert@0.210.0", + "jsr:@std/assert@^0.210.0": "jsr:@std/assert@0.210.0", + "jsr:@std/bytes@0.210": "jsr:@std/bytes@0.210.0", + "jsr:@std/bytes@^0.210.0": "jsr:@std/bytes@0.210.0", + "jsr:@std/fmt@0.210.0": "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0": "jsr:@std/fs@0.210.0", + "jsr:@std/io@0.210": "jsr:@std/io@0.210.0", + "jsr:@std/io@0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/io@^0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/path@0.210": "jsr:@std/path@0.210.0", + "jsr:@std/path@0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/path@^0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210": "jsr:@std/streams@0.210.0", + "jsr:@std/streams@0.210.0": "jsr:@std/streams@0.210.0" + }, + "jsr": { + "@dsherret/dax@0.0.1": { + "dependencies": [ + "jsr:@dsherret/which@0.0.1", + "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0", + "jsr:@std/io@0.210.0", + "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210.0" + ] + }, + "@dsherret/which@0.0.1": { + "dependencies": [] + }, + "@std/assert@0.210.0": { + "dependencies": [] + }, + "@std/bytes@0.210.0": { + "dependencies": [] + }, + "@std/fmt@0.210.0": { + "dependencies": [] + }, + "@std/fs@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/path@^0.210.0" + ] + }, + "@std/io@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0" + ] + }, + "@std/path@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0" + ] + }, + "@std/streams@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0", + "jsr:@std/io@^0.210.0" + ] + } + } + }, + "remote": { + "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@dsherret/dax/0.0.1/src/command.ts": "e5dc7e3af38240657b4b9dc106b044c9c75bf16385c8f8af1c795ca89e27c3bc", + "https://jsr.io/@dsherret/dax/0.0.1/src/command_handler.ts": "56ee6893bf5ec829c370fe5a9367f60b3590e571f7b69153d48686779ab14d98", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/args.ts": "a138aef24294e3cbf13cef08f4836d018e8dd99fd06ad82e7e7f08ef680bbc1d", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cat.ts": "984035bd43b62c12764bcf321d84ce4bbe271aedaac48d251c8db080022d5cbf", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cd.ts": "82e85b573dd3006eefc20d1849ca638e461946688749e9a4ea53ab07c03ef7e4", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cp_mv.ts": "aa09e3ab95c5eaae1186ad9a84d94977e19f4fa3c3fd5ab6a45b0b009600aae6", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/echo.ts": "a4f86022ad4eb5b8e8326e45fd2f571f6bd5e3c842f0c10e0be69f35b0d78180", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/exit.ts": "86b181d0f1e7723b265ec7a8858a43f5cac56cd485375524b4d8f022c5632419", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/export.ts": "1d5012c6b991e3c1112cc5841520e1ae651a20a0fd6c2e8014c79eba571755be", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/mkdir.ts": "620ecc4d690b342ecea9e9849303a4f8e2f65b430b70be846c1de766c9b5bbe7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/printenv.ts": "1efa36e21c6039da424c99753d748a486c3a7621507ca9d8d319e2a6e3e259ac", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/pwd.ts": "d89fac9ca37afe54967acd24744c3255aacc63f51697c27fe8d2e90a9049088f", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/rm.ts": "9c3b200c154c4a3c7e3b9ab9204daaad62b961453e9a8c8fc9a0451953e59f75", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/sleep.ts": "50b162accce6b8f20180f13d01613a6da6d88920d8322ac46ff7a2bbd6fcfbd7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/test.ts": "d4a72076e652b3be65eaec9ff26eb342f5293140a82fa6bc357fa77b895ec3ab", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/touch.ts": "8386148784f92455502f09880306bc859ab61540c80fe0de0686b323662ee1fb", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/unset.ts": "dbebdad7e6e301ee621161a13669ab4164025aee5b323658ab283dab64b9eebf", + "https://jsr.io/@dsherret/dax/0.0.1/src/common.ts": "7295d13ab0023bb09d4c97e3a131cedada6294a33474f136b652a145330c8e3e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/confirm.ts": "ffcc76ebf10c8bfde6e4072b70b271e0453170ab0bd0bb795bc4e52a1237062e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/logger.ts": "e0ab5025915cef70df03681c756e211f25bb2e4331f82ed4256b17ddd9e794ea", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/mod.ts": "de8af7d646f6cb222eee6560171993690247941b13ed9d757789d16f019d73ee", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/multiSelect.ts": "50ff5de156028ff21025917b4c797c877037bf1460974b0f72b6ab0907d0a3d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/format.ts": "15ddbb8051580f88ed499281e12ca6f881f875ab73268d7451d7113ee130bd7d", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/interval.ts": "82bd91b9f8219c8d03b7aad51e7425f3276d96615b32826693dffd5905d663d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/mod.ts": "5ae6cf88fe8caaa5c8218511c9458944201da5fbc9749b200d9e1227c93b3b9e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/prompt.ts": "91c8d03fe2179438629491e71a6bdf0b6ca5bd31cbcc29ac7a2529daefe24d94", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/select.ts": "6b96555d7a13acd6e864a874e5687044932cf2412a45dc2811613cb2f00900ca", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/utils.ts": "4e4f8cf5e435345e4ad94523544dc112e25969a12bdd05fb8073729e078cf47a", + "https://jsr.io/@dsherret/dax/0.0.1/src/deps.ts": "8e1acae3e51645f52fda44ffa528e3c346f00b37afc4bba1c2c90433d551bccb", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/mod.ts": "c992db99c8259ae3bf2d35666585dfefda84cf7cf4e624e42ea2ac7367900fe0", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/rs_lib.generated.js": "932a69348ce575e4a5c2398c896e9cd06cf287f6c18fb25dfdf23badca1c9f54", + "https://jsr.io/@dsherret/dax/0.0.1/src/path.ts": "365ed563f1a7421c20b094f5e56ca1f1ae9608b2a568b7ad394a63bdeabc1313", + "https://jsr.io/@dsherret/dax/0.0.1/src/pipes.ts": "850243b55f40eaad1f0020455c63905a0a41f543c2b7031d38188051398692d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/request.ts": "9856b955ac1a0831a4998b23ba7be2f5e74ab3fd17230bc28476781c9f0f20d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/result.ts": "0908b69c16b25c3b258f6b2ada12e124686df5f7ea2b98daa27a83973c7b118c", + "https://jsr.io/@dsherret/dax/0.0.1/src/shell.ts": "e18dcdccd5edf8ad8cd56b1e58a2b4f094eb969f3499303adde66ee71d231770", + "https://jsr.io/@dsherret/dax/0.0.1/src/vendor/outdent.ts": "d2f45f327f06ac8607a8fb6f6c428f25f8bb03673d07795541cf880e5f5c38e2", + "https://jsr.io/@dsherret/which/0.0.1/mod.ts": "cca0ebcff4f6c9088f7b9d7e5859b3561f0701b83a83b739000bfebb34eaebb5", + "https://jsr.io/@std/assert/0.210.0/assert.ts": "482cc19da8c816e226caa566d2b146258ecd6744eaac9c11ba7ad4560728f539", + "https://jsr.io/@std/assert/0.210.0/assertion_error.ts": "933921a961c2268d1d6914502b6dc927635952c87945cf4f378e1faa44ed5c41", + "https://jsr.io/@std/bytes/0.210.0/concat.ts": "e2ce8efada37cd155af124be42d8223cbbf8c799d002c453d61b34d4890df68a", + "https://jsr.io/@std/bytes/0.210.0/copy.ts": "7c8aa7f6e8280f34976712c30207ffb9de5c58a6f04dfeebcd34d946010cbe7c", + "https://jsr.io/@std/bytes/0.210.0/ends_with.ts": "21a9860e56476d5327a81269ce4936fe43821e90fed066330f6e18db26303170", + "https://jsr.io/@std/bytes/0.210.0/equals.ts": "fc190cce412b2136979181b163ec7e05f7e7a947e39102eee4b8c0d62519ddf9", + "https://jsr.io/@std/bytes/0.210.0/includes_needle.ts": "52f712898557827096bad92798cbb7a816af6637c1bf5003fc802b573a6a35e8", + "https://jsr.io/@std/bytes/0.210.0/index_of_needle.ts": "f678648ac446b4544fe7ea3ac799f511a201e13c3a9ae1286ad2cad053181262", + "https://jsr.io/@std/bytes/0.210.0/last_index_of_needle.ts": "3d1b5edfa2244538840e92ea728cc30405f8a0b421ebab9d8ba5b868fdf4ea79", + "https://jsr.io/@std/bytes/0.210.0/mod.ts": "9ed597c10cc61cdcd4cf725ad7ed935f6dc7ff481ba6bcc6d6a47633ea1ae0b8", + "https://jsr.io/@std/bytes/0.210.0/repeat.ts": "3a00f65e7b821938d424ae93cee7bf0c7fa188308b64085d027e2e088c1fc09e", + "https://jsr.io/@std/bytes/0.210.0/starts_with.ts": "5b0f2d1f93570639aa832ee21940c8418aa7ebc6ff8a54c1f8b9812b0e98c646", + "https://jsr.io/@std/fmt/0.210.0/colors.ts": "9c7152c3104edb8f118139b3270ec46df7a7033225cc7e7a0c4df671228012c9", + "https://jsr.io/@std/fs/0.210.0/_create_walk_entry.ts": "bc8fcc74f6811d934418fa4956e3b75325c63c54970acdefa058499e57313635", + "https://jsr.io/@std/fs/0.210.0/_get_file_info_type.ts": "9c92ff74f39bfba66b09faf9901af6a944cc71f014d9649e7d3e32eac4aeddfc", + "https://jsr.io/@std/fs/0.210.0/_is_same_path.ts": "3327f0ba58f918072a2ce6f7b606c3dd348e39419d187bfaeed845e2c2391df8", + "https://jsr.io/@std/fs/0.210.0/_is_subdir.ts": "7edb37b72e9ce64e8e3684f8115a1298333a9ffaa127394345ce4062261ebdb2", + "https://jsr.io/@std/fs/0.210.0/_to_path_string.ts": "0519fed81d0c52c5fd922e39335e7d84f9ca8b651ec3e2d1e8623ee882a91506", + "https://jsr.io/@std/fs/0.210.0/copy.ts": "9044a577c1b56f03f8476e9b101628617d7c7312c8ee3959c7f447dbf8988211", + "https://jsr.io/@std/fs/0.210.0/empty_dir.ts": "085f7bc11d4b0745e35c089b2b981d1f17c43d2dd25bf52fdfd2270bc356491c", + "https://jsr.io/@std/fs/0.210.0/ensure_dir.ts": "f768f673feb21e59a4f641c7002da783f133d3b0a27bc7a34ee7ce06330bc44b", + "https://jsr.io/@std/fs/0.210.0/ensure_file.ts": "a77e5ab6673aaae81072a4f26ce60a04bd395169ff3cc7362e1c6b7e6eee7af4", + "https://jsr.io/@std/fs/0.210.0/ensure_link.ts": "abf16dee6ea1455acae7ff84647666b888ddb63a597db9f39eb4fe399135f300", + "https://jsr.io/@std/fs/0.210.0/ensure_symlink.ts": "2ac390f6c409068e7184b25ecbd152c7f4955b74f8d2f57831e62f8c3c1d2df8", + "https://jsr.io/@std/fs/0.210.0/eol.ts": "11422201f6483e801ec2db385ff5c893d808e218037d38fee2c0574ea6227440", + "https://jsr.io/@std/fs/0.210.0/exists.ts": "42636533140f9a37d9d22d963fff062eda65a0e3e7c3d626da2a13517fdf13e7", + "https://jsr.io/@std/fs/0.210.0/expand_glob.ts": "09dc879cff29ba647897150008ab483a5583840c0090190ce5155bfbdae7e2c9", + "https://jsr.io/@std/fs/0.210.0/mod.ts": "bc3d0acd488cc7b42627044caf47d72019846d459279544e1934418955ba4898", + "https://jsr.io/@std/fs/0.210.0/move.ts": "fa54fd66e050b0a9f24c4e78e72da6a9de1bd39f6f3d01202236e440956fc5e7", + "https://jsr.io/@std/fs/0.210.0/walk.ts": "b5c2c4e171e98f8911ed9e5c6515b056bd6fa02dd766f9946d7754b2836918cd", + "https://jsr.io/@std/io/0.210.0/buf_reader.ts": "54283f8a528aff9428a4d082fb5b688e0472124274cee683deb35bedd818a3e6", + "https://jsr.io/@std/io/0.210.0/buf_writer.ts": "162459043c3285a316c8ce859ccefadc1336362cb1f8c00682240e284bc68254", + "https://jsr.io/@std/io/0.210.0/buffer.ts": "a868771d439504ac06abb0f3081fa72c9592c1658ad95645f4d7dd5902cc346b", + "https://jsr.io/@std/io/0.210.0/copy_n.ts": "db62715df471ed1a9f4ec2e6828d75f64d02c81cf8e9a216d40f39c72ca3963b", + "https://jsr.io/@std/io/0.210.0/limited_reader.ts": "cbcecd962fa9d292b5a226e657d3c9e60a374d19ae8a3bba9956e6ce4a08d760", + "https://jsr.io/@std/io/0.210.0/mod.ts": "61c2100d3eac23f0574cffb74257069a8308cf5183342d8c344fcf307e1d5b8c", + "https://jsr.io/@std/io/0.210.0/multi_reader.ts": "e7edd9157732776ba5483b2bc2597f7b3b27913207dbf411c79172c1fc8a884d", + "https://jsr.io/@std/io/0.210.0/read_delim.ts": "4dedfd0ff0216bbb5f71bdbbc6513be6d3a327659cfc07c004ef6254bc625618", + "https://jsr.io/@std/io/0.210.0/read_int.ts": "4e96b319f9b82b066c04e13f9f14ad4460bcaf367454844f6395b51820f5b74f", + "https://jsr.io/@std/io/0.210.0/read_lines.ts": "45b1a27df6d046adb7c14c72bfb328734160f1d2cafa4ab42e100ad99fb06e2a", + "https://jsr.io/@std/io/0.210.0/read_long.ts": "b24d81075cd69660ad789948a8413c04038b007890f69418fd3d96dfc5609903", + "https://jsr.io/@std/io/0.210.0/read_range.ts": "bdc3a159054afd1fb0fd0060f841434bc774ea2db67382d9909c0a2defd8cc5f", + "https://jsr.io/@std/io/0.210.0/read_short.ts": "a2dd615728dbb5cf4a16e23ef12a0d208bd36ceff8dc062a34e0cd2140538f53", + "https://jsr.io/@std/io/0.210.0/read_string_delim.ts": "acbc79d5eb807f6c736f861078c152cf3e6a103b0addda8d94335a8baf10b186", + "https://jsr.io/@std/io/0.210.0/slice_long_to_bytes.ts": "970b12c39f2a68dd29a038ae8f9ccf51298973867e97f4da739b669eb57f85b4", + "https://jsr.io/@std/io/0.210.0/string_reader.ts": "fd7e8babd7137e9b622dde2438c7f7d9638902d63f29ca43e91aa67ac957cb5c", + "https://jsr.io/@std/io/0.210.0/string_writer.ts": "5c0f8261b8c1a5a89f1885af091feda7021e25f7b40d567890e7c31ce8ee78eb", + "https://jsr.io/@std/path/0.210.0/_common/assert_path.ts": "061e4d093d4ba5aebceb2c4da3318bfe3289e868570e9d3a8e327d91c2958946", + "https://jsr.io/@std/path/0.210.0/_common/basename.ts": "0d978ff818f339cd3b1d09dc914881f4d15617432ae519c1b8fdc09ff8d3789a", + "https://jsr.io/@std/path/0.210.0/_common/common.ts": "9e4233b2eeb50f8b2ae10ecc2108f58583aea6fd3e8907827020282dc2b76143", + "https://jsr.io/@std/path/0.210.0/_common/constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", + "https://jsr.io/@std/path/0.210.0/_common/dirname.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/format.ts": "018a88fb76802286e87a871cafe5e4be147a2a90d794a331121560b66845ab63", + "https://jsr.io/@std/path/0.210.0/_common/from_file_url.ts": "ef1bf3197d2efbf0297a2bdbf3a61d804b18f2bcce45548ae112313ec5be3c22", + "https://jsr.io/@std/path/0.210.0/_common/glob_to_reg_exp.ts": "50386887d6041f15741d0013a703ee63ef673983d465d3a0c9c190e95f8da4fe", + "https://jsr.io/@std/path/0.210.0/_common/normalize.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/normalize_string.ts": "88c472f28ae49525f9fe82de8c8816d93442d46a30d6bb5063b07ff8a89ff589", + "https://jsr.io/@std/path/0.210.0/_common/relative.ts": "1af19d787a2a84b8c534cc487424fe101f614982ae4851382c978ab2216186b4", + "https://jsr.io/@std/path/0.210.0/_common/strip_trailing_separators.ts": "7ffc7c287e97bdeeee31b155828686967f222cd73f9e5780bfe7dfb1b58c6c65", + "https://jsr.io/@std/path/0.210.0/_common/to_file_url.ts": "a8cdd1633bc9175b7eebd3613266d7c0b6ae0fb0cff24120b6092ac31662f9ae", + "https://jsr.io/@std/path/0.210.0/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", + "https://jsr.io/@std/path/0.210.0/_os.ts": "30b0c2875f360c9296dbe6b7f2d528f0f9c741cecad2e97f803f5219e91b40a2", + "https://jsr.io/@std/path/0.210.0/basename.ts": "04bb5ef3e86bba8a35603b8f3b69537112cdd19ce64b77f2522006da2977a5f3", + "https://jsr.io/@std/path/0.210.0/common.ts": "8fcbd9399cd86e390e4160ea56e5afe7c65310e4152845392903e7b9afce4a3d", + "https://jsr.io/@std/path/0.210.0/dirname.ts": "88a0a71c21debafc4da7a4cd44fd32e899462df458fbca152390887d41c40361", + "https://jsr.io/@std/path/0.210.0/extname.ts": "8c6d6112bce335b4d3d5a07cb0451816d0c2094c147049874fca2db5f707044b", + "https://jsr.io/@std/path/0.210.0/format.ts": "3457530cc85d1b4bab175f9ae73998b34fd456c830d01883169af0681b8894fb", + "https://jsr.io/@std/path/0.210.0/from_file_url.ts": "a45def541616dfe357424708c19a9fe890b170893d77d8f2a1381294249774ce", + "https://jsr.io/@std/path/0.210.0/glob.ts": "a00a81a55c02bbe074ab21a50b6495c6f7795f54cd718c824adaa92c6c9b7419", + "https://jsr.io/@std/path/0.210.0/glob_to_regexp.ts": "74d7448c471e293d03f05ccb968df4365fed6aaa508506b6325a8efdc01d8271", + "https://jsr.io/@std/path/0.210.0/is_absolute.ts": "67232b41b860571c5b7537f4954c88d86ae2ba45e883ee37d3dec27b74909d13", + "https://jsr.io/@std/path/0.210.0/is_glob.ts": "567dce5c6656bdedfc6b3ee6c0833e1e4db2b8dff6e62148e94a917f289c06ad", + "https://jsr.io/@std/path/0.210.0/join.ts": "3ee91038e3eaa966897eddda43d5207d7cae5c2de8a658bdbd722e8f8f29206a", + "https://jsr.io/@std/path/0.210.0/join_globs.ts": "9b84d5103b63d3dbed4b2cf8b12477b2ad415c7d343f1488505162dc0e5f4db8", + "https://jsr.io/@std/path/0.210.0/mod.ts": "7c6fe3556d36492aee78badf4e92cecf67ca747e72d70cac6aac268fb5ccd47f", + "https://jsr.io/@std/path/0.210.0/normalize.ts": "aa95be9a92c7bd4f9dc0ba51e942a1973e2b93d266cd74f5ca751c136d520b66", + "https://jsr.io/@std/path/0.210.0/normalize_glob.ts": "674baa82e1c00b6cb153bbca36e06f8e0337cb8062db6d905ab5de16076ca46b", + "https://jsr.io/@std/path/0.210.0/parse.ts": "d87ff0deef3fb495bc0d862278ff96da5a06acf0625ca27769fc52ac0d3d6ece", + "https://jsr.io/@std/path/0.210.0/posix/_util.ts": "80c8e9b22ec44de0ea718f30738d382fb6278af2db504537dd559b064f762355", + "https://jsr.io/@std/path/0.210.0/posix/basename.ts": "86f4db191cc622da3f674d1cde6f8ad343c14d5fc484ff8feedbc8bba796d7d7", + "https://jsr.io/@std/path/0.210.0/posix/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/posix/dirname.ts": "70c73fd302935a05c0f453ab239bb526fb9ddd06e98d7524ff248a0027e5d4c8", + "https://jsr.io/@std/path/0.210.0/posix/extname.ts": "4b96dc7b8ef6ce156c759a126cbe8a00f8d022476425ad32eef01d16a910caa4", + "https://jsr.io/@std/path/0.210.0/posix/format.ts": "df268803afafeba3df4d20b4b7f287339cb4efcfc6caf55585fb45deda6e718f", + "https://jsr.io/@std/path/0.210.0/posix/from_file_url.ts": "e1ee657d8e993dc7a38c85cda95fa83049c35e75336e09d33810480a24a4120f", + "https://jsr.io/@std/path/0.210.0/posix/glob_to_regexp.ts": "e0ce84c7517db460ea9f99558c190584615fff5cb0ddacad98604e96d81edc1e", + "https://jsr.io/@std/path/0.210.0/posix/is_absolute.ts": "7b139bd0574c2cb4940ca3cdb5070258269d29e01d870a5e42ced4e9553cb7b2", + "https://jsr.io/@std/path/0.210.0/posix/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/posix/join.ts": "d8748c1dca2c199a7d371d31ca7f7ba425a2aad0ce25701375449165a7ef6887", + "https://jsr.io/@std/path/0.210.0/posix/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/posix/mod.ts": "30e9a595bb14869559df577cfacf79a35ece94227e814f5c1fc34c513cf9cc4e", + "https://jsr.io/@std/path/0.210.0/posix/normalize.ts": "b8f962d83e1bd5cd305fa5e34742c2ea4238ebb745a2cf641632bf6a09453456", + "https://jsr.io/@std/path/0.210.0/posix/normalize_glob.ts": "b648aa0d42a0d796eec26329c329c1de7b618e02b062a92085560394190a687a", + "https://jsr.io/@std/path/0.210.0/posix/parse.ts": "1df1f2b311ba07be7a83733444be1bae08f2dbaf70b85a084f67a49ebd05b2cf", + "https://jsr.io/@std/path/0.210.0/posix/relative.ts": "c67d8b2c80ddc978d30dc6e5e35b6eed51dd9de3e75b5f1a22afdf1b4080c60b", + "https://jsr.io/@std/path/0.210.0/posix/resolve.ts": "0de87a7a7032ab739b01620f66b51b7fb2b1dc0c6a7bbd3fb3fd402368673cf6", + "https://jsr.io/@std/path/0.210.0/posix/separator.ts": "0b6573b5f3269a3164d8edc9cefc33a02dd51003731c561008c8bb60220ebac1", + "https://jsr.io/@std/path/0.210.0/posix/to_file_url.ts": "2fc025607330c0e8b0a94bc180c07e517881de00f1c8ea8c3abdd0e70a2a404f", + "https://jsr.io/@std/path/0.210.0/posix/to_namespaced_path.ts": "c9228a0e74fd37e76622cd7b142b8416663a9b87db643302fa0926b5a5c83bdc", + "https://jsr.io/@std/path/0.210.0/relative.ts": "23d45ede8b7ac464a8299663a43488aad6b561414e7cbbe4790775590db6349c", + "https://jsr.io/@std/path/0.210.0/resolve.ts": "5b184efc87155a0af9fa305ff68a109e28de9aee81fc3e77cd01380f19daf867", + "https://jsr.io/@std/path/0.210.0/separator.ts": "1a21ffd408bfaa317bffff604e5a799f78a7a5571590bde6b9cdce7685953d74", + "https://jsr.io/@std/path/0.210.0/to_file_url.ts": "8895a9cd369819c689f8e53131c03277c0c79b56acbe0533b42f2f0b4ead7cbe", + "https://jsr.io/@std/path/0.210.0/to_namespaced_path.ts": "cf8734848aac3c7527d1689d2adf82132b1618eff3cc523a775068847416b22a", + "https://jsr.io/@std/path/0.210.0/windows/_util.ts": "4e44914486b5dc4cca98880693971ea15238c6bae67d8131c39e1112ea427909", + "https://jsr.io/@std/path/0.210.0/windows/basename.ts": "9ae2c0d1df814af9d660fd170c239dde1b66cbdf158185b4fbd7dddccc91bac4", + "https://jsr.io/@std/path/0.210.0/windows/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/windows/dirname.ts": "8be11039908fc7d09ac13e37ad2f31b7b19c0a5d6a238181c46e3ea41b910ac2", + "https://jsr.io/@std/path/0.210.0/windows/extname.ts": "0e22da7b84d0a89b79cc7a2e9c7163ab742fc600a8ffd8ea42aae633a5ac5a30", + "https://jsr.io/@std/path/0.210.0/windows/format.ts": "e3d94cb0f2ca1ed31c268ab6231dbd7478dec3cb7b276ece4421474598b55226", + "https://jsr.io/@std/path/0.210.0/windows/from_file_url.ts": "00d145aa2c793781cdc2740612bf897dac81c18a6c15420fb516e4030269108a", + "https://jsr.io/@std/path/0.210.0/windows/glob_to_regexp.ts": "5cbefcad6ae88294d23faf5b0f4766f4e1a0c2369ca14edae02c3876d1fa1ed9", + "https://jsr.io/@std/path/0.210.0/windows/is_absolute.ts": "16bc7d8aa335780336821158a147dba360127bc648699ea4302719454647e160", + "https://jsr.io/@std/path/0.210.0/windows/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/windows/join.ts": "a5c3ce40827eaac55ef52e791bdd30d8d40c9e748227243ea3185ecfe49a85fc", + "https://jsr.io/@std/path/0.210.0/windows/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/windows/mod.ts": "98e5151661d2cf34a0a291ff16e292e5079e9fb7cd64c93684f3f5a29d217123", + "https://jsr.io/@std/path/0.210.0/windows/normalize.ts": "d5c2da8f188f5ec342695f1284e2585ba50678ba187c8897c566569bbf9e4092", + "https://jsr.io/@std/path/0.210.0/windows/normalize_glob.ts": "db339cfb08e9bb38d49ce005ce318a20d03b77dbb75294a68d050f3d254887ad", + "https://jsr.io/@std/path/0.210.0/windows/parse.ts": "307029d3c69e8310452df48c238993e4ee41cbc8f7b9f4be6c1ad1201658c608", + "https://jsr.io/@std/path/0.210.0/windows/relative.ts": "f79960e8b922ed35197e53d2ae09a95ffdce7844c8430bf782f01f9d721731c7", + "https://jsr.io/@std/path/0.210.0/windows/resolve.ts": "c9111c13cbe521d36e3cb54eaeee146d04b9674ecb0df91aa9536f6bfd97903a", + "https://jsr.io/@std/path/0.210.0/windows/separator.ts": "ae21f27015f10510ed1ac4a0ba9c4c9c967cbdd9d9e776a3e4967553c397bd5d", + "https://jsr.io/@std/path/0.210.0/windows/to_file_url.ts": "2be7e66a8321a66cc382ddbeeaf79e0e962c83688e2e3c4be689276099680298", + "https://jsr.io/@std/path/0.210.0/windows/to_namespaced_path.ts": "e4e6f67f9c0f097f8eb913597064aacadb3abb158735773096d55f8d234f466b", + "https://jsr.io/@std/streams/0.210.0/_common.ts": "3b2c1f0287ce2ad51fff4091a7d0f48375c85b0ec341468e76d5ac13bb0014dd", + "https://jsr.io/@std/streams/0.210.0/buffer.ts": "ef343c8e8d51fe8b3e3b9ef5f08e119a630c0565713884efe54200207b8de513", + "https://jsr.io/@std/streams/0.210.0/byte_slice_stream.ts": "1831fdeb6237ab0404dc612eb78e2fcec9d24cb9cfa9519e4bd36188a81df6e2", + "https://jsr.io/@std/streams/0.210.0/copy.ts": "6a33fdb2c93817e33e5fdd78c8e799b914d09f45ac5608a84b56495c7823fdc6", + "https://jsr.io/@std/streams/0.210.0/delimiter_stream.ts": "db0c1d5852853d6fbb60abda6e2067efd6f121d6668367d7dc571aeecc0f1393", + "https://jsr.io/@std/streams/0.210.0/early_zip_readable_streams.ts": "3adf4c78d52fad18c6f201159b7796317c8082620036dd9a3d990204b5764981", + "https://jsr.io/@std/streams/0.210.0/iterate_reader.ts": "12b4d47ca6540a8feab09599828f59a44d431dc1a9c779d54f4d544185e5c326", + "https://jsr.io/@std/streams/0.210.0/limited_bytes_transform_stream.ts": "43c91a66ac7c3066133d007e4a25b802667d80d84c3de221d18a67167c3088e3", + "https://jsr.io/@std/streams/0.210.0/limited_transform_stream.ts": "584af31000cb4dc970d8244c41b2b3b3a6e3f9a078fceefea8c4312c8aee6e51", + "https://jsr.io/@std/streams/0.210.0/merge_readable_streams.ts": "e69a985ac1d4e24d29476c134f2ceb2b517b528649fd4ad8f66b887dbf65a8cf", + "https://jsr.io/@std/streams/0.210.0/mod.ts": "e133c271474f1e9dc19f5c4959406f5c2101540c56a3e7d7abc6bdb7bcef807e", + "https://jsr.io/@std/streams/0.210.0/read_all.ts": "c4c8b499668a7225fcb898274ec00374cf7b331e0d14dfe9bf44da03644a968c", + "https://jsr.io/@std/streams/0.210.0/readable_stream_from_reader.ts": "3d5bfd2567560557291ac6b01f0b045cd2336e3ebdb1f8c6c46726121585752c", + "https://jsr.io/@std/streams/0.210.0/reader_from_iterable.ts": "cbe640306618c4a61b2e43a710b1c89336c343e627f97b03bc5aa2c78a9c97a4", + "https://jsr.io/@std/streams/0.210.0/reader_from_stream_reader.ts": "56ef51217a464551e8efdc65a4c28c6d14148fbfd23ed88401732c50fcb3cf3d", + "https://jsr.io/@std/streams/0.210.0/text_delimiter_stream.ts": "00158278225105fedbadc0cbe5bf0e7d70cb2cf062eb48b4f5db694ba3a2dd61", + "https://jsr.io/@std/streams/0.210.0/text_line_stream.ts": "a74dc71908ebde4bf4d186b6d4be64475d7e43269a44e29c2d38984692501f03", + "https://jsr.io/@std/streams/0.210.0/to_array_buffer.ts": "c1322d7d8601f3e7516f2e1fc391a278b23d13ecd0213b44f4de63f9bdefa227", + "https://jsr.io/@std/streams/0.210.0/to_blob.ts": "0f5750b41e92abeeac81008e6df848206a0b83caf74d398da717d65cbb86a786", + "https://jsr.io/@std/streams/0.210.0/to_json.ts": "8986526388c2520c89abeba59fac3e1b6eaeee630f2bc271da0ba48cc24281c1", + "https://jsr.io/@std/streams/0.210.0/to_text.ts": "914a799c0e931d1f94cb8762d3909e3d9abdd15f20d7136ba2c848128825d8e6", + "https://jsr.io/@std/streams/0.210.0/to_transform_stream.ts": "59ff4acbd3a071daef6ad658213a7a7bac0cb33491b10e96210fb040e870a7c0", + "https://jsr.io/@std/streams/0.210.0/writable_stream_from_writer.ts": "6536e7aa2201e42730f24c901f27376edb092751d1aba6592ff5926c00537998", + "https://jsr.io/@std/streams/0.210.0/write_all.ts": "f96c63b2ab49ce4b7404250e53e0e02b15d499d8e67e950718280252888aae1d", + "https://jsr.io/@std/streams/0.210.0/writer_from_stream_writer.ts": "1e442c1523abf3343070edb598b9f71650ee375b53e7b1c8c41d1a2f1dc16a8b", + "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638" + }, + "workspaces": { + "deps": [ + "jsr:@dsherret/dax" + ] + } +} + +# remove dax +{ + "deps": [ + ] +} + +# output +{ + "version": "3", + "remote": {}, + "workspaces": { + "deps": [] + } +} From 50430985a9dea8a567eef7e7238d21d328645646 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:13:24 -0500 Subject: [PATCH 10/38] Add another test --- .../ShiftingDepsDifferentPackage.txt | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 tests/specs/config_changes/ShiftingDepsDifferentPackage.txt diff --git a/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt b/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt new file mode 100644 index 0000000..1837264 --- /dev/null +++ b/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt @@ -0,0 +1,120 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@dsherret/dax": "jsr:@dsherret/dax@0.0.1", + "jsr:@dsherret/which@0.0.1": "jsr:@dsherret/which@0.0.1" + }, + "jsr": { + "@dsherret/dax@0.0.1": { + "dependencies": [ + "jsr:@dsherret/which@0.0.1" + ] + }, + "@dsherret/which@0.0.1": { + "dependencies": [] + } + } + }, + "remote": { + "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" + }, + "workspaces": { + "deps": [ + "jsr:@dsherret/dax" + ] + } +} + +# move to workspace member +{ + "deps": [], + "members": { + "package_a": { + "deps": [ + "jsr:@dsherret/dax" + ] + } + } +} + +# output +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@dsherret/dax": "jsr:@dsherret/dax@0.0.1", + "jsr:@dsherret/which@0.0.1": "jsr:@dsherret/which@0.0.1" + }, + "jsr": { + "@dsherret/dax@0.0.1": { + "dependencies": [ + "jsr:@dsherret/which@0.0.1" + ] + }, + "@dsherret/which@0.0.1": { + "dependencies": [] + } + } + }, + "remote": { + "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" + }, + "workspaces": { + "deps": [], + "members": { + "package_a": { + "deps": [ + "jsr:@dsherret/dax" + ] + } + } + } +} + +# change to be in a different package +{ + "deps": [], + "members": { + "package_b": { + "deps": [ + "jsr:@dsherret/dax" + ] + } + } +} + +# output +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@dsherret/dax": "jsr:@dsherret/dax@0.0.1", + "jsr:@dsherret/which@0.0.1": "jsr:@dsherret/which@0.0.1" + }, + "jsr": { + "@dsherret/dax@0.0.1": { + "dependencies": [ + "jsr:@dsherret/which@0.0.1" + ] + }, + "@dsherret/which@0.0.1": { + "dependencies": [] + } + } + }, + "remote": { + "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" + }, + "workspaces": { + "deps": [], + "members": { + "package_b": { + "deps": [ + "jsr:@dsherret/dax" + ] + } + } + } +} From 8d84292f95e2a70bb4284f348f72935148daab2e Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:29:33 -0500 Subject: [PATCH 11/38] Fixes --- src/graphs.rs | 33 ++++++----- src/lib.rs | 34 ++++++----- tests/integration_test.rs | 5 +- .../config_changes/RemovingOakThenDax.txt | 57 +++++++------------ .../ShiftingDepsDifferentPackage.txt | 21 +++---- 5 files changed, 71 insertions(+), 79 deletions(-) diff --git a/src/graphs.rs b/src/graphs.rs index d49b9c8..e0ac048 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -43,6 +43,7 @@ struct LockfileNpmGraphPackage { dependencies: BTreeMap, } +#[derive(Default)] struct LockfileJsrGraphPackage { reference_count: usize, dependencies: BTreeSet, @@ -73,26 +74,30 @@ impl LockfilePackageGraph { LockfilePkgId::Npm(LockfileNpmPackageId(value.to_string())), ); } else if let Some(value) = value.strip_prefix("jsr:") { - root_packages.insert( - LockfilePkgReq(key.to_string()), - LockfilePkgId::Jsr(LockfileJsrPkgNv(value.to_string())), - ); + let nv = LockfilePkgId::Jsr(LockfileJsrPkgNv(value.to_string())); + root_packages.insert(LockfilePkgReq(key.to_string()), nv.clone()); } } let mut packages = HashMap::new(); - for (nv, package) in &content.jsr { - packages.insert( - LockfilePkgId::Jsr(LockfileJsrPkgNv(nv.clone())), - LockfileGraphPackage::Jsr(LockfileJsrGraphPackage { - reference_count: 0, - dependencies: package - .dependencies + for (nv, content_package) in &content.jsr { + let new_deps = &content_package.dependencies; + let package = packages + .entry(LockfilePkgId::Jsr(LockfileJsrPkgNv(nv.clone()))) + .or_insert_with(|| { + LockfileGraphPackage::Jsr(LockfileJsrGraphPackage::default()) + }); + match package { + LockfileGraphPackage::Jsr(package) => { + package.dependencies = new_deps .iter() .map(|req| LockfilePkgReq(req.clone())) - .collect(), - }), - ); + .collect(); + } + LockfileGraphPackage::Npm(_) => { + debug_assert!(false, "Unexpected npm package: {:?}", nv) + } + } } for (id, package) in &content.npm { packages.insert( diff --git a/src/lib.rs b/src/lib.rs index 23ffb62..db2ee29 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,7 +39,7 @@ pub struct WorkspaceConfig { #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WorkspaceMemberConfig { #[serde(default)] - pub deps: Option>, + pub dependencies: Option>, #[serde(default)] pub package_json_deps: Option>, } @@ -107,6 +107,8 @@ pub struct JsrPackageInfo { /// List of package requirements found in the dependency. /// /// This is used to tell when a package can be removed from the lockfile. + #[serde(skip_serializing_if = "BTreeSet::is_empty")] + #[serde(default)] pub dependencies: BTreeSet, } @@ -167,14 +169,14 @@ impl PackagesContent { #[serde(rename_all = "camelCase")] struct LockfilePackageJsonContent { #[serde(default)] - deps: BTreeSet, + dependencies: BTreeSet, } #[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] #[serde(rename_all = "camelCase")] struct WorkspaceMemberConfigContent { #[serde(default)] - deps: Option>, + dependencies: Option>, #[serde(skip_serializing_if = "Option::is_none")] #[serde(default)] package_json: Option, @@ -182,16 +184,16 @@ struct WorkspaceMemberConfigContent { impl WorkspaceMemberConfigContent { pub fn is_empty(&self) -> bool { - self.deps.is_none() && self.package_json.is_none() + self.dependencies.is_none() && self.package_json.is_none() } pub fn dep_reqs(&self) -> impl Iterator { self .package_json .as_ref() - .map(|s| s.deps.iter()) + .map(|s| s.dependencies.iter()) .into_iter() - .chain(self.deps.as_ref().map(|s| s.iter())) + .chain(self.dependencies.as_ref().map(|s| s.iter())) .flatten() } } @@ -353,8 +355,8 @@ impl Lockfile { current: &mut WorkspaceMemberConfigContent, new: WorkspaceMemberConfig, ) { - if let Some(new_deps) = new.deps { - match &mut current.deps { + if let Some(new_deps) = new.dependencies { + match &mut current.dependencies { Some(current_deps) => { if new_deps != *current_deps { let old_deps = std::mem::replace(current_deps, new_deps); @@ -365,7 +367,7 @@ impl Lockfile { } } None => { - current.deps = Some(new_deps); + current.dependencies = Some(new_deps); *has_content_changed = true; } } @@ -376,7 +378,8 @@ impl Lockfile { if let Some(new_package_json_deps) = new.package_json_deps { match &mut current.package_json { Some(current_package_json) => { - let current_package_json_deps = &mut current_package_json.deps; + let current_package_json_deps = + &mut current_package_json.dependencies; if new_package_json_deps != *current_package_json_deps { // update self.content.package_json let old_package_json_deps = std::mem::replace( @@ -391,7 +394,7 @@ impl Lockfile { } None => { current.package_json = Some(LockfilePackageJsonContent { - deps: new_package_json_deps, + dependencies: new_package_json_deps, }); *has_content_changed = true; } @@ -411,8 +414,8 @@ impl Lockfile { let mut removed_deps = HashSet::new(); // clear out any jsr packages when someone adds an import map - if self.content.workspaces.root.deps.is_none() - && options.config.root.deps.is_some() + if self.content.workspaces.root.dependencies.is_none() + && options.config.root.dependencies.is_some() { self.content.packages.clear_jsr() } @@ -614,6 +617,11 @@ impl Lockfile { name: String, deps: impl Iterator, ) { + let mut deps = deps.peekable(); + if deps.peek().is_none() { + return; // skip, don't bother adding + } + let package = self.content.packages.jsr.entry(name).or_default(); let start_count = package.dependencies.len(); package.dependencies.extend(deps); diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 3a667cf..78e18ef 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -41,8 +41,9 @@ fn config_changes() { assert_eq!( actual_text.trim(), expected_text.trim(), - "Failed for: {}", - spec.path.display() + "Failed for: {} - {}", + spec.path.display(), + change_and_output.change.title, ); } } diff --git a/tests/specs/config_changes/RemovingOakThenDax.txt b/tests/specs/config_changes/RemovingOakThenDax.txt index de97f86..ef8f051 100644 --- a/tests/specs/config_changes/RemovingOakThenDax.txt +++ b/tests/specs/config_changes/RemovingOakThenDax.txt @@ -26,6 +26,8 @@ "jsr:@std/path@^0.210.0": "jsr:@std/path@0.210.0", "jsr:@std/streams@0.210": "jsr:@std/streams@0.210.0", "jsr:@std/streams@0.210.0": "jsr:@std/streams@0.210.0", + "jsr:@zome_unreferenced/package": "jsr:@zome_unreferenced/package@0.1.0", + "jsr:@zome_unreferenced/package_b": "jsr:@zome_unreferenced/package_b@0.1.0", "npm:path-to-regexp@6.2.1": "npm:path-to-regexp@6.2.1" }, "npm": { @@ -45,9 +47,6 @@ "jsr:@std/streams@0.210.0" ] }, - "@dsherret/which@0.0.1": { - "dependencies": [] - }, "@oak/commons@0.4.0": { "dependencies": [ "jsr:@std/assert@0.210" @@ -67,24 +66,12 @@ "npm:path-to-regexp@6.2.1" ] }, - "@std/assert@0.210.0": { - "dependencies": [] - }, - "@std/bytes@0.210.0": { - "dependencies": [] - }, "@std/crypto@0.210.0": { "dependencies": [ "jsr:@std/assert@^0.210.0", "jsr:@std/encoding@^0.210.0" ] }, - "@std/encoding@0.210.0": { - "dependencies": [] - }, - "@std/fmt@0.210.0": { - "dependencies": [] - }, "@std/fs@0.210.0": { "dependencies": [ "jsr:@std/assert@^0.210.0", @@ -103,9 +90,6 @@ "jsr:@std/bytes@^0.210.0" ] }, - "@std/media_types@0.210.0": { - "dependencies": [] - }, "@std/path@0.210.0": { "dependencies": [ "jsr:@std/assert@^0.210.0" @@ -117,6 +101,11 @@ "jsr:@std/bytes@^0.210.0", "jsr:@std/io@^0.210.0" ] + }, + "jsr:@zome_unreferenced/package@0.1.0": { + "dependencies": [ + "jsr:@zome_unreferenced/package_b" + ] } } }, @@ -365,10 +354,11 @@ "https://jsr.io/@std/streams/0.210.0/writable_stream_from_writer.ts": "6536e7aa2201e42730f24c901f27376edb092751d1aba6592ff5926c00537998", "https://jsr.io/@std/streams/0.210.0/write_all.ts": "f96c63b2ab49ce4b7404250e53e0e02b15d499d8e67e950718280252888aae1d", "https://jsr.io/@std/streams/0.210.0/writer_from_stream_writer.ts": "1e442c1523abf3343070edb598b9f71650ee375b53e7b1c8c41d1a2f1dc16a8b", - "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638" + "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638", + "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" }, "workspaces": { - "deps": [ + "dependencies": [ "jsr:@dsherret/dax", "jsr:@oak/oak" ] @@ -377,7 +367,7 @@ # remove oak { - "deps": [ + "dependencies": [ "jsr:@dsherret/dax" ] } @@ -415,18 +405,6 @@ "jsr:@std/streams@0.210.0" ] }, - "@dsherret/which@0.0.1": { - "dependencies": [] - }, - "@std/assert@0.210.0": { - "dependencies": [] - }, - "@std/bytes@0.210.0": { - "dependencies": [] - }, - "@std/fmt@0.210.0": { - "dependencies": [] - }, "@std/fs@0.210.0": { "dependencies": [ "jsr:@std/assert@^0.210.0", @@ -643,10 +621,11 @@ "https://jsr.io/@std/streams/0.210.0/writable_stream_from_writer.ts": "6536e7aa2201e42730f24c901f27376edb092751d1aba6592ff5926c00537998", "https://jsr.io/@std/streams/0.210.0/write_all.ts": "f96c63b2ab49ce4b7404250e53e0e02b15d499d8e67e950718280252888aae1d", "https://jsr.io/@std/streams/0.210.0/writer_from_stream_writer.ts": "1e442c1523abf3343070edb598b9f71650ee375b53e7b1c8c41d1a2f1dc16a8b", - "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638" + "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638", + "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" }, "workspaces": { - "deps": [ + "dependencies": [ "jsr:@dsherret/dax" ] } @@ -654,15 +633,17 @@ # remove dax { - "deps": [ + "dependencies": [ ] } # output { "version": "3", - "remote": {}, + "remote": { + "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" + }, "workspaces": { - "deps": [] + "dependencies": [] } } diff --git a/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt b/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt index 1837264..dd28276 100644 --- a/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt +++ b/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt @@ -11,9 +11,6 @@ "dependencies": [ "jsr:@dsherret/which@0.0.1" ] - }, - "@dsherret/which@0.0.1": { - "dependencies": [] } } }, @@ -21,7 +18,7 @@ "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" }, "workspaces": { - "deps": [ + "dependencies": [ "jsr:@dsherret/dax" ] } @@ -29,10 +26,10 @@ # move to workspace member { - "deps": [], + "dependencies": [], "members": { "package_a": { - "deps": [ + "dependencies": [ "jsr:@dsherret/dax" ] } @@ -62,10 +59,10 @@ "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" }, "workspaces": { - "deps": [], + "dependencies": [], "members": { "package_a": { - "deps": [ + "dependencies": [ "jsr:@dsherret/dax" ] } @@ -75,10 +72,10 @@ # change to be in a different package { - "deps": [], + "dependencies": [], "members": { "package_b": { - "deps": [ + "dependencies": [ "jsr:@dsherret/dax" ] } @@ -108,10 +105,10 @@ "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" }, "workspaces": { - "deps": [], + "dependencies": [], "members": { "package_b": { - "deps": [ + "dependencies": [ "jsr:@dsherret/dax" ] } From 87e4c3d0f175ae4d9d6913a7337f5d59c2e9c2c7 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:32:45 -0500 Subject: [PATCH 12/38] Update --- tests/helpers/mod.rs | 21 ++++++++++++++++--- .../ShiftingDepsDifferentPackage.txt | 6 ------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/tests/helpers/mod.rs b/tests/helpers/mod.rs index ad0d398..d536576 100644 --- a/tests/helpers/mod.rs +++ b/tests/helpers/mod.rs @@ -40,17 +40,32 @@ impl ConfigChangeSpec { let mut lines = text.split('\n').peekable(); let original_text = SpecFile { - title: lines.next().unwrap().to_string(), + title: lines + .next() + .unwrap() + .strip_prefix("# ") + .unwrap() + .to_string(), text: take_next(&mut lines), }; let mut change_and_outputs = Vec::new(); while lines.peek().is_some() { let change = SpecFile { - title: lines.next().unwrap().to_string(), + title: lines + .next() + .unwrap() + .strip_prefix("# ") + .unwrap() + .to_string(), text: take_next(&mut lines), }; let output = SpecFile { - title: lines.next().unwrap().to_string(), + title: lines + .next() + .unwrap() + .strip_prefix("# ") + .unwrap() + .to_string(), text: take_next(&mut lines), }; change_and_outputs.push(ChangeAndOutput { change, output }); diff --git a/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt b/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt index dd28276..9d03c36 100644 --- a/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt +++ b/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt @@ -49,9 +49,6 @@ "dependencies": [ "jsr:@dsherret/which@0.0.1" ] - }, - "@dsherret/which@0.0.1": { - "dependencies": [] } } }, @@ -95,9 +92,6 @@ "dependencies": [ "jsr:@dsherret/which@0.0.1" ] - }, - "@dsherret/which@0.0.1": { - "dependencies": [] } } }, From cba71686483d14c39c7f82cb7e364065a574b0dc Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:33:48 -0500 Subject: [PATCH 13/38] Fix --- src/graphs.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/graphs.rs b/src/graphs.rs index e0ac048..accc1fe 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -67,6 +67,7 @@ impl LockfilePackageGraph { content.specifiers.len(), ); // collect the specifiers to version mappings + let mut packages = HashMap::new(); for (key, value) in &content.specifiers { if let Some(value) = value.strip_prefix("npm:") { root_packages.insert( @@ -76,10 +77,13 @@ impl LockfilePackageGraph { } else if let Some(value) = value.strip_prefix("jsr:") { let nv = LockfilePkgId::Jsr(LockfileJsrPkgNv(value.to_string())); root_packages.insert(LockfilePkgReq(key.to_string()), nv.clone()); + packages.insert( + nv, + LockfileGraphPackage::Jsr(LockfileJsrGraphPackage::default()), + ); } } - let mut packages = HashMap::new(); for (nv, content_package) in &content.jsr { let new_deps = &content_package.dependencies; let package = packages From 8433aaabb04c8ad25d36656f1147353c63c40160 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:38:48 -0500 Subject: [PATCH 14/38] Fixes --- src/graphs.rs | 33 ++++++++++--------- tests/helpers/mod.rs | 2 +- .../config_changes/RemovingOakThenDax.txt | 22 ++++++++++++- 3 files changed, 39 insertions(+), 18 deletions(-) diff --git a/src/graphs.rs b/src/graphs.rs index accc1fe..0e2f21e 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -98,9 +98,7 @@ impl LockfilePackageGraph { .map(|req| LockfilePkgReq(req.clone())) .collect(); } - LockfileGraphPackage::Npm(_) => { - debug_assert!(false, "Unexpected npm package: {:?}", nv) - } + LockfileGraphPackage::Npm(_) => unreachable!(), } } for (id, package) in &content.npm { @@ -247,22 +245,25 @@ impl LockfilePackageGraph { }, ); } + for (id, package) in self.packages { match package { LockfileGraphPackage::Jsr(package) => { - packages.jsr.insert( - match id { - LockfilePkgId::Jsr(nv) => nv.0, - LockfilePkgId::Npm(_) => unreachable!(), - }, - crate::JsrPackageInfo { - dependencies: package - .dependencies - .into_iter() - .map(|req| req.0) - .collect(), - }, - ); + if !package.dependencies.is_empty() { + packages.jsr.insert( + match id { + LockfilePkgId::Jsr(nv) => nv.0, + LockfilePkgId::Npm(_) => unreachable!(), + }, + crate::JsrPackageInfo { + dependencies: package + .dependencies + .into_iter() + .map(|req| req.0) + .collect(), + }, + ); + } } LockfileGraphPackage::Npm(package) => { packages.npm.insert( diff --git a/tests/helpers/mod.rs b/tests/helpers/mod.rs index d536576..47973b9 100644 --- a/tests/helpers/mod.rs +++ b/tests/helpers/mod.rs @@ -95,7 +95,7 @@ pub struct SpecFile { impl SpecFile { pub fn emit(&self) -> String { - format!("# {}\n{}\n", self.title, self.text) + format!("# {}\n{}", self.title, self.text) } } diff --git a/tests/specs/config_changes/RemovingOakThenDax.txt b/tests/specs/config_changes/RemovingOakThenDax.txt index ef8f051..3e5bf9c 100644 --- a/tests/specs/config_changes/RemovingOakThenDax.txt +++ b/tests/specs/config_changes/RemovingOakThenDax.txt @@ -392,7 +392,9 @@ "jsr:@std/path@0.210.0": "jsr:@std/path@0.210.0", "jsr:@std/path@^0.210.0": "jsr:@std/path@0.210.0", "jsr:@std/streams@0.210": "jsr:@std/streams@0.210.0", - "jsr:@std/streams@0.210.0": "jsr:@std/streams@0.210.0" + "jsr:@std/streams@0.210.0": "jsr:@std/streams@0.210.0", + "jsr:@zome_unreferenced/package": "jsr:@zome_unreferenced/package@0.1.0", + "jsr:@zome_unreferenced/package_b": "jsr:@zome_unreferenced/package_b@0.1.0" }, "jsr": { "@dsherret/dax@0.0.1": { @@ -428,6 +430,11 @@ "jsr:@std/bytes@^0.210.0", "jsr:@std/io@^0.210.0" ] + }, + "jsr:@zome_unreferenced/package@0.1.0": { + "dependencies": [ + "jsr:@zome_unreferenced/package_b" + ] } } }, @@ -640,6 +647,19 @@ # output { "version": "3", + "packages": { + "specifiers": { + "jsr:@zome_unreferenced/package": "jsr:@zome_unreferenced/package@0.1.0", + "jsr:@zome_unreferenced/package_b": "jsr:@zome_unreferenced/package_b@0.1.0" + }, + "jsr": { + "jsr:@zome_unreferenced/package@0.1.0": { + "dependencies": [ + "jsr:@zome_unreferenced/package_b" + ] + } + } + }, "remote": { "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" }, From 2bf810743b3de9358064a8d16b5d2681dac30f5b Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:39:15 -0500 Subject: [PATCH 15/38] Update --- ...ferentPackage.txt => ShiftingDepsDifferentWorkspaceMember.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/specs/config_changes/{ShiftingDepsDifferentPackage.txt => ShiftingDepsDifferentWorkspaceMember.txt} (100%) diff --git a/tests/specs/config_changes/ShiftingDepsDifferentPackage.txt b/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt similarity index 100% rename from tests/specs/config_changes/ShiftingDepsDifferentPackage.txt rename to tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt From 03f3faced39c7c83037220d6cca588db5e388c03 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:42:11 -0500 Subject: [PATCH 16/38] Test how reseting to the same should not change the config --- Cargo.lock | 90 ------------------- Cargo.toml | 4 - tests/integration_test.rs | 12 +++ .../config_changes/RemovingOakThenDax.txt | 1 - .../ShiftingDepsDifferentWorkspaceMember.txt | 1 - 5 files changed, 12 insertions(+), 96 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8242f62..af0624c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,7 +21,6 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" name = "deno_lockfile" version = "0.17.2" dependencies = [ - "deno_semver", "indexmap", "pretty_assertions", "ring", @@ -31,17 +30,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "deno_semver" -version = "0.5.2" -dependencies = [ - "monch", - "once_cell", - "serde", - "thiserror", - "url", -] - [[package]] name = "diff" version = "0.1.13" @@ -54,15 +42,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - [[package]] name = "getrandom" version = "0.2.10" @@ -80,16 +59,6 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "indexmap" version = "2.1.0" @@ -113,24 +82,6 @@ version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" -[[package]] -name = "monch" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b52c1b33ff98142aecea13138bd399b68aa7ab5d9546c300988c345004001eea" - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - [[package]] name = "pretty_assertions" version = "1.4.0" @@ -253,59 +204,18 @@ dependencies = [ "syn", ] -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "unicode-bidi" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" - [[package]] name = "unicode-ident" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - [[package]] name = "untrusted" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index 8c427f4..2bd9f69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,11 +13,7 @@ ring = "^0.17.0" serde = { version = "1.0.149", features = ["derive"] } serde_json = "1.0.85" thiserror = "1.0.40" -deno_semver = "0.5.2" [dev-dependencies] pretty_assertions = "1.4.0" temp-dir = "0.1.11" - -[patch.crates-io] -deno_semver = { path = "../deno_semver" } diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 78e18ef..9c019d4 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -29,10 +29,22 @@ fn config_changes() { ) .unwrap(); for change_and_output in &mut spec.change_and_outputs { + // setting the new workspace config should change the has_content_changed flag + config_file.has_content_changed = false; config_file.set_workspace_config(SetWorkspaceConfigOptions { config: serde_json::from_str(&change_and_output.change.text).unwrap(), nv_to_jsr_url, }); + assert!(config_file.has_content_changed); + + // now try resetting it and the flag should remain the same + config_file.has_content_changed = false; + config_file.set_workspace_config(SetWorkspaceConfigOptions { + config: serde_json::from_str(&change_and_output.change.text).unwrap(), + nv_to_jsr_url, + }); + assert!(!config_file.has_content_changed); + let expected_text = change_and_output.output.text.clone(); let actual_text = config_file.as_json_string(); if is_update { diff --git a/tests/specs/config_changes/RemovingOakThenDax.txt b/tests/specs/config_changes/RemovingOakThenDax.txt index 3e5bf9c..c8bf32a 100644 --- a/tests/specs/config_changes/RemovingOakThenDax.txt +++ b/tests/specs/config_changes/RemovingOakThenDax.txt @@ -637,7 +637,6 @@ ] } } - # remove dax { "dependencies": [ diff --git a/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt b/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt index 9d03c36..3a92ccb 100644 --- a/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt +++ b/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt @@ -66,7 +66,6 @@ } } } - # change to be in a different package { "dependencies": [], From e4a4210dd7d74657167369fb5e9ead1ff0486153 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:43:33 -0500 Subject: [PATCH 17/38] Revert --- tests/specs/config_changes/RemovingOakThenDax.txt | 1 + .../config_changes/ShiftingDepsDifferentWorkspaceMember.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/specs/config_changes/RemovingOakThenDax.txt b/tests/specs/config_changes/RemovingOakThenDax.txt index c8bf32a..3e5bf9c 100644 --- a/tests/specs/config_changes/RemovingOakThenDax.txt +++ b/tests/specs/config_changes/RemovingOakThenDax.txt @@ -637,6 +637,7 @@ ] } } + # remove dax { "dependencies": [ diff --git a/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt b/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt index 3a92ccb..9d03c36 100644 --- a/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt +++ b/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt @@ -66,6 +66,7 @@ } } } + # change to be in a different package { "dependencies": [], From c5bcd36dc1c91571f3cb9bde9aed0361f553b35a Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:48:59 -0500 Subject: [PATCH 18/38] Fix emitting --- tests/helpers/mod.rs | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/tests/helpers/mod.rs b/tests/helpers/mod.rs index 47973b9..9b227e4 100644 --- a/tests/helpers/mod.rs +++ b/tests/helpers/mod.rs @@ -22,6 +22,15 @@ impl ConfigChangeSpec { } fn parse(path: PathBuf, text: &str) -> Self { + fn take_header<'a>(lines: &mut impl Iterator) -> String { + lines + .next() + .unwrap() + .strip_prefix("# ") + .unwrap() + .to_string() + } + fn take_next<'a>( lines: &mut Peekable>, ) -> String { @@ -40,32 +49,17 @@ impl ConfigChangeSpec { let mut lines = text.split('\n').peekable(); let original_text = SpecFile { - title: lines - .next() - .unwrap() - .strip_prefix("# ") - .unwrap() - .to_string(), + title: take_header(&mut lines), text: take_next(&mut lines), }; let mut change_and_outputs = Vec::new(); while lines.peek().is_some() { let change = SpecFile { - title: lines - .next() - .unwrap() - .strip_prefix("# ") - .unwrap() - .to_string(), + title: take_header(&mut lines), text: take_next(&mut lines), }; let output = SpecFile { - title: lines - .next() - .unwrap() - .strip_prefix("# ") - .unwrap() - .to_string(), + title: take_header(&mut lines), text: take_next(&mut lines), }; change_and_outputs.push(ChangeAndOutput { change, output }); @@ -80,7 +74,10 @@ impl ConfigChangeSpec { pub fn emit(&self) -> String { let mut text = String::new(); text.push_str(&self.original_text.emit()); - for change_and_output in &self.change_and_outputs { + for (i, change_and_output) in self.change_and_outputs.iter().enumerate() { + if i > 0 { + text.push('\n'); + } text.push_str(&change_and_output.change.emit()); text.push_str(&change_and_output.output.emit()); } From 37e4809d0c901efb397fa5cd1574fd655dce63ef Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 17:51:35 -0500 Subject: [PATCH 19/38] Setup test file --- tests/specs/config_changes/CircularJsrDep.txt | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/specs/config_changes/CircularJsrDep.txt diff --git a/tests/specs/config_changes/CircularJsrDep.txt b/tests/specs/config_changes/CircularJsrDep.txt new file mode 100644 index 0000000..06a9b79 --- /dev/null +++ b/tests/specs/config_changes/CircularJsrDep.txt @@ -0,0 +1,46 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspaces": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } +} + +# remove dependency +{ + "dependencies": [ + ] +} + +# output +{ + "version": "3", + "remote": {}, + "workspaces": { + "dependencies": [] + } +} From 61ca625f2dc4b2a1be0e8e3b9e1307cbda0c5550 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 18:34:16 -0500 Subject: [PATCH 20/38] Handle circular dependencies --- src/graphs.rs | 91 ++++++++++--------- tests/helpers/mod.rs | 16 +++- ...ircularJsrDep.txt => CircularJsrDep01.txt} | 0 .../specs/config_changes/CircularJsrDep02.txt | 53 +++++++++++ 4 files changed, 115 insertions(+), 45 deletions(-) rename tests/specs/config_changes/{CircularJsrDep.txt => CircularJsrDep01.txt} (100%) create mode 100644 tests/specs/config_changes/CircularJsrDep02.txt diff --git a/src/graphs.rs b/src/graphs.rs index 0e2f21e..3855af7 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -38,14 +38,14 @@ enum LockfileGraphPackage { } struct LockfileNpmGraphPackage { - reference_count: usize, + root_ids: HashSet, integrity: String, dependencies: BTreeMap, } #[derive(Default)] struct LockfileJsrGraphPackage { - reference_count: usize, + root_ids: HashSet, dependencies: BTreeSet, } @@ -105,7 +105,7 @@ impl LockfilePackageGraph { packages.insert( LockfilePkgId::Npm(LockfileNpmPackageId(id.clone())), LockfileGraphPackage::Npm(LockfileNpmGraphPackage { - reference_count: 0, + root_ids: Default::default(), integrity: package.integrity.clone(), dependencies: package .dependencies @@ -118,8 +118,8 @@ impl LockfilePackageGraph { ); } - let mut visited = HashSet::new(); - let mut pending = old_config_file_packages + // trace every root identifier through the graph finding all the corresponding packages + let mut root_ids = old_config_file_packages .filter_map(|value| { content.specifiers.get(value).and_then(|value| { #[allow(clippy::manual_map)] // not easier to read @@ -132,25 +132,27 @@ impl LockfilePackageGraph { } }) }) - .collect::>(); - while let Some(id) = pending.pop_back() { - if let Some(package) = packages.get_mut(&id) { - match package { - LockfileGraphPackage::Jsr(package) => { - package.reference_count += 1; - if visited.insert(id) { - for req in &package.dependencies { - if let Some(nv) = root_packages.get(req) { - pending.push_back(nv.clone()); + .collect::>(); + + while let Some(root_id) = root_ids.pop() { + let mut pending = VecDeque::from([root_id.clone()]); + while let Some(id) = pending.pop_back() { + if let Some(package) = packages.get_mut(&id) { + match package { + LockfileGraphPackage::Jsr(package) => { + if package.root_ids.insert(root_id.clone()) { + for req in &package.dependencies { + if let Some(nv) = root_packages.get(req) { + pending.push_back(nv.clone()); + } } } } - } - LockfileGraphPackage::Npm(package) => { - package.reference_count += 1; - if visited.insert(id) { - for dep_id in package.dependencies.values() { - pending.push_back(LockfilePkgId::Npm(dep_id.clone())); + LockfileGraphPackage::Npm(package) => { + if package.root_ids.insert(root_id.clone()) { + for dep_id in package.dependencies.values() { + pending.push_back(LockfilePkgId::Npm(dep_id.clone())); + } } } } @@ -169,7 +171,7 @@ impl LockfilePackageGraph { &mut self, package_reqs: impl Iterator, ) { - let mut pending = VecDeque::new(); + let mut root_ids = Vec::new(); let mut pending_reqs = package_reqs.map(LockfilePkgReq).collect::>(); let mut visited_root_packages = @@ -191,35 +193,36 @@ impl LockfilePackageGraph { } } } - pending.push_back(id.clone()); + root_ids.push(id.clone()); } } - while let Some(id) = pending.pop_back() { - if let Some(package) = self.packages.get_mut(&id) { - match package { - LockfileGraphPackage::Jsr(package) => { - if package.reference_count > 1 { - package.reference_count -= 1; - } else { - debug_assert_eq!(package.reference_count, 1, "Package: {:?}", id); - for req in &package.dependencies { - if let Some(id) = self.root_packages.get(req) { - pending.push_back(id.clone()); + while let Some(root_id) = root_ids.pop() { + let mut pending = VecDeque::from([root_id.clone()]); + while let Some(id) = pending.pop_back() { + if let Some(package) = self.packages.get_mut(&id) { + match package { + LockfileGraphPackage::Jsr(package) => { + if package.root_ids.remove(&root_id) { + for req in &package.dependencies { + if let Some(id) = self.root_packages.get(req) { + pending.push_back(id.clone()); + } + } + if package.root_ids.is_empty() { + self.remove_package(id); } } - self.remove_package(id); } - } - LockfileGraphPackage::Npm(package) => { - if package.reference_count > 1 { - package.reference_count -= 1; - } else { - debug_assert_eq!(package.reference_count, 1, "Package: {:?}", id); - for dep_id in package.dependencies.values() { - pending.push_back(LockfilePkgId::Npm(dep_id.clone())); + LockfileGraphPackage::Npm(package) => { + if package.root_ids.remove(&root_id) { + for dep_id in package.dependencies.values() { + pending.push_back(LockfilePkgId::Npm(dep_id.clone())); + } + if package.root_ids.is_empty() { + self.remove_package(id); + } } - self.remove_package(id); } } } diff --git a/tests/helpers/mod.rs b/tests/helpers/mod.rs index 9b227e4..e07c824 100644 --- a/tests/helpers/mod.rs +++ b/tests/helpers/mod.rs @@ -15,7 +15,20 @@ pub struct ConfigChangeSpec { impl ConfigChangeSpec { pub fn collect_in_dir(dir_path: &Path) -> Vec { - collect_files_in_dir_recursive(dir_path) + let files = collect_files_in_dir_recursive(dir_path); + let only_files = files + .iter() + .filter(|file| { + file.path.to_string_lossy().to_lowercase().contains("_only") + }) + .cloned() + .collect::>(); + let files = if only_files.is_empty() { + files + } else { + only_files + }; + files .into_iter() .map(|file| ConfigChangeSpec::parse(file.path.clone(), &file.text)) .collect() @@ -96,6 +109,7 @@ impl SpecFile { } } +#[derive(Clone)] struct CollectedFile { pub path: PathBuf, pub text: String, diff --git a/tests/specs/config_changes/CircularJsrDep.txt b/tests/specs/config_changes/CircularJsrDep01.txt similarity index 100% rename from tests/specs/config_changes/CircularJsrDep.txt rename to tests/specs/config_changes/CircularJsrDep01.txt diff --git a/tests/specs/config_changes/CircularJsrDep02.txt b/tests/specs/config_changes/CircularJsrDep02.txt new file mode 100644 index 0000000..65e22e1 --- /dev/null +++ b/tests/specs/config_changes/CircularJsrDep02.txt @@ -0,0 +1,53 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_b@0.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspaces": { + "dependencies": [ + "jsr:@scope/package_a", + "jsr:@scope/package_c" + ] + } +} + +# remove dependency +{ + "dependencies": [ + ] +} + +# output +{ + "version": "3", + "remote": {}, + "workspaces": { + "dependencies": [] + } +} From 3f770c2f2726e3db4ebaa8d44d00d97f3f9f4b00 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 19:06:19 -0500 Subject: [PATCH 21/38] Update --- src/graphs.rs | 2 + src/lib.rs | 26 +- tests/integration_test.rs | 71 +- .../config_changes/NoConfigDoesNotRemove.txt | 1026 +++++++++++++++++ .../RemovingNpmDepsDenoJson.txt | 177 +++ 5 files changed, 1286 insertions(+), 16 deletions(-) create mode 100644 tests/specs/config_changes/NoConfigDoesNotRemove.txt create mode 100644 tests/specs/config_changes/RemovingNpmDepsDenoJson.txt diff --git a/src/graphs.rs b/src/graphs.rs index 3855af7..456438b 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -38,6 +38,7 @@ enum LockfileGraphPackage { } struct LockfileNpmGraphPackage { + /// Root ids that transitively reference this package. root_ids: HashSet, integrity: String, dependencies: BTreeMap, @@ -45,6 +46,7 @@ struct LockfileNpmGraphPackage { #[derive(Default)] struct LockfileJsrGraphPackage { + /// Root ids that transitively reference this package. root_ids: HashSet, dependencies: BTreeSet, } diff --git a/src/lib.rs b/src/lib.rs index db2ee29..a17532b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -123,19 +123,6 @@ pub struct PackagesContent { #[serde(default)] pub specifiers: BTreeMap, - /// Mapping between resolved npm specifiers and their associated info, eg. - /// { - /// "chalk@5.0.0": { - /// "integrity": "sha512-...", - /// "dependencies": { - /// "ansi-styles": "ansi-styles@4.1.0", - /// } - /// } - /// } - #[serde(skip_serializing_if = "BTreeMap::is_empty")] - #[serde(default)] - pub npm: BTreeMap, - /// Mapping between resolved jsr specifiers and their associated info, eg. /// { /// "@oak/oak@12.6.3": { @@ -149,6 +136,19 @@ pub struct PackagesContent { #[serde(skip_serializing_if = "BTreeMap::is_empty")] #[serde(default)] pub jsr: BTreeMap, + + /// Mapping between resolved npm specifiers and their associated info, eg. + /// { + /// "chalk@5.0.0": { + /// "integrity": "sha512-...", + /// "dependencies": { + /// "ansi-styles": "ansi-styles@4.1.0", + /// } + /// } + /// } + #[serde(skip_serializing_if = "BTreeMap::is_empty")] + #[serde(default)] + pub npm: BTreeMap, } impl PackagesContent { diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 9c019d4..ece564d 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -1,10 +1,18 @@ -use pretty_assertions::assert_eq; +use std::collections::BTreeMap; +use std::collections::BTreeSet; use std::path::PathBuf; +use deno_lockfile::WorkspaceConfig; +use deno_lockfile::WorkspaceMemberConfig; +use pretty_assertions::assert_eq; +use serde; + use deno_lockfile::Lockfile; use deno_lockfile::SetWorkspaceConfigOptions; use helpers::ConfigChangeSpec; +use serde::Deserialize; +use serde::Serialize; mod helpers; @@ -16,6 +24,56 @@ fn nv_to_jsr_url(nv: &str) -> Option { #[test] fn config_changes() { + #[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] + #[serde(rename_all = "camelCase")] + struct LockfilePackageJsonContent { + #[serde(default)] + dependencies: BTreeSet, + } + + #[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] + #[serde(rename_all = "camelCase")] + struct WorkspaceMemberConfigContent { + #[serde(default)] + dependencies: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(default)] + package_json: Option, + } + + #[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] + #[serde(rename_all = "camelCase")] + struct WorkspaceConfigContent { + #[serde(default, flatten)] + root: WorkspaceMemberConfigContent, + #[serde(skip_serializing_if = "BTreeMap::is_empty")] + #[serde(default)] + members: BTreeMap, + } + impl WorkspaceConfigContent { + fn into_workspace_config(self) -> WorkspaceConfig { + WorkspaceConfig { + root: WorkspaceMemberConfig { + dependencies: self.root.dependencies, + package_json_deps: self.root.package_json.map(|p| p.dependencies), + }, + members: self + .members + .into_iter() + .map(|(k, v)| { + ( + k, + WorkspaceMemberConfig { + dependencies: v.dependencies, + package_json_deps: v.package_json.map(|p| p.dependencies), + }, + ) + }) + .collect(), + } + } + } + let specs = ConfigChangeSpec::collect_in_dir(&PathBuf::from( "./tests/specs/config_changes", )); @@ -31,11 +89,18 @@ fn config_changes() { for change_and_output in &mut spec.change_and_outputs { // setting the new workspace config should change the has_content_changed flag config_file.has_content_changed = false; + let config: WorkspaceConfigContent = + serde_json::from_str(&change_and_output.change.text).unwrap(); config_file.set_workspace_config(SetWorkspaceConfigOptions { - config: serde_json::from_str(&change_and_output.change.text).unwrap(), + config: config.into_workspace_config(), nv_to_jsr_url, }); - assert!(config_file.has_content_changed); + assert_eq!( + config_file.has_content_changed, + !change_and_output.change.title.contains("no change"), + "Failed for {}", + change_and_output.change.title, + ); // now try resetting it and the flag should remain the same config_file.has_content_changed = false; diff --git a/tests/specs/config_changes/NoConfigDoesNotRemove.txt b/tests/specs/config_changes/NoConfigDoesNotRemove.txt new file mode 100644 index 0000000..d167c23 --- /dev/null +++ b/tests/specs/config_changes/NoConfigDoesNotRemove.txt @@ -0,0 +1,1026 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspaces": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} + +# no config (no change) +{ +} + +# won't have any changes because someone might just be running a command with --no-config +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspaces": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} + +# no package.json (no change) +{ + "dependencies": [ + "jsr:@scope/package_a" + ] +} + +# won't have any change because someone may just be running a command without a package.json +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspaces": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} + +# no dependencies (no change) +{ + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } +} + +# won't have any change because someone may just be running a command without a deno.json, but with a package.json +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspaces": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} + +# now remove the deno.json import map contents +{ + "dependencies": [ + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } +} + +# output +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspaces": { + "dependencies": [], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} + +# now remove the package.json deps +{ + "dependencies": [ + ], + "packageJson": { + "dependencies": [ + ] + } +} + +# output +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1" + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + } + } + }, + "remote": { + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspaces": { + "dependencies": [], + "packageJson": { + "dependencies": [] + } + } +} diff --git a/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt b/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt new file mode 100644 index 0000000..e15f427 --- /dev/null +++ b/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt @@ -0,0 +1,177 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "npm": { + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": {}, + "workspaces": { + "dependencies": [ + "npm:ts-morph" + ] + } +} + +# remove +{ + "dependencies": [ + ] +} + +# output +{ + "version": "3", + "remote": {}, + "workspaces": { + "dependencies": [] + } +} From f75389368cfa3eb73a52e20c68338ff775d17667 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 19:08:18 -0500 Subject: [PATCH 22/38] Not used --- Cargo.lock | 24 ------------------------ Cargo.toml | 1 - 2 files changed, 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af0624c..cae0d7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,7 +21,6 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" name = "deno_lockfile" version = "0.17.2" dependencies = [ - "indexmap", "pretty_assertions", "ring", "serde", @@ -36,12 +35,6 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - [[package]] name = "getrandom" version = "0.2.10" @@ -53,23 +46,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown", - "serde", -] - [[package]] name = "itoa" version = "1.0.6" diff --git a/Cargo.toml b/Cargo.toml index 2bd9f69..ddfd17a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,6 @@ license = "MIT" description = "An implementation of a lockfile used in Deno" [dependencies] -indexmap = { version = "2.1.0", features = ["serde"] } ring = "^0.17.0" serde = { version = "1.0.149", features = ["derive"] } serde_json = "1.0.85" From f835ae61fbaee30268bad0a6b3eda258c6ce111c Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 19:11:17 -0500 Subject: [PATCH 23/38] Update key --- src/lib.rs | 18 +++++++++--------- .../specs/config_changes/CircularJsrDep01.txt | 4 ++-- .../specs/config_changes/CircularJsrDep02.txt | 4 ++-- .../config_changes/NoConfigDoesNotRemove.txt | 12 ++++++------ .../config_changes/RemovingNpmDepsDenoJson.txt | 4 ++-- .../config_changes/RemovingOakThenDax.txt | 6 +++--- .../ShiftingDepsDifferentWorkspaceMember.txt | 6 +++--- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a17532b..0bf663a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -236,7 +236,7 @@ pub struct LockfileContent { remote: BTreeMap, #[serde(skip_serializing_if = "WorkspaceConfigContent::is_empty")] #[serde(default)] - workspaces: WorkspaceConfigContent, + workspace: WorkspaceConfigContent, } impl LockfileContent { @@ -246,7 +246,7 @@ impl LockfileContent { packages: Default::default(), redirects: Default::default(), remote: BTreeMap::new(), - workspaces: Default::default(), + workspace: Default::default(), } } } @@ -407,14 +407,14 @@ impl Lockfile { let old_deps = self .content - .workspaces + .workspace .get_all_dep_reqs() .map(|s| s.to_string()) .collect::>(); let mut removed_deps = HashSet::new(); // clear out any jsr packages when someone adds an import map - if self.content.workspaces.root.dependencies.is_none() + if self.content.workspace.root.dependencies.is_none() && options.config.root.dependencies.is_some() { self.content.packages.clear_jsr() @@ -424,14 +424,14 @@ impl Lockfile { update_workspace_member( &mut self.has_content_changed, &mut removed_deps, - &mut self.content.workspaces.root, + &mut self.content.workspace.root, options.config.root, ); // now go through the workspaces let mut unhandled_members = self .content - .workspaces + .workspace .members .keys() .cloned() @@ -440,7 +440,7 @@ impl Lockfile { unhandled_members.remove(&member_name); let current_member = self .content - .workspaces + .workspace .members .entry(member_name) .or_default(); @@ -453,14 +453,14 @@ impl Lockfile { } for member in unhandled_members { - if let Some(member) = self.content.workspaces.members.remove(&member) { + if let Some(member) = self.content.workspace.members.remove(&member) { removed_deps.extend(member.dep_reqs().cloned()); self.has_content_changed = true; } } // update the removed deps to keep what's still found in the workspace - for dep in self.content.workspaces.get_all_dep_reqs() { + for dep in self.content.workspace.get_all_dep_reqs() { removed_deps.remove(dep); } diff --git a/tests/specs/config_changes/CircularJsrDep01.txt b/tests/specs/config_changes/CircularJsrDep01.txt index 06a9b79..a4d876a 100644 --- a/tests/specs/config_changes/CircularJsrDep01.txt +++ b/tests/specs/config_changes/CircularJsrDep01.txt @@ -23,7 +23,7 @@ "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, - "workspaces": { + "workspace": { "dependencies": [ "jsr:@scope/package_a" ] @@ -40,7 +40,7 @@ { "version": "3", "remote": {}, - "workspaces": { + "workspace": { "dependencies": [] } } diff --git a/tests/specs/config_changes/CircularJsrDep02.txt b/tests/specs/config_changes/CircularJsrDep02.txt index 65e22e1..9b6f5dd 100644 --- a/tests/specs/config_changes/CircularJsrDep02.txt +++ b/tests/specs/config_changes/CircularJsrDep02.txt @@ -29,7 +29,7 @@ "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, - "workspaces": { + "workspace": { "dependencies": [ "jsr:@scope/package_a", "jsr:@scope/package_c" @@ -47,7 +47,7 @@ { "version": "3", "remote": {}, - "workspaces": { + "workspace": { "dependencies": [] } } diff --git a/tests/specs/config_changes/NoConfigDoesNotRemove.txt b/tests/specs/config_changes/NoConfigDoesNotRemove.txt index d167c23..c4dc2f7 100644 --- a/tests/specs/config_changes/NoConfigDoesNotRemove.txt +++ b/tests/specs/config_changes/NoConfigDoesNotRemove.txt @@ -183,7 +183,7 @@ "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, - "workspaces": { + "workspace": { "dependencies": [ "jsr:@scope/package_a" ], @@ -384,7 +384,7 @@ "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, - "workspaces": { + "workspace": { "dependencies": [ "jsr:@scope/package_a" ], @@ -588,7 +588,7 @@ "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, - "workspaces": { + "workspace": { "dependencies": [ "jsr:@scope/package_a" ], @@ -794,7 +794,7 @@ "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, - "workspaces": { + "workspace": { "dependencies": [ "jsr:@scope/package_a" ], @@ -980,7 +980,7 @@ "remote": { "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, - "workspaces": { + "workspace": { "dependencies": [], "packageJson": { "dependencies": [ @@ -1017,7 +1017,7 @@ "remote": { "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, - "workspaces": { + "workspace": { "dependencies": [], "packageJson": { "dependencies": [] diff --git a/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt b/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt index e15f427..6492c1e 100644 --- a/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt +++ b/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt @@ -154,7 +154,7 @@ } }, "remote": {}, - "workspaces": { + "workspace": { "dependencies": [ "npm:ts-morph" ] @@ -171,7 +171,7 @@ { "version": "3", "remote": {}, - "workspaces": { + "workspace": { "dependencies": [] } } diff --git a/tests/specs/config_changes/RemovingOakThenDax.txt b/tests/specs/config_changes/RemovingOakThenDax.txt index 3e5bf9c..bfa7fd7 100644 --- a/tests/specs/config_changes/RemovingOakThenDax.txt +++ b/tests/specs/config_changes/RemovingOakThenDax.txt @@ -357,7 +357,7 @@ "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638", "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" }, - "workspaces": { + "workspace": { "dependencies": [ "jsr:@dsherret/dax", "jsr:@oak/oak" @@ -631,7 +631,7 @@ "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638", "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" }, - "workspaces": { + "workspace": { "dependencies": [ "jsr:@dsherret/dax" ] @@ -663,7 +663,7 @@ "remote": { "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" }, - "workspaces": { + "workspace": { "dependencies": [] } } diff --git a/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt b/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt index 9d03c36..61d215d 100644 --- a/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt +++ b/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt @@ -17,7 +17,7 @@ "remote": { "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" }, - "workspaces": { + "workspace": { "dependencies": [ "jsr:@dsherret/dax" ] @@ -55,7 +55,7 @@ "remote": { "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" }, - "workspaces": { + "workspace": { "dependencies": [], "members": { "package_a": { @@ -98,7 +98,7 @@ "remote": { "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" }, - "workspaces": { + "workspace": { "dependencies": [], "members": { "package_b": { From 51b3d1151c1bb5cb860ea65be14965709a4db49f Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 19:22:07 -0500 Subject: [PATCH 24/38] Add CircularJsrDeps03.txt --- .../specs/config_changes/CircularJsrDep03.txt | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 tests/specs/config_changes/CircularJsrDep03.txt diff --git a/tests/specs/config_changes/CircularJsrDep03.txt b/tests/specs/config_changes/CircularJsrDep03.txt new file mode 100644 index 0000000..0e721aa --- /dev/null +++ b/tests/specs/config_changes/CircularJsrDep03.txt @@ -0,0 +1,48 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a@1": "jsr:@scope/package_a@1.0.1", + "jsr:@scope/package_b@1": "jsr:@scope/package_b@1.0.1", + "jsr:@scope/package_c@^2.1": "jsr:@scope/package_c@2.1.2" + }, + "jsr": { + "@scope/package_a@1.0.1": { + "dependencies": [ + "jsr:@scope/package_b@1", + "jsr:@scope/package_c@^2.1" + ] + }, + "@scope/package_b@1.0.1": { + "dependencies": [ + "jsr:@scope/package_a@1" + ] + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/1.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/1.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_c/2.1.2/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada047" + }, + "workspace": { + "dependencies": [ + "jsr:@scope/package_a@1" + ] + } +} + +# change +{ + "dependencies": [] +} + +# output +{ + "version": "3", + "remote": {}, + "workspace": { + "dependencies": [] + } +} From dc22667cac3941bd7abf5f70459aee0dadcb3967 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 19:44:36 -0500 Subject: [PATCH 25/38] Add peer dep test --- src/graphs.rs | 40 ++++++----- src/lib.rs | 1 + tests/integration_test.rs | 12 ++-- tests/specs/config_changes/PeerDep01_only.txt | 66 +++++++++++++++++++ 4 files changed, 98 insertions(+), 21 deletions(-) create mode 100644 tests/specs/config_changes/PeerDep01_only.txt diff --git a/src/graphs.rs b/src/graphs.rs index 456438b..e27d888 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -120,7 +120,6 @@ impl LockfilePackageGraph { ); } - // trace every root identifier through the graph finding all the corresponding packages let mut root_ids = old_config_file_packages .filter_map(|value| { content.specifiers.get(value).and_then(|value| { @@ -136,6 +135,7 @@ impl LockfilePackageGraph { }) .collect::>(); + // trace every root identifier through the graph finding all corresponding packages while let Some(root_id) = root_ids.pop() { let mut pending = VecDeque::from([root_id.clone()]); while let Some(id) = pending.pop_back() { @@ -174,28 +174,34 @@ impl LockfilePackageGraph { package_reqs: impl Iterator, ) { let mut root_ids = Vec::new(); - let mut pending_reqs = - package_reqs.map(LockfilePkgReq).collect::>(); - let mut visited_root_packages = - HashSet::with_capacity(self.root_packages.len()); - visited_root_packages.extend(pending_reqs.iter().cloned()); - while let Some(pending_req) = pending_reqs.pop_front() { - if let Some(id) = self.root_packages.get(&pending_req) { - if let LockfilePkgId::Npm(id) = id { - if let Some(first_part) = id.parts().next() { - for (req, id) in &self.root_packages { - if let LockfilePkgId::Npm(id) = &id { - if id.parts().skip(1).any(|part| part == first_part) { - let has_visited = visited_root_packages.insert(req.clone()); - if has_visited { - pending_reqs.push_back(req.clone()); + + // collect the root ids being removed + { + let mut pending_reqs = + package_reqs.map(LockfilePkgReq).collect::>(); + let mut visited_root_packages = + HashSet::with_capacity(self.root_packages.len()); + visited_root_packages.extend(pending_reqs.iter().cloned()); + while let Some(pending_req) = pending_reqs.pop_front() { + if let Some(id) = self.root_packages.get(&pending_req) { + if let LockfilePkgId::Npm(id) = id { + if let Some(first_part) = id.parts().next() { + for (req, id) in &self.root_packages { + if let LockfilePkgId::Npm(id) = &id { + // be a bit aggressive and remove any npm packages that + // have this package as a peer dependency + if id.parts().skip(1).any(|part| part == first_part) { + let has_visited = visited_root_packages.insert(req.clone()); + if has_visited { + pending_reqs.push_back(req.clone()); + } } } } } } + root_ids.push(id.clone()); } - root_ids.push(id.clone()); } } diff --git a/src/lib.rs b/src/lib.rs index 0bf663a..7f22b2b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -375,6 +375,7 @@ impl Lockfile { // don't clear the deps because someone might be running // a one-off script without a deno.json } + if let Some(new_package_json_deps) = new.package_json_deps { match &mut current.package_json { Some(current_package_json) => { diff --git a/tests/integration_test.rs b/tests/integration_test.rs index ece564d..fa12695 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -86,13 +86,17 @@ fn config_changes() { false, ) .unwrap(); + eprintln!("CONFIG FILE: {:#?}", config_file.content); for change_and_output in &mut spec.change_and_outputs { // setting the new workspace config should change the has_content_changed flag config_file.has_content_changed = false; - let config: WorkspaceConfigContent = - serde_json::from_str(&change_and_output.change.text).unwrap(); + let config = serde_json::from_str::( + &change_and_output.change.text, + ) + .unwrap() + .into_workspace_config(); config_file.set_workspace_config(SetWorkspaceConfigOptions { - config: config.into_workspace_config(), + config: config.clone(), nv_to_jsr_url, }); assert_eq!( @@ -105,7 +109,7 @@ fn config_changes() { // now try resetting it and the flag should remain the same config_file.has_content_changed = false; config_file.set_workspace_config(SetWorkspaceConfigOptions { - config: serde_json::from_str(&change_and_output.change.text).unwrap(), + config: config.clone(), nv_to_jsr_url, }); assert!(!config_file.has_content_changed); diff --git a/tests/specs/config_changes/PeerDep01_only.txt b/tests/specs/config_changes/PeerDep01_only.txt new file mode 100644 index 0000000..f8eee5f --- /dev/null +++ b/tests/specs/config_changes/PeerDep01_only.txt @@ -0,0 +1,66 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "npm:preact-render-to-string@6.2": "npm:preact-render-to-string@6.2.2_preact@10.5.15", + "npm:preact@10.5.15": "npm:preact@10.5.15" + }, + "npm": { + "preact-render-to-string@6.2.2_preact@10.5.15": { + "integrity": "sha512-YDfXQiVeYZutFR8/DpxLSbW3W6b7GgjBExRBxOOqcjrGq5rA9cziitQdNPMZe4RVMSdfBnf4hYqyeLs/KvtIuA==", + "dependencies": { + "preact": "preact@10.5.15", + "pretty-format": "pretty-format@3.8.0" + } + }, + "preact@10.5.15": { + "integrity": "sha512-5chK29n6QcJc3m1lVrKQSQ+V7K1Gb8HeQY6FViQ5AxCAEGu3DaHffWNDkC9+miZgsLvbvU9rxbV1qinGHMHzqA==", + "dependencies": {} + }, + "pretty-format@3.8.0": { + "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==", + "dependencies": {} + } + } + }, + "remote": {}, + "workspace": { + "dependencies": [ + "npm:preact-render-to-string@6.2" + ], + "packageJson": { + "dependencies": [ + "npm:preact@10.5.15" + ] + } + } +} + +# update preact to 10.15 +{ + "dependencies": [ + "npm:preact-render-to-string@6.2" + ], + "packageJson": { + "dependencies": [ + "npm:preact@10.15.0" + ] + } +} + +# will remove all dependencies because preact-render-to-string had preact@10.5.15 as a peer dep +{ + "version": "3", + "remote": {}, + "workspace": { + "dependencies": [ + "npm:preact-render-to-string@6.2" + ], + "packageJson": { + "dependencies": [ + "npm:preact@10.15.0" + ] + } + } +} From 6e7b112002d1417d0eff3e35a484a62ea55d8d70 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 19:56:49 -0500 Subject: [PATCH 26/38] Improve --- src/graphs.rs | 73 ++++++++++++++++++++++++--------------------------- src/lib.rs | 18 ++++++++----- 2 files changed, 46 insertions(+), 45 deletions(-) diff --git a/src/graphs.rs b/src/graphs.rs index e27d888..5033811 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -53,16 +53,21 @@ struct LockfileJsrGraphPackage { /// Graph used to analyze a lockfile to determine which packages /// and remotes can be removed based on config file changes. -pub struct LockfilePackageGraph { +pub struct LockfilePackageGraph Option> { root_packages: HashMap, packages: HashMap, - removed_jsr_packages: Vec, + remotes: BTreeMap, + nv_to_jsr_url: FNvToJsrUrl, } -impl LockfilePackageGraph { +impl Option> + LockfilePackageGraph +{ pub fn from_lockfile<'a>( - content: &PackagesContent, + content: PackagesContent, old_config_file_packages: impl Iterator, + remotes: BTreeMap, + nv_to_jsr_url: FNvToJsrUrl, ) -> Self { let mut root_packages = HashMap::::with_capacity( @@ -70,7 +75,7 @@ impl LockfilePackageGraph { ); // collect the specifiers to version mappings let mut packages = HashMap::new(); - for (key, value) in &content.specifiers { + for (key, value) in content.specifiers { if let Some(value) = value.strip_prefix("npm:") { root_packages.insert( LockfilePkgReq(key.to_string()), @@ -78,7 +83,7 @@ impl LockfilePackageGraph { ); } else if let Some(value) = value.strip_prefix("jsr:") { let nv = LockfilePkgId::Jsr(LockfileJsrPkgNv(value.to_string())); - root_packages.insert(LockfilePkgReq(key.to_string()), nv.clone()); + root_packages.insert(LockfilePkgReq(key), nv.clone()); packages.insert( nv, LockfileGraphPackage::Jsr(LockfileJsrGraphPackage::default()), @@ -86,7 +91,7 @@ impl LockfilePackageGraph { } } - for (nv, content_package) in &content.jsr { + for (nv, content_package) in content.jsr { let new_deps = &content_package.dependencies; let package = packages .entry(LockfilePkgId::Jsr(LockfileJsrPkgNv(nv.clone()))) @@ -103,7 +108,7 @@ impl LockfilePackageGraph { LockfileGraphPackage::Npm(_) => unreachable!(), } } - for (id, package) in &content.npm { + for (id, package) in content.npm { packages.insert( LockfilePkgId::Npm(LockfileNpmPackageId(id.clone())), LockfileGraphPackage::Npm(LockfileNpmGraphPackage { @@ -122,16 +127,9 @@ impl LockfilePackageGraph { let mut root_ids = old_config_file_packages .filter_map(|value| { - content.specifiers.get(value).and_then(|value| { - #[allow(clippy::manual_map)] // not easier to read - if let Some(value) = value.strip_prefix("npm:") { - Some(LockfilePkgId::Npm(LockfileNpmPackageId(value.to_string()))) - } else if let Some(value) = value.strip_prefix("jsr:") { - Some(LockfilePkgId::Jsr(LockfileJsrPkgNv(value.to_string()))) - } else { - None - } - }) + root_packages + .get(&LockfilePkgReq(value.to_string())) + .cloned() }) .collect::>(); @@ -165,7 +163,8 @@ impl LockfilePackageGraph { Self { root_packages, packages, - removed_jsr_packages: Default::default(), + remotes, + nv_to_jsr_url, } } @@ -205,6 +204,9 @@ impl LockfilePackageGraph { } } + // Go through the graph and mark the packages that no + // longer use this root id. If the package goes to having + // no root ids, then remove it from the graph. while let Some(root_id) = root_ids.pop() { let mut pending = VecDeque::from([root_id.clone()]); while let Some(id) = pending.pop_back() { @@ -242,11 +244,23 @@ impl LockfilePackageGraph { self.packages.remove(&id); self.root_packages.retain(|_, pkg_id| *pkg_id != id); if let LockfilePkgId::Jsr(nv) = id { - self.removed_jsr_packages.push(nv); + if let Some(url) = (self.nv_to_jsr_url)(&nv.0) { + debug_assert!( + url.ends_with('/'), + "JSR URL should end with slash: {}", + url + ); + self.remotes.retain(|k, _| !k.starts_with(&url)); + } } } - pub fn populate_packages(self, packages: &mut PackagesContent) { + pub fn populate_packages( + self, + packages: &mut PackagesContent, + remotes: &mut BTreeMap, + ) { + *remotes = self.remotes; for (req, id) in self.root_packages { packages.specifiers.insert( req.0, @@ -295,21 +309,4 @@ impl LockfilePackageGraph { } } } - - pub fn clear_remotes_for_removed_jsr_packages( - &self, - redirects: &mut BTreeMap, - nv_to_jsr_url: impl Fn(&str) -> Option, - ) { - for nv in &self.removed_jsr_packages { - if let Some(url) = nv_to_jsr_url(&nv.0) { - debug_assert!( - url.ends_with('/'), - "JSR URL should end with slash: {}", - url - ); - redirects.retain(|k, _| !k.starts_with(&url)); - } - } - } } diff --git a/src/lib.rs b/src/lib.rs index 7f22b2b..917e779 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -466,21 +466,25 @@ impl Lockfile { } if !removed_deps.is_empty() { + let packages = std::mem::take(&mut self.content.packages); + let remotes = std::mem::take(&mut self.content.remote); + + // create the graph let mut graph = LockfilePackageGraph::from_lockfile( - &self.content.packages, + packages, old_deps.iter().map(|dep| dep.as_str()), + remotes, + options.nv_to_jsr_url, ); - graph.remove_root_packages(removed_deps.into_iter()); - // clear out the packages - self.content.packages = Default::default(); + // remove the packages + graph.remove_root_packages(removed_deps.into_iter()); // now populate the graph back into the packages - graph.clear_remotes_for_removed_jsr_packages( + graph.populate_packages( + &mut self.content.packages, &mut self.content.remote, - options.nv_to_jsr_url, ); - graph.populate_packages(&mut self.content.packages); } } From e447dc4946a8b0d65c109c6c2a1627a12482f25f Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 19:59:24 -0500 Subject: [PATCH 27/38] More tests --- src/graphs.rs | 2 +- src/lib.rs | 2 +- .../config_changes/RemovingWorkspaceDep.txt | 651 ++++++++++++++++++ .../RemovingWorkspaceMember.txt | 645 +++++++++++++++++ 4 files changed, 1298 insertions(+), 2 deletions(-) create mode 100644 tests/specs/config_changes/RemovingWorkspaceDep.txt create mode 100644 tests/specs/config_changes/RemovingWorkspaceMember.txt diff --git a/src/graphs.rs b/src/graphs.rs index 5033811..67ade0c 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -65,8 +65,8 @@ impl Option> { pub fn from_lockfile<'a>( content: PackagesContent, - old_config_file_packages: impl Iterator, remotes: BTreeMap, + old_config_file_packages: impl Iterator, nv_to_jsr_url: FNvToJsrUrl, ) -> Self { let mut root_packages = diff --git a/src/lib.rs b/src/lib.rs index 917e779..d66a27c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -472,8 +472,8 @@ impl Lockfile { // create the graph let mut graph = LockfilePackageGraph::from_lockfile( packages, - old_deps.iter().map(|dep| dep.as_str()), remotes, + old_deps.iter().map(|dep| dep.as_str()), options.nv_to_jsr_url, ); diff --git a/tests/specs/config_changes/RemovingWorkspaceDep.txt b/tests/specs/config_changes/RemovingWorkspaceDep.txt new file mode 100644 index 0000000..064dd2b --- /dev/null +++ b/tests/specs/config_changes/RemovingWorkspaceDep.txt @@ -0,0 +1,651 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@dsherret/dax": "jsr:@dsherret/dax@0.0.1", + "jsr:@dsherret/which@0.0.1": "jsr:@dsherret/which@0.0.1", + "jsr:@oak/commons@0.4": "jsr:@oak/commons@0.4.0", + "jsr:@oak/oak": "jsr:@oak/oak@12.6.3", + "jsr:@std/assert@0.210": "jsr:@std/assert@0.210.0", + "jsr:@std/assert@^0.210.0": "jsr:@std/assert@0.210.0", + "jsr:@std/bytes@0.210": "jsr:@std/bytes@0.210.0", + "jsr:@std/bytes@^0.210.0": "jsr:@std/bytes@0.210.0", + "jsr:@std/crypto@0.210": "jsr:@std/crypto@0.210.0", + "jsr:@std/encoding@0.210": "jsr:@std/encoding@0.210.0", + "jsr:@std/encoding@^0.210.0": "jsr:@std/encoding@0.210.0", + "jsr:@std/fmt@0.210.0": "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0": "jsr:@std/fs@0.210.0", + "jsr:@std/http@0.210": "jsr:@std/http@0.210.0", + "jsr:@std/io@0.210": "jsr:@std/io@0.210.0", + "jsr:@std/io@0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/io@^0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/media_types@0.210": "jsr:@std/media_types@0.210.0", + "jsr:@std/path@0.210": "jsr:@std/path@0.210.0", + "jsr:@std/path@0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/path@^0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210": "jsr:@std/streams@0.210.0", + "jsr:@std/streams@0.210.0": "jsr:@std/streams@0.210.0", + "jsr:@zome_unreferenced/package": "jsr:@zome_unreferenced/package@0.1.0", + "jsr:@zome_unreferenced/package_b": "jsr:@zome_unreferenced/package_b@0.1.0", + "npm:path-to-regexp@6.2.1": "npm:path-to-regexp@6.2.1" + }, + "npm": { + "path-to-regexp@6.2.1": { + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", + "dependencies": {} + } + }, + "jsr": { + "@dsherret/dax@0.0.1": { + "dependencies": [ + "jsr:@dsherret/which@0.0.1", + "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0", + "jsr:@std/io@0.210.0", + "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210.0" + ] + }, + "@oak/commons@0.4.0": { + "dependencies": [ + "jsr:@std/assert@0.210" + ] + }, + "@oak/oak@12.6.3": { + "dependencies": [ + "jsr:@oak/commons@0.4", + "jsr:@std/bytes@0.210", + "jsr:@std/crypto@0.210", + "jsr:@std/encoding@0.210", + "jsr:@std/http@0.210", + "jsr:@std/io@0.210", + "jsr:@std/media_types@0.210", + "jsr:@std/path@0.210", + "jsr:@std/streams@0.210", + "npm:path-to-regexp@6.2.1" + ] + }, + "@std/crypto@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/encoding@^0.210.0" + ] + }, + "@std/fs@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/path@^0.210.0" + ] + }, + "@std/http@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/encoding@^0.210.0" + ] + }, + "@std/io@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0" + ] + }, + "@std/path@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0" + ] + }, + "@std/streams@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0", + "jsr:@std/io@^0.210.0" + ] + }, + "jsr:@zome_unreferenced/package@0.1.0": { + "dependencies": [ + "jsr:@zome_unreferenced/package_b" + ] + } + } + }, + "remote": { + "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@dsherret/dax/0.0.1/src/command.ts": "e5dc7e3af38240657b4b9dc106b044c9c75bf16385c8f8af1c795ca89e27c3bc", + "https://jsr.io/@dsherret/dax/0.0.1/src/command_handler.ts": "56ee6893bf5ec829c370fe5a9367f60b3590e571f7b69153d48686779ab14d98", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/args.ts": "a138aef24294e3cbf13cef08f4836d018e8dd99fd06ad82e7e7f08ef680bbc1d", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cat.ts": "984035bd43b62c12764bcf321d84ce4bbe271aedaac48d251c8db080022d5cbf", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cd.ts": "82e85b573dd3006eefc20d1849ca638e461946688749e9a4ea53ab07c03ef7e4", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cp_mv.ts": "aa09e3ab95c5eaae1186ad9a84d94977e19f4fa3c3fd5ab6a45b0b009600aae6", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/echo.ts": "a4f86022ad4eb5b8e8326e45fd2f571f6bd5e3c842f0c10e0be69f35b0d78180", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/exit.ts": "86b181d0f1e7723b265ec7a8858a43f5cac56cd485375524b4d8f022c5632419", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/export.ts": "1d5012c6b991e3c1112cc5841520e1ae651a20a0fd6c2e8014c79eba571755be", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/mkdir.ts": "620ecc4d690b342ecea9e9849303a4f8e2f65b430b70be846c1de766c9b5bbe7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/printenv.ts": "1efa36e21c6039da424c99753d748a486c3a7621507ca9d8d319e2a6e3e259ac", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/pwd.ts": "d89fac9ca37afe54967acd24744c3255aacc63f51697c27fe8d2e90a9049088f", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/rm.ts": "9c3b200c154c4a3c7e3b9ab9204daaad62b961453e9a8c8fc9a0451953e59f75", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/sleep.ts": "50b162accce6b8f20180f13d01613a6da6d88920d8322ac46ff7a2bbd6fcfbd7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/test.ts": "d4a72076e652b3be65eaec9ff26eb342f5293140a82fa6bc357fa77b895ec3ab", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/touch.ts": "8386148784f92455502f09880306bc859ab61540c80fe0de0686b323662ee1fb", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/unset.ts": "dbebdad7e6e301ee621161a13669ab4164025aee5b323658ab283dab64b9eebf", + "https://jsr.io/@dsherret/dax/0.0.1/src/common.ts": "7295d13ab0023bb09d4c97e3a131cedada6294a33474f136b652a145330c8e3e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/confirm.ts": "ffcc76ebf10c8bfde6e4072b70b271e0453170ab0bd0bb795bc4e52a1237062e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/logger.ts": "e0ab5025915cef70df03681c756e211f25bb2e4331f82ed4256b17ddd9e794ea", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/mod.ts": "de8af7d646f6cb222eee6560171993690247941b13ed9d757789d16f019d73ee", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/multiSelect.ts": "50ff5de156028ff21025917b4c797c877037bf1460974b0f72b6ab0907d0a3d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/format.ts": "15ddbb8051580f88ed499281e12ca6f881f875ab73268d7451d7113ee130bd7d", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/interval.ts": "82bd91b9f8219c8d03b7aad51e7425f3276d96615b32826693dffd5905d663d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/mod.ts": "5ae6cf88fe8caaa5c8218511c9458944201da5fbc9749b200d9e1227c93b3b9e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/prompt.ts": "91c8d03fe2179438629491e71a6bdf0b6ca5bd31cbcc29ac7a2529daefe24d94", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/select.ts": "6b96555d7a13acd6e864a874e5687044932cf2412a45dc2811613cb2f00900ca", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/utils.ts": "4e4f8cf5e435345e4ad94523544dc112e25969a12bdd05fb8073729e078cf47a", + "https://jsr.io/@dsherret/dax/0.0.1/src/deps.ts": "8e1acae3e51645f52fda44ffa528e3c346f00b37afc4bba1c2c90433d551bccb", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/mod.ts": "c992db99c8259ae3bf2d35666585dfefda84cf7cf4e624e42ea2ac7367900fe0", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/rs_lib.generated.js": "932a69348ce575e4a5c2398c896e9cd06cf287f6c18fb25dfdf23badca1c9f54", + "https://jsr.io/@dsherret/dax/0.0.1/src/path.ts": "365ed563f1a7421c20b094f5e56ca1f1ae9608b2a568b7ad394a63bdeabc1313", + "https://jsr.io/@dsherret/dax/0.0.1/src/pipes.ts": "850243b55f40eaad1f0020455c63905a0a41f543c2b7031d38188051398692d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/request.ts": "9856b955ac1a0831a4998b23ba7be2f5e74ab3fd17230bc28476781c9f0f20d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/result.ts": "0908b69c16b25c3b258f6b2ada12e124686df5f7ea2b98daa27a83973c7b118c", + "https://jsr.io/@dsherret/dax/0.0.1/src/shell.ts": "e18dcdccd5edf8ad8cd56b1e58a2b4f094eb969f3499303adde66ee71d231770", + "https://jsr.io/@dsherret/dax/0.0.1/src/vendor/outdent.ts": "d2f45f327f06ac8607a8fb6f6c428f25f8bb03673d07795541cf880e5f5c38e2", + "https://jsr.io/@dsherret/which/0.0.1/mod.ts": "cca0ebcff4f6c9088f7b9d7e5859b3561f0701b83a83b739000bfebb34eaebb5", + "https://jsr.io/@oak/commons/0.4.0/deps.ts": "468549378f3ee4d2c96b66e2913b2029ac0a5a41c7dbd6f41d0b77c4131f46d0", + "https://jsr.io/@oak/commons/0.4.0/http_errors.ts": "e540c727b765af754bfbe3c041f332c288d3682bad1ba27971ce216e139b8cc9", + "https://jsr.io/@oak/commons/0.4.0/method.ts": "819862202d471682773ac6a573dc47553acdae865121adb54a71eee1c9389771", + "https://jsr.io/@oak/commons/0.4.0/server_sent_event.ts": "417937cc14754a632bbbce02f58dad539bb7a99015dc183e19d689887bce667b", + "https://jsr.io/@oak/commons/0.4.0/status.ts": "f13e0e61c2aaf5e254ca528569b03896aee89d96ebc256fa740ea7305a68f53f", + "https://jsr.io/@oak/oak/12.6.3/application.ts": "38f3346ff817d70f368352e9ef0f9f2bf58635c528a44f6f31cdc26ca37b3e28", + "https://jsr.io/@oak/oak/12.6.3/body.ts": "1899761b97fc9d776f3710b2637fb047ba29b968609afc6c0e5219b1108e703c", + "https://jsr.io/@oak/oak/12.6.3/buf_reader.ts": "26640736541598dbd9f2b84a9d0595756afff03c9ca55b66eef1911f7798b56d", + "https://jsr.io/@oak/oak/12.6.3/content_disposition.ts": "8b8c3cb2fba7138cd5b7f82fc3b5ea39b33db924a824b28261659db7e164621e", + "https://jsr.io/@oak/oak/12.6.3/context.ts": "043dc433504cc69a1b596a31ff8063d1647883ff5cf604a73e19a24324137442", + "https://jsr.io/@oak/oak/12.6.3/deps.ts": "2a872896c9ff15627a41d380992897d7e19686786957b75086f47a3ce6ccb1ee", + "https://jsr.io/@oak/oak/12.6.3/etag.ts": "32e47726b41698aefdd71faac5aaf2907c9bdd41ef18a7693863be4f8fee115d", + "https://jsr.io/@oak/oak/12.6.3/forwarded.ts": "e656f96a85574e2a6ee54dc35efc9f72d543c9ae0923760ef426ee7369eef01c", + "https://jsr.io/@oak/oak/12.6.3/headers.ts": "769fd042d34fbcd5667cbd745b5c65d335cc8430e822dbf1f87d65313cab4b47", + "https://jsr.io/@oak/oak/12.6.3/helpers.ts": "6b03c6a2be06ec775d54449e442a2bac234aa952948ca758356eab6dc87af618", + "https://jsr.io/@oak/oak/12.6.3/http_server_native.ts": "7dd27f851e4f47843ad2206aff5d414997d974d97410bacb8fc091d415598407", + "https://jsr.io/@oak/oak/12.6.3/http_server_native_request.ts": "552b174b5e13e92de8897d5b6f716b1e5a53543115481d65a651a41e4ca29ec9", + "https://jsr.io/@oak/oak/12.6.3/isMediaType.ts": "62d638abcf837ece3a8f07a4b7ca59794135cb0d4b73194c7d5837efd4161005", + "https://jsr.io/@oak/oak/12.6.3/mediaTyper.ts": "042b853fc8e9c3f6c628dd389e03ef481552bf07242efc3f8a1af042102a6105", + "https://jsr.io/@oak/oak/12.6.3/middleware.ts": "c7f7a0424a6dd99a00e4b8d7d6e131efc0facc8dea781845d713b63df8ef1862", + "https://jsr.io/@oak/oak/12.6.3/middleware/proxy.ts": "ab1465801b6dcf20e0d5b005ce59a929cb638f47b17143691303b8fd9841ff8e", + "https://jsr.io/@oak/oak/12.6.3/mod.ts": "f6aa47ad1b6099470c9a884cccad9d3ac0fd242ba940896291ab76cd26cf554b", + "https://jsr.io/@oak/oak/12.6.3/multipart.ts": "e76ba8587fdce04b69831ee7b1cc0c5da06919dd2d9c316a01d5aed8aca1307a", + "https://jsr.io/@oak/oak/12.6.3/range.ts": "04dfb168fac62413a430873b304667f850de0162d117103c7f4fb265c79bd2d0", + "https://jsr.io/@oak/oak/12.6.3/request.ts": "7b919fe422f67c74d88d48ad88c72cea106950620f5446e40449105fb3a859b9", + "https://jsr.io/@oak/oak/12.6.3/response.ts": "701ebc0532dce13a2eccdb4f95f0d025cdd0e8dea2604a76dddc8e3dbc7c09a6", + "https://jsr.io/@oak/oak/12.6.3/router.ts": "935c377ed809eb60a90e3534ba426444b71e3d9b45150887627b702485dfa40d", + "https://jsr.io/@oak/oak/12.6.3/send.ts": "5ec49f106294593f468317a0c885da4f3274bf6d0fe9e16a7304391730b4f4fb", + "https://jsr.io/@oak/oak/12.6.3/structured_clone.ts": "c3888b14d1eec558345bfbf13d0993d59bd45aaa8588444e35dd558c3a921cd8", + "https://jsr.io/@oak/oak/12.6.3/testing.ts": "9defd9f2e31080f77b5f7cd6437968f194521cc708b8a631164a633cb0c9b4ef", + "https://jsr.io/@oak/oak/12.6.3/util.ts": "30338dcf9e94c2716438a2fed0330e630ed400716c54876d905e04ba5bfb7b03", + "https://jsr.io/@std/assert/0.210.0/assert.ts": "482cc19da8c816e226caa566d2b146258ecd6744eaac9c11ba7ad4560728f539", + "https://jsr.io/@std/assert/0.210.0/assertion_error.ts": "933921a961c2268d1d6914502b6dc927635952c87945cf4f378e1faa44ed5c41", + "https://jsr.io/@std/bytes/0.210.0/concat.ts": "e2ce8efada37cd155af124be42d8223cbbf8c799d002c453d61b34d4890df68a", + "https://jsr.io/@std/bytes/0.210.0/copy.ts": "7c8aa7f6e8280f34976712c30207ffb9de5c58a6f04dfeebcd34d946010cbe7c", + "https://jsr.io/@std/bytes/0.210.0/ends_with.ts": "21a9860e56476d5327a81269ce4936fe43821e90fed066330f6e18db26303170", + "https://jsr.io/@std/bytes/0.210.0/equals.ts": "fc190cce412b2136979181b163ec7e05f7e7a947e39102eee4b8c0d62519ddf9", + "https://jsr.io/@std/bytes/0.210.0/includes_needle.ts": "52f712898557827096bad92798cbb7a816af6637c1bf5003fc802b573a6a35e8", + "https://jsr.io/@std/bytes/0.210.0/index_of_needle.ts": "f678648ac446b4544fe7ea3ac799f511a201e13c3a9ae1286ad2cad053181262", + "https://jsr.io/@std/bytes/0.210.0/last_index_of_needle.ts": "3d1b5edfa2244538840e92ea728cc30405f8a0b421ebab9d8ba5b868fdf4ea79", + "https://jsr.io/@std/bytes/0.210.0/mod.ts": "9ed597c10cc61cdcd4cf725ad7ed935f6dc7ff481ba6bcc6d6a47633ea1ae0b8", + "https://jsr.io/@std/bytes/0.210.0/repeat.ts": "3a00f65e7b821938d424ae93cee7bf0c7fa188308b64085d027e2e088c1fc09e", + "https://jsr.io/@std/bytes/0.210.0/starts_with.ts": "5b0f2d1f93570639aa832ee21940c8418aa7ebc6ff8a54c1f8b9812b0e98c646", + "https://jsr.io/@std/crypto/0.210.0/timing_safe_equal.ts": "3dfd69a5cf20e4d5e94698dee8de9b596fa36356b04a47a5cdf8879a023abbbc", + "https://jsr.io/@std/crypto/0.210.0/unstable_keystack.ts": "58322099078d73a471146287de70f5e9a12ad52a0e5973a050aedeed54b2167d", + "https://jsr.io/@std/encoding/0.210.0/_util.ts": "f368920189c4fe6592ab2e93bd7ded8f3065b84f95cd3e036a4a10a75649dcba", + "https://jsr.io/@std/encoding/0.210.0/base64.ts": "4d2d7230ff6296e1617bfbd62585996118c9699fdc9b70a3051605b1c329cb91", + "https://jsr.io/@std/encoding/0.210.0/base64url.ts": "f2a5b519052d574f27a06e2a12c34228b1cdd23d81935001606744f2615e4092", + "https://jsr.io/@std/fmt/0.210.0/colors.ts": "9c7152c3104edb8f118139b3270ec46df7a7033225cc7e7a0c4df671228012c9", + "https://jsr.io/@std/fs/0.210.0/_create_walk_entry.ts": "bc8fcc74f6811d934418fa4956e3b75325c63c54970acdefa058499e57313635", + "https://jsr.io/@std/fs/0.210.0/_get_file_info_type.ts": "9c92ff74f39bfba66b09faf9901af6a944cc71f014d9649e7d3e32eac4aeddfc", + "https://jsr.io/@std/fs/0.210.0/_is_same_path.ts": "3327f0ba58f918072a2ce6f7b606c3dd348e39419d187bfaeed845e2c2391df8", + "https://jsr.io/@std/fs/0.210.0/_is_subdir.ts": "7edb37b72e9ce64e8e3684f8115a1298333a9ffaa127394345ce4062261ebdb2", + "https://jsr.io/@std/fs/0.210.0/_to_path_string.ts": "0519fed81d0c52c5fd922e39335e7d84f9ca8b651ec3e2d1e8623ee882a91506", + "https://jsr.io/@std/fs/0.210.0/copy.ts": "9044a577c1b56f03f8476e9b101628617d7c7312c8ee3959c7f447dbf8988211", + "https://jsr.io/@std/fs/0.210.0/empty_dir.ts": "085f7bc11d4b0745e35c089b2b981d1f17c43d2dd25bf52fdfd2270bc356491c", + "https://jsr.io/@std/fs/0.210.0/ensure_dir.ts": "f768f673feb21e59a4f641c7002da783f133d3b0a27bc7a34ee7ce06330bc44b", + "https://jsr.io/@std/fs/0.210.0/ensure_file.ts": "a77e5ab6673aaae81072a4f26ce60a04bd395169ff3cc7362e1c6b7e6eee7af4", + "https://jsr.io/@std/fs/0.210.0/ensure_link.ts": "abf16dee6ea1455acae7ff84647666b888ddb63a597db9f39eb4fe399135f300", + "https://jsr.io/@std/fs/0.210.0/ensure_symlink.ts": "2ac390f6c409068e7184b25ecbd152c7f4955b74f8d2f57831e62f8c3c1d2df8", + "https://jsr.io/@std/fs/0.210.0/eol.ts": "11422201f6483e801ec2db385ff5c893d808e218037d38fee2c0574ea6227440", + "https://jsr.io/@std/fs/0.210.0/exists.ts": "42636533140f9a37d9d22d963fff062eda65a0e3e7c3d626da2a13517fdf13e7", + "https://jsr.io/@std/fs/0.210.0/expand_glob.ts": "09dc879cff29ba647897150008ab483a5583840c0090190ce5155bfbdae7e2c9", + "https://jsr.io/@std/fs/0.210.0/mod.ts": "bc3d0acd488cc7b42627044caf47d72019846d459279544e1934418955ba4898", + "https://jsr.io/@std/fs/0.210.0/move.ts": "fa54fd66e050b0a9f24c4e78e72da6a9de1bd39f6f3d01202236e440956fc5e7", + "https://jsr.io/@std/fs/0.210.0/walk.ts": "b5c2c4e171e98f8911ed9e5c6515b056bd6fa02dd766f9946d7754b2836918cd", + "https://jsr.io/@std/http/0.210.0/_negotiation/common.ts": "14d1a52427ab258a4b7161cd80e1d8a207b7cc64b46e911780f57ead5f4323c6", + "https://jsr.io/@std/http/0.210.0/_negotiation/encoding.ts": "ff747d107277c88cb7a6a62a08eeb8d56dad91564cbcccb30694d5dc126dcc53", + "https://jsr.io/@std/http/0.210.0/_negotiation/language.ts": "7bcddd8db3330bdb7ce4fc00a213c5547c1968139864201efd67ef2d0d51887d", + "https://jsr.io/@std/http/0.210.0/_negotiation/media_type.ts": "58847517cd549384ad677c0fe89e0a4815be36fe7a303ea63cee5f6a1d7e1692", + "https://jsr.io/@std/http/0.210.0/etag.ts": "af7592ca9a65a69713341e401773a6b8c4f68baea2ad7c52d80520c17721a547", + "https://jsr.io/@std/http/0.210.0/negotiation.ts": "1f1c2e447589e8b2a2f42106822a41f22f2ce28a416b3d58366a1f214257b99b", + "https://jsr.io/@std/http/0.210.0/unstable_cookie_map.ts": "ba0bd29cecb30d1628b07a2a4510189618173895f36db420f6efb89b7f6ba637", + "https://jsr.io/@std/http/0.210.0/user_agent.ts": "ec375d4251b8ed23229401a5685d038c709e3d344fd7860b7ed64209200e5b59", + "https://jsr.io/@std/io/0.210.0/buf_reader.ts": "54283f8a528aff9428a4d082fb5b688e0472124274cee683deb35bedd818a3e6", + "https://jsr.io/@std/io/0.210.0/buf_writer.ts": "162459043c3285a316c8ce859ccefadc1336362cb1f8c00682240e284bc68254", + "https://jsr.io/@std/io/0.210.0/buffer.ts": "a868771d439504ac06abb0f3081fa72c9592c1658ad95645f4d7dd5902cc346b", + "https://jsr.io/@std/io/0.210.0/copy_n.ts": "db62715df471ed1a9f4ec2e6828d75f64d02c81cf8e9a216d40f39c72ca3963b", + "https://jsr.io/@std/io/0.210.0/limited_reader.ts": "cbcecd962fa9d292b5a226e657d3c9e60a374d19ae8a3bba9956e6ce4a08d760", + "https://jsr.io/@std/io/0.210.0/mod.ts": "61c2100d3eac23f0574cffb74257069a8308cf5183342d8c344fcf307e1d5b8c", + "https://jsr.io/@std/io/0.210.0/multi_reader.ts": "e7edd9157732776ba5483b2bc2597f7b3b27913207dbf411c79172c1fc8a884d", + "https://jsr.io/@std/io/0.210.0/read_delim.ts": "4dedfd0ff0216bbb5f71bdbbc6513be6d3a327659cfc07c004ef6254bc625618", + "https://jsr.io/@std/io/0.210.0/read_int.ts": "4e96b319f9b82b066c04e13f9f14ad4460bcaf367454844f6395b51820f5b74f", + "https://jsr.io/@std/io/0.210.0/read_lines.ts": "45b1a27df6d046adb7c14c72bfb328734160f1d2cafa4ab42e100ad99fb06e2a", + "https://jsr.io/@std/io/0.210.0/read_long.ts": "b24d81075cd69660ad789948a8413c04038b007890f69418fd3d96dfc5609903", + "https://jsr.io/@std/io/0.210.0/read_range.ts": "bdc3a159054afd1fb0fd0060f841434bc774ea2db67382d9909c0a2defd8cc5f", + "https://jsr.io/@std/io/0.210.0/read_short.ts": "a2dd615728dbb5cf4a16e23ef12a0d208bd36ceff8dc062a34e0cd2140538f53", + "https://jsr.io/@std/io/0.210.0/read_string_delim.ts": "acbc79d5eb807f6c736f861078c152cf3e6a103b0addda8d94335a8baf10b186", + "https://jsr.io/@std/io/0.210.0/slice_long_to_bytes.ts": "970b12c39f2a68dd29a038ae8f9ccf51298973867e97f4da739b669eb57f85b4", + "https://jsr.io/@std/io/0.210.0/string_reader.ts": "fd7e8babd7137e9b622dde2438c7f7d9638902d63f29ca43e91aa67ac957cb5c", + "https://jsr.io/@std/io/0.210.0/string_writer.ts": "5c0f8261b8c1a5a89f1885af091feda7021e25f7b40d567890e7c31ce8ee78eb", + "https://jsr.io/@std/media_types/0.210.0/_db.ts": "7606d83e31f23ce1a7968cbaee852810c2cf477903a095696cdc62eaab7ce570", + "https://jsr.io/@std/media_types/0.210.0/_util.ts": "0879b04cc810ff18d3dcd97d361e03c9dfb29f67d7fc4a9c6c9d387282ef5fe8", + "https://jsr.io/@std/media_types/0.210.0/content_type.ts": "9d610421833ccfefa4b84383f628eabf54939936afb1a99665af933510ba4d3e", + "https://jsr.io/@std/media_types/0.210.0/extension.ts": "3e584be89a6c7fbce1c4f7db4948fcc7cfabf460382cf89191ff4929f31500e5", + "https://jsr.io/@std/media_types/0.210.0/extensions_by_type.ts": "b79817bc5c05e22309f702818702e03979809592952aebbb65cbd4ae48bca107", + "https://jsr.io/@std/media_types/0.210.0/format_media_type.ts": "b7f2db7843a73b96cef6262368483ccd06687ebb726170fa6490012c6209ebc8", + "https://jsr.io/@std/media_types/0.210.0/get_charset.ts": "d8483018dd8ac55b2bcccf933c359b676265abe1226b88c76a8c77722b23ca77", + "https://jsr.io/@std/media_types/0.210.0/mod.ts": "d3f0b99f85053bc0b98ecc24eaa3546dfa09b856dc0bbaf60d8956d2cdd710c8", + "https://jsr.io/@std/media_types/0.210.0/parse_media_type.ts": "419e4245cda84bdfc062e1bfff4ac4bf880851abb1b3952d19bf9db1bc5a5d41", + "https://jsr.io/@std/media_types/0.210.0/type_by_extension.ts": "5645c68a16c1191003a191146916ceaf032a294422fc332b28abbcc3ca0931b2", + "https://jsr.io/@std/media_types/0.210.0/vendor/mime-db.v1.52.0.ts": "6925bbcae81ca37241e3f55908d0505724358cda3384eaea707773b2c7e99586", + "https://jsr.io/@std/path/0.210.0/_common/assert_path.ts": "061e4d093d4ba5aebceb2c4da3318bfe3289e868570e9d3a8e327d91c2958946", + "https://jsr.io/@std/path/0.210.0/_common/basename.ts": "0d978ff818f339cd3b1d09dc914881f4d15617432ae519c1b8fdc09ff8d3789a", + "https://jsr.io/@std/path/0.210.0/_common/common.ts": "9e4233b2eeb50f8b2ae10ecc2108f58583aea6fd3e8907827020282dc2b76143", + "https://jsr.io/@std/path/0.210.0/_common/constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", + "https://jsr.io/@std/path/0.210.0/_common/dirname.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/format.ts": "018a88fb76802286e87a871cafe5e4be147a2a90d794a331121560b66845ab63", + "https://jsr.io/@std/path/0.210.0/_common/from_file_url.ts": "ef1bf3197d2efbf0297a2bdbf3a61d804b18f2bcce45548ae112313ec5be3c22", + "https://jsr.io/@std/path/0.210.0/_common/glob_to_reg_exp.ts": "50386887d6041f15741d0013a703ee63ef673983d465d3a0c9c190e95f8da4fe", + "https://jsr.io/@std/path/0.210.0/_common/normalize.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/normalize_string.ts": "88c472f28ae49525f9fe82de8c8816d93442d46a30d6bb5063b07ff8a89ff589", + "https://jsr.io/@std/path/0.210.0/_common/relative.ts": "1af19d787a2a84b8c534cc487424fe101f614982ae4851382c978ab2216186b4", + "https://jsr.io/@std/path/0.210.0/_common/strip_trailing_separators.ts": "7ffc7c287e97bdeeee31b155828686967f222cd73f9e5780bfe7dfb1b58c6c65", + "https://jsr.io/@std/path/0.210.0/_common/to_file_url.ts": "a8cdd1633bc9175b7eebd3613266d7c0b6ae0fb0cff24120b6092ac31662f9ae", + "https://jsr.io/@std/path/0.210.0/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", + "https://jsr.io/@std/path/0.210.0/_os.ts": "30b0c2875f360c9296dbe6b7f2d528f0f9c741cecad2e97f803f5219e91b40a2", + "https://jsr.io/@std/path/0.210.0/basename.ts": "04bb5ef3e86bba8a35603b8f3b69537112cdd19ce64b77f2522006da2977a5f3", + "https://jsr.io/@std/path/0.210.0/common.ts": "8fcbd9399cd86e390e4160ea56e5afe7c65310e4152845392903e7b9afce4a3d", + "https://jsr.io/@std/path/0.210.0/dirname.ts": "88a0a71c21debafc4da7a4cd44fd32e899462df458fbca152390887d41c40361", + "https://jsr.io/@std/path/0.210.0/extname.ts": "8c6d6112bce335b4d3d5a07cb0451816d0c2094c147049874fca2db5f707044b", + "https://jsr.io/@std/path/0.210.0/format.ts": "3457530cc85d1b4bab175f9ae73998b34fd456c830d01883169af0681b8894fb", + "https://jsr.io/@std/path/0.210.0/from_file_url.ts": "a45def541616dfe357424708c19a9fe890b170893d77d8f2a1381294249774ce", + "https://jsr.io/@std/path/0.210.0/glob.ts": "a00a81a55c02bbe074ab21a50b6495c6f7795f54cd718c824adaa92c6c9b7419", + "https://jsr.io/@std/path/0.210.0/glob_to_regexp.ts": "74d7448c471e293d03f05ccb968df4365fed6aaa508506b6325a8efdc01d8271", + "https://jsr.io/@std/path/0.210.0/is_absolute.ts": "67232b41b860571c5b7537f4954c88d86ae2ba45e883ee37d3dec27b74909d13", + "https://jsr.io/@std/path/0.210.0/is_glob.ts": "567dce5c6656bdedfc6b3ee6c0833e1e4db2b8dff6e62148e94a917f289c06ad", + "https://jsr.io/@std/path/0.210.0/join.ts": "3ee91038e3eaa966897eddda43d5207d7cae5c2de8a658bdbd722e8f8f29206a", + "https://jsr.io/@std/path/0.210.0/join_globs.ts": "9b84d5103b63d3dbed4b2cf8b12477b2ad415c7d343f1488505162dc0e5f4db8", + "https://jsr.io/@std/path/0.210.0/mod.ts": "7c6fe3556d36492aee78badf4e92cecf67ca747e72d70cac6aac268fb5ccd47f", + "https://jsr.io/@std/path/0.210.0/normalize.ts": "aa95be9a92c7bd4f9dc0ba51e942a1973e2b93d266cd74f5ca751c136d520b66", + "https://jsr.io/@std/path/0.210.0/normalize_glob.ts": "674baa82e1c00b6cb153bbca36e06f8e0337cb8062db6d905ab5de16076ca46b", + "https://jsr.io/@std/path/0.210.0/parse.ts": "d87ff0deef3fb495bc0d862278ff96da5a06acf0625ca27769fc52ac0d3d6ece", + "https://jsr.io/@std/path/0.210.0/posix/_util.ts": "80c8e9b22ec44de0ea718f30738d382fb6278af2db504537dd559b064f762355", + "https://jsr.io/@std/path/0.210.0/posix/basename.ts": "86f4db191cc622da3f674d1cde6f8ad343c14d5fc484ff8feedbc8bba796d7d7", + "https://jsr.io/@std/path/0.210.0/posix/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/posix/dirname.ts": "70c73fd302935a05c0f453ab239bb526fb9ddd06e98d7524ff248a0027e5d4c8", + "https://jsr.io/@std/path/0.210.0/posix/extname.ts": "4b96dc7b8ef6ce156c759a126cbe8a00f8d022476425ad32eef01d16a910caa4", + "https://jsr.io/@std/path/0.210.0/posix/format.ts": "df268803afafeba3df4d20b4b7f287339cb4efcfc6caf55585fb45deda6e718f", + "https://jsr.io/@std/path/0.210.0/posix/from_file_url.ts": "e1ee657d8e993dc7a38c85cda95fa83049c35e75336e09d33810480a24a4120f", + "https://jsr.io/@std/path/0.210.0/posix/glob_to_regexp.ts": "e0ce84c7517db460ea9f99558c190584615fff5cb0ddacad98604e96d81edc1e", + "https://jsr.io/@std/path/0.210.0/posix/is_absolute.ts": "7b139bd0574c2cb4940ca3cdb5070258269d29e01d870a5e42ced4e9553cb7b2", + "https://jsr.io/@std/path/0.210.0/posix/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/posix/join.ts": "d8748c1dca2c199a7d371d31ca7f7ba425a2aad0ce25701375449165a7ef6887", + "https://jsr.io/@std/path/0.210.0/posix/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/posix/mod.ts": "30e9a595bb14869559df577cfacf79a35ece94227e814f5c1fc34c513cf9cc4e", + "https://jsr.io/@std/path/0.210.0/posix/normalize.ts": "b8f962d83e1bd5cd305fa5e34742c2ea4238ebb745a2cf641632bf6a09453456", + "https://jsr.io/@std/path/0.210.0/posix/normalize_glob.ts": "b648aa0d42a0d796eec26329c329c1de7b618e02b062a92085560394190a687a", + "https://jsr.io/@std/path/0.210.0/posix/parse.ts": "1df1f2b311ba07be7a83733444be1bae08f2dbaf70b85a084f67a49ebd05b2cf", + "https://jsr.io/@std/path/0.210.0/posix/relative.ts": "c67d8b2c80ddc978d30dc6e5e35b6eed51dd9de3e75b5f1a22afdf1b4080c60b", + "https://jsr.io/@std/path/0.210.0/posix/resolve.ts": "0de87a7a7032ab739b01620f66b51b7fb2b1dc0c6a7bbd3fb3fd402368673cf6", + "https://jsr.io/@std/path/0.210.0/posix/separator.ts": "0b6573b5f3269a3164d8edc9cefc33a02dd51003731c561008c8bb60220ebac1", + "https://jsr.io/@std/path/0.210.0/posix/to_file_url.ts": "2fc025607330c0e8b0a94bc180c07e517881de00f1c8ea8c3abdd0e70a2a404f", + "https://jsr.io/@std/path/0.210.0/posix/to_namespaced_path.ts": "c9228a0e74fd37e76622cd7b142b8416663a9b87db643302fa0926b5a5c83bdc", + "https://jsr.io/@std/path/0.210.0/relative.ts": "23d45ede8b7ac464a8299663a43488aad6b561414e7cbbe4790775590db6349c", + "https://jsr.io/@std/path/0.210.0/resolve.ts": "5b184efc87155a0af9fa305ff68a109e28de9aee81fc3e77cd01380f19daf867", + "https://jsr.io/@std/path/0.210.0/separator.ts": "1a21ffd408bfaa317bffff604e5a799f78a7a5571590bde6b9cdce7685953d74", + "https://jsr.io/@std/path/0.210.0/to_file_url.ts": "8895a9cd369819c689f8e53131c03277c0c79b56acbe0533b42f2f0b4ead7cbe", + "https://jsr.io/@std/path/0.210.0/to_namespaced_path.ts": "cf8734848aac3c7527d1689d2adf82132b1618eff3cc523a775068847416b22a", + "https://jsr.io/@std/path/0.210.0/windows/_util.ts": "4e44914486b5dc4cca98880693971ea15238c6bae67d8131c39e1112ea427909", + "https://jsr.io/@std/path/0.210.0/windows/basename.ts": "9ae2c0d1df814af9d660fd170c239dde1b66cbdf158185b4fbd7dddccc91bac4", + "https://jsr.io/@std/path/0.210.0/windows/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/windows/dirname.ts": "8be11039908fc7d09ac13e37ad2f31b7b19c0a5d6a238181c46e3ea41b910ac2", + "https://jsr.io/@std/path/0.210.0/windows/extname.ts": "0e22da7b84d0a89b79cc7a2e9c7163ab742fc600a8ffd8ea42aae633a5ac5a30", + "https://jsr.io/@std/path/0.210.0/windows/format.ts": "e3d94cb0f2ca1ed31c268ab6231dbd7478dec3cb7b276ece4421474598b55226", + "https://jsr.io/@std/path/0.210.0/windows/from_file_url.ts": "00d145aa2c793781cdc2740612bf897dac81c18a6c15420fb516e4030269108a", + "https://jsr.io/@std/path/0.210.0/windows/glob_to_regexp.ts": "5cbefcad6ae88294d23faf5b0f4766f4e1a0c2369ca14edae02c3876d1fa1ed9", + "https://jsr.io/@std/path/0.210.0/windows/is_absolute.ts": "16bc7d8aa335780336821158a147dba360127bc648699ea4302719454647e160", + "https://jsr.io/@std/path/0.210.0/windows/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/windows/join.ts": "a5c3ce40827eaac55ef52e791bdd30d8d40c9e748227243ea3185ecfe49a85fc", + "https://jsr.io/@std/path/0.210.0/windows/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/windows/mod.ts": "98e5151661d2cf34a0a291ff16e292e5079e9fb7cd64c93684f3f5a29d217123", + "https://jsr.io/@std/path/0.210.0/windows/normalize.ts": "d5c2da8f188f5ec342695f1284e2585ba50678ba187c8897c566569bbf9e4092", + "https://jsr.io/@std/path/0.210.0/windows/normalize_glob.ts": "db339cfb08e9bb38d49ce005ce318a20d03b77dbb75294a68d050f3d254887ad", + "https://jsr.io/@std/path/0.210.0/windows/parse.ts": "307029d3c69e8310452df48c238993e4ee41cbc8f7b9f4be6c1ad1201658c608", + "https://jsr.io/@std/path/0.210.0/windows/relative.ts": "f79960e8b922ed35197e53d2ae09a95ffdce7844c8430bf782f01f9d721731c7", + "https://jsr.io/@std/path/0.210.0/windows/resolve.ts": "c9111c13cbe521d36e3cb54eaeee146d04b9674ecb0df91aa9536f6bfd97903a", + "https://jsr.io/@std/path/0.210.0/windows/separator.ts": "ae21f27015f10510ed1ac4a0ba9c4c9c967cbdd9d9e776a3e4967553c397bd5d", + "https://jsr.io/@std/path/0.210.0/windows/to_file_url.ts": "2be7e66a8321a66cc382ddbeeaf79e0e962c83688e2e3c4be689276099680298", + "https://jsr.io/@std/path/0.210.0/windows/to_namespaced_path.ts": "e4e6f67f9c0f097f8eb913597064aacadb3abb158735773096d55f8d234f466b", + "https://jsr.io/@std/streams/0.210.0/_common.ts": "3b2c1f0287ce2ad51fff4091a7d0f48375c85b0ec341468e76d5ac13bb0014dd", + "https://jsr.io/@std/streams/0.210.0/buffer.ts": "ef343c8e8d51fe8b3e3b9ef5f08e119a630c0565713884efe54200207b8de513", + "https://jsr.io/@std/streams/0.210.0/byte_slice_stream.ts": "1831fdeb6237ab0404dc612eb78e2fcec9d24cb9cfa9519e4bd36188a81df6e2", + "https://jsr.io/@std/streams/0.210.0/copy.ts": "6a33fdb2c93817e33e5fdd78c8e799b914d09f45ac5608a84b56495c7823fdc6", + "https://jsr.io/@std/streams/0.210.0/delimiter_stream.ts": "db0c1d5852853d6fbb60abda6e2067efd6f121d6668367d7dc571aeecc0f1393", + "https://jsr.io/@std/streams/0.210.0/early_zip_readable_streams.ts": "3adf4c78d52fad18c6f201159b7796317c8082620036dd9a3d990204b5764981", + "https://jsr.io/@std/streams/0.210.0/iterate_reader.ts": "12b4d47ca6540a8feab09599828f59a44d431dc1a9c779d54f4d544185e5c326", + "https://jsr.io/@std/streams/0.210.0/limited_bytes_transform_stream.ts": "43c91a66ac7c3066133d007e4a25b802667d80d84c3de221d18a67167c3088e3", + "https://jsr.io/@std/streams/0.210.0/limited_transform_stream.ts": "584af31000cb4dc970d8244c41b2b3b3a6e3f9a078fceefea8c4312c8aee6e51", + "https://jsr.io/@std/streams/0.210.0/merge_readable_streams.ts": "e69a985ac1d4e24d29476c134f2ceb2b517b528649fd4ad8f66b887dbf65a8cf", + "https://jsr.io/@std/streams/0.210.0/mod.ts": "e133c271474f1e9dc19f5c4959406f5c2101540c56a3e7d7abc6bdb7bcef807e", + "https://jsr.io/@std/streams/0.210.0/read_all.ts": "c4c8b499668a7225fcb898274ec00374cf7b331e0d14dfe9bf44da03644a968c", + "https://jsr.io/@std/streams/0.210.0/readable_stream_from_reader.ts": "3d5bfd2567560557291ac6b01f0b045cd2336e3ebdb1f8c6c46726121585752c", + "https://jsr.io/@std/streams/0.210.0/reader_from_iterable.ts": "cbe640306618c4a61b2e43a710b1c89336c343e627f97b03bc5aa2c78a9c97a4", + "https://jsr.io/@std/streams/0.210.0/reader_from_stream_reader.ts": "56ef51217a464551e8efdc65a4c28c6d14148fbfd23ed88401732c50fcb3cf3d", + "https://jsr.io/@std/streams/0.210.0/text_delimiter_stream.ts": "00158278225105fedbadc0cbe5bf0e7d70cb2cf062eb48b4f5db694ba3a2dd61", + "https://jsr.io/@std/streams/0.210.0/text_line_stream.ts": "a74dc71908ebde4bf4d186b6d4be64475d7e43269a44e29c2d38984692501f03", + "https://jsr.io/@std/streams/0.210.0/to_array_buffer.ts": "c1322d7d8601f3e7516f2e1fc391a278b23d13ecd0213b44f4de63f9bdefa227", + "https://jsr.io/@std/streams/0.210.0/to_blob.ts": "0f5750b41e92abeeac81008e6df848206a0b83caf74d398da717d65cbb86a786", + "https://jsr.io/@std/streams/0.210.0/to_json.ts": "8986526388c2520c89abeba59fac3e1b6eaeee630f2bc271da0ba48cc24281c1", + "https://jsr.io/@std/streams/0.210.0/to_text.ts": "914a799c0e931d1f94cb8762d3909e3d9abdd15f20d7136ba2c848128825d8e6", + "https://jsr.io/@std/streams/0.210.0/to_transform_stream.ts": "59ff4acbd3a071daef6ad658213a7a7bac0cb33491b10e96210fb040e870a7c0", + "https://jsr.io/@std/streams/0.210.0/writable_stream_from_writer.ts": "6536e7aa2201e42730f24c901f27376edb092751d1aba6592ff5926c00537998", + "https://jsr.io/@std/streams/0.210.0/write_all.ts": "f96c63b2ab49ce4b7404250e53e0e02b15d499d8e67e950718280252888aae1d", + "https://jsr.io/@std/streams/0.210.0/writer_from_stream_writer.ts": "1e442c1523abf3343070edb598b9f71650ee375b53e7b1c8c41d1a2f1dc16a8b", + "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638", + "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" + }, + "workspace": { + "dependencies": [ + "jsr:@dsherret/dax", + ], + "members": { + "package_a": { + "dependencies": [ + "jsr:@oak/oak" + ] + } + } + } +} + +# remove oak +{ + "dependencies": [ + "jsr:@dsherret/dax" + ], + "members": { + "package_a": { + "dependencies": [ + ] + } + } +} + +# output +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@dsherret/dax": "jsr:@dsherret/dax@0.0.1", + "jsr:@dsherret/which@0.0.1": "jsr:@dsherret/which@0.0.1", + "jsr:@std/assert@0.210": "jsr:@std/assert@0.210.0", + "jsr:@std/assert@^0.210.0": "jsr:@std/assert@0.210.0", + "jsr:@std/bytes@0.210": "jsr:@std/bytes@0.210.0", + "jsr:@std/bytes@^0.210.0": "jsr:@std/bytes@0.210.0", + "jsr:@std/fmt@0.210.0": "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0": "jsr:@std/fs@0.210.0", + "jsr:@std/io@0.210": "jsr:@std/io@0.210.0", + "jsr:@std/io@0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/io@^0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/path@0.210": "jsr:@std/path@0.210.0", + "jsr:@std/path@0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/path@^0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210": "jsr:@std/streams@0.210.0", + "jsr:@std/streams@0.210.0": "jsr:@std/streams@0.210.0", + "jsr:@zome_unreferenced/package": "jsr:@zome_unreferenced/package@0.1.0", + "jsr:@zome_unreferenced/package_b": "jsr:@zome_unreferenced/package_b@0.1.0" + }, + "jsr": { + "@dsherret/dax@0.0.1": { + "dependencies": [ + "jsr:@dsherret/which@0.0.1", + "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0", + "jsr:@std/io@0.210.0", + "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210.0" + ] + }, + "@std/fs@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/path@^0.210.0" + ] + }, + "@std/io@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0" + ] + }, + "@std/path@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0" + ] + }, + "@std/streams@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0", + "jsr:@std/io@^0.210.0" + ] + }, + "jsr:@zome_unreferenced/package@0.1.0": { + "dependencies": [ + "jsr:@zome_unreferenced/package_b" + ] + } + } + }, + "remote": { + "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@dsherret/dax/0.0.1/src/command.ts": "e5dc7e3af38240657b4b9dc106b044c9c75bf16385c8f8af1c795ca89e27c3bc", + "https://jsr.io/@dsherret/dax/0.0.1/src/command_handler.ts": "56ee6893bf5ec829c370fe5a9367f60b3590e571f7b69153d48686779ab14d98", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/args.ts": "a138aef24294e3cbf13cef08f4836d018e8dd99fd06ad82e7e7f08ef680bbc1d", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cat.ts": "984035bd43b62c12764bcf321d84ce4bbe271aedaac48d251c8db080022d5cbf", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cd.ts": "82e85b573dd3006eefc20d1849ca638e461946688749e9a4ea53ab07c03ef7e4", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cp_mv.ts": "aa09e3ab95c5eaae1186ad9a84d94977e19f4fa3c3fd5ab6a45b0b009600aae6", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/echo.ts": "a4f86022ad4eb5b8e8326e45fd2f571f6bd5e3c842f0c10e0be69f35b0d78180", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/exit.ts": "86b181d0f1e7723b265ec7a8858a43f5cac56cd485375524b4d8f022c5632419", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/export.ts": "1d5012c6b991e3c1112cc5841520e1ae651a20a0fd6c2e8014c79eba571755be", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/mkdir.ts": "620ecc4d690b342ecea9e9849303a4f8e2f65b430b70be846c1de766c9b5bbe7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/printenv.ts": "1efa36e21c6039da424c99753d748a486c3a7621507ca9d8d319e2a6e3e259ac", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/pwd.ts": "d89fac9ca37afe54967acd24744c3255aacc63f51697c27fe8d2e90a9049088f", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/rm.ts": "9c3b200c154c4a3c7e3b9ab9204daaad62b961453e9a8c8fc9a0451953e59f75", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/sleep.ts": "50b162accce6b8f20180f13d01613a6da6d88920d8322ac46ff7a2bbd6fcfbd7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/test.ts": "d4a72076e652b3be65eaec9ff26eb342f5293140a82fa6bc357fa77b895ec3ab", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/touch.ts": "8386148784f92455502f09880306bc859ab61540c80fe0de0686b323662ee1fb", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/unset.ts": "dbebdad7e6e301ee621161a13669ab4164025aee5b323658ab283dab64b9eebf", + "https://jsr.io/@dsherret/dax/0.0.1/src/common.ts": "7295d13ab0023bb09d4c97e3a131cedada6294a33474f136b652a145330c8e3e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/confirm.ts": "ffcc76ebf10c8bfde6e4072b70b271e0453170ab0bd0bb795bc4e52a1237062e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/logger.ts": "e0ab5025915cef70df03681c756e211f25bb2e4331f82ed4256b17ddd9e794ea", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/mod.ts": "de8af7d646f6cb222eee6560171993690247941b13ed9d757789d16f019d73ee", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/multiSelect.ts": "50ff5de156028ff21025917b4c797c877037bf1460974b0f72b6ab0907d0a3d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/format.ts": "15ddbb8051580f88ed499281e12ca6f881f875ab73268d7451d7113ee130bd7d", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/interval.ts": "82bd91b9f8219c8d03b7aad51e7425f3276d96615b32826693dffd5905d663d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/mod.ts": "5ae6cf88fe8caaa5c8218511c9458944201da5fbc9749b200d9e1227c93b3b9e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/prompt.ts": "91c8d03fe2179438629491e71a6bdf0b6ca5bd31cbcc29ac7a2529daefe24d94", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/select.ts": "6b96555d7a13acd6e864a874e5687044932cf2412a45dc2811613cb2f00900ca", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/utils.ts": "4e4f8cf5e435345e4ad94523544dc112e25969a12bdd05fb8073729e078cf47a", + "https://jsr.io/@dsherret/dax/0.0.1/src/deps.ts": "8e1acae3e51645f52fda44ffa528e3c346f00b37afc4bba1c2c90433d551bccb", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/mod.ts": "c992db99c8259ae3bf2d35666585dfefda84cf7cf4e624e42ea2ac7367900fe0", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/rs_lib.generated.js": "932a69348ce575e4a5c2398c896e9cd06cf287f6c18fb25dfdf23badca1c9f54", + "https://jsr.io/@dsherret/dax/0.0.1/src/path.ts": "365ed563f1a7421c20b094f5e56ca1f1ae9608b2a568b7ad394a63bdeabc1313", + "https://jsr.io/@dsherret/dax/0.0.1/src/pipes.ts": "850243b55f40eaad1f0020455c63905a0a41f543c2b7031d38188051398692d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/request.ts": "9856b955ac1a0831a4998b23ba7be2f5e74ab3fd17230bc28476781c9f0f20d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/result.ts": "0908b69c16b25c3b258f6b2ada12e124686df5f7ea2b98daa27a83973c7b118c", + "https://jsr.io/@dsherret/dax/0.0.1/src/shell.ts": "e18dcdccd5edf8ad8cd56b1e58a2b4f094eb969f3499303adde66ee71d231770", + "https://jsr.io/@dsherret/dax/0.0.1/src/vendor/outdent.ts": "d2f45f327f06ac8607a8fb6f6c428f25f8bb03673d07795541cf880e5f5c38e2", + "https://jsr.io/@dsherret/which/0.0.1/mod.ts": "cca0ebcff4f6c9088f7b9d7e5859b3561f0701b83a83b739000bfebb34eaebb5", + "https://jsr.io/@std/assert/0.210.0/assert.ts": "482cc19da8c816e226caa566d2b146258ecd6744eaac9c11ba7ad4560728f539", + "https://jsr.io/@std/assert/0.210.0/assertion_error.ts": "933921a961c2268d1d6914502b6dc927635952c87945cf4f378e1faa44ed5c41", + "https://jsr.io/@std/bytes/0.210.0/concat.ts": "e2ce8efada37cd155af124be42d8223cbbf8c799d002c453d61b34d4890df68a", + "https://jsr.io/@std/bytes/0.210.0/copy.ts": "7c8aa7f6e8280f34976712c30207ffb9de5c58a6f04dfeebcd34d946010cbe7c", + "https://jsr.io/@std/bytes/0.210.0/ends_with.ts": "21a9860e56476d5327a81269ce4936fe43821e90fed066330f6e18db26303170", + "https://jsr.io/@std/bytes/0.210.0/equals.ts": "fc190cce412b2136979181b163ec7e05f7e7a947e39102eee4b8c0d62519ddf9", + "https://jsr.io/@std/bytes/0.210.0/includes_needle.ts": "52f712898557827096bad92798cbb7a816af6637c1bf5003fc802b573a6a35e8", + "https://jsr.io/@std/bytes/0.210.0/index_of_needle.ts": "f678648ac446b4544fe7ea3ac799f511a201e13c3a9ae1286ad2cad053181262", + "https://jsr.io/@std/bytes/0.210.0/last_index_of_needle.ts": "3d1b5edfa2244538840e92ea728cc30405f8a0b421ebab9d8ba5b868fdf4ea79", + "https://jsr.io/@std/bytes/0.210.0/mod.ts": "9ed597c10cc61cdcd4cf725ad7ed935f6dc7ff481ba6bcc6d6a47633ea1ae0b8", + "https://jsr.io/@std/bytes/0.210.0/repeat.ts": "3a00f65e7b821938d424ae93cee7bf0c7fa188308b64085d027e2e088c1fc09e", + "https://jsr.io/@std/bytes/0.210.0/starts_with.ts": "5b0f2d1f93570639aa832ee21940c8418aa7ebc6ff8a54c1f8b9812b0e98c646", + "https://jsr.io/@std/fmt/0.210.0/colors.ts": "9c7152c3104edb8f118139b3270ec46df7a7033225cc7e7a0c4df671228012c9", + "https://jsr.io/@std/fs/0.210.0/_create_walk_entry.ts": "bc8fcc74f6811d934418fa4956e3b75325c63c54970acdefa058499e57313635", + "https://jsr.io/@std/fs/0.210.0/_get_file_info_type.ts": "9c92ff74f39bfba66b09faf9901af6a944cc71f014d9649e7d3e32eac4aeddfc", + "https://jsr.io/@std/fs/0.210.0/_is_same_path.ts": "3327f0ba58f918072a2ce6f7b606c3dd348e39419d187bfaeed845e2c2391df8", + "https://jsr.io/@std/fs/0.210.0/_is_subdir.ts": "7edb37b72e9ce64e8e3684f8115a1298333a9ffaa127394345ce4062261ebdb2", + "https://jsr.io/@std/fs/0.210.0/_to_path_string.ts": "0519fed81d0c52c5fd922e39335e7d84f9ca8b651ec3e2d1e8623ee882a91506", + "https://jsr.io/@std/fs/0.210.0/copy.ts": "9044a577c1b56f03f8476e9b101628617d7c7312c8ee3959c7f447dbf8988211", + "https://jsr.io/@std/fs/0.210.0/empty_dir.ts": "085f7bc11d4b0745e35c089b2b981d1f17c43d2dd25bf52fdfd2270bc356491c", + "https://jsr.io/@std/fs/0.210.0/ensure_dir.ts": "f768f673feb21e59a4f641c7002da783f133d3b0a27bc7a34ee7ce06330bc44b", + "https://jsr.io/@std/fs/0.210.0/ensure_file.ts": "a77e5ab6673aaae81072a4f26ce60a04bd395169ff3cc7362e1c6b7e6eee7af4", + "https://jsr.io/@std/fs/0.210.0/ensure_link.ts": "abf16dee6ea1455acae7ff84647666b888ddb63a597db9f39eb4fe399135f300", + "https://jsr.io/@std/fs/0.210.0/ensure_symlink.ts": "2ac390f6c409068e7184b25ecbd152c7f4955b74f8d2f57831e62f8c3c1d2df8", + "https://jsr.io/@std/fs/0.210.0/eol.ts": "11422201f6483e801ec2db385ff5c893d808e218037d38fee2c0574ea6227440", + "https://jsr.io/@std/fs/0.210.0/exists.ts": "42636533140f9a37d9d22d963fff062eda65a0e3e7c3d626da2a13517fdf13e7", + "https://jsr.io/@std/fs/0.210.0/expand_glob.ts": "09dc879cff29ba647897150008ab483a5583840c0090190ce5155bfbdae7e2c9", + "https://jsr.io/@std/fs/0.210.0/mod.ts": "bc3d0acd488cc7b42627044caf47d72019846d459279544e1934418955ba4898", + "https://jsr.io/@std/fs/0.210.0/move.ts": "fa54fd66e050b0a9f24c4e78e72da6a9de1bd39f6f3d01202236e440956fc5e7", + "https://jsr.io/@std/fs/0.210.0/walk.ts": "b5c2c4e171e98f8911ed9e5c6515b056bd6fa02dd766f9946d7754b2836918cd", + "https://jsr.io/@std/io/0.210.0/buf_reader.ts": "54283f8a528aff9428a4d082fb5b688e0472124274cee683deb35bedd818a3e6", + "https://jsr.io/@std/io/0.210.0/buf_writer.ts": "162459043c3285a316c8ce859ccefadc1336362cb1f8c00682240e284bc68254", + "https://jsr.io/@std/io/0.210.0/buffer.ts": "a868771d439504ac06abb0f3081fa72c9592c1658ad95645f4d7dd5902cc346b", + "https://jsr.io/@std/io/0.210.0/copy_n.ts": "db62715df471ed1a9f4ec2e6828d75f64d02c81cf8e9a216d40f39c72ca3963b", + "https://jsr.io/@std/io/0.210.0/limited_reader.ts": "cbcecd962fa9d292b5a226e657d3c9e60a374d19ae8a3bba9956e6ce4a08d760", + "https://jsr.io/@std/io/0.210.0/mod.ts": "61c2100d3eac23f0574cffb74257069a8308cf5183342d8c344fcf307e1d5b8c", + "https://jsr.io/@std/io/0.210.0/multi_reader.ts": "e7edd9157732776ba5483b2bc2597f7b3b27913207dbf411c79172c1fc8a884d", + "https://jsr.io/@std/io/0.210.0/read_delim.ts": "4dedfd0ff0216bbb5f71bdbbc6513be6d3a327659cfc07c004ef6254bc625618", + "https://jsr.io/@std/io/0.210.0/read_int.ts": "4e96b319f9b82b066c04e13f9f14ad4460bcaf367454844f6395b51820f5b74f", + "https://jsr.io/@std/io/0.210.0/read_lines.ts": "45b1a27df6d046adb7c14c72bfb328734160f1d2cafa4ab42e100ad99fb06e2a", + "https://jsr.io/@std/io/0.210.0/read_long.ts": "b24d81075cd69660ad789948a8413c04038b007890f69418fd3d96dfc5609903", + "https://jsr.io/@std/io/0.210.0/read_range.ts": "bdc3a159054afd1fb0fd0060f841434bc774ea2db67382d9909c0a2defd8cc5f", + "https://jsr.io/@std/io/0.210.0/read_short.ts": "a2dd615728dbb5cf4a16e23ef12a0d208bd36ceff8dc062a34e0cd2140538f53", + "https://jsr.io/@std/io/0.210.0/read_string_delim.ts": "acbc79d5eb807f6c736f861078c152cf3e6a103b0addda8d94335a8baf10b186", + "https://jsr.io/@std/io/0.210.0/slice_long_to_bytes.ts": "970b12c39f2a68dd29a038ae8f9ccf51298973867e97f4da739b669eb57f85b4", + "https://jsr.io/@std/io/0.210.0/string_reader.ts": "fd7e8babd7137e9b622dde2438c7f7d9638902d63f29ca43e91aa67ac957cb5c", + "https://jsr.io/@std/io/0.210.0/string_writer.ts": "5c0f8261b8c1a5a89f1885af091feda7021e25f7b40d567890e7c31ce8ee78eb", + "https://jsr.io/@std/path/0.210.0/_common/assert_path.ts": "061e4d093d4ba5aebceb2c4da3318bfe3289e868570e9d3a8e327d91c2958946", + "https://jsr.io/@std/path/0.210.0/_common/basename.ts": "0d978ff818f339cd3b1d09dc914881f4d15617432ae519c1b8fdc09ff8d3789a", + "https://jsr.io/@std/path/0.210.0/_common/common.ts": "9e4233b2eeb50f8b2ae10ecc2108f58583aea6fd3e8907827020282dc2b76143", + "https://jsr.io/@std/path/0.210.0/_common/constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", + "https://jsr.io/@std/path/0.210.0/_common/dirname.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/format.ts": "018a88fb76802286e87a871cafe5e4be147a2a90d794a331121560b66845ab63", + "https://jsr.io/@std/path/0.210.0/_common/from_file_url.ts": "ef1bf3197d2efbf0297a2bdbf3a61d804b18f2bcce45548ae112313ec5be3c22", + "https://jsr.io/@std/path/0.210.0/_common/glob_to_reg_exp.ts": "50386887d6041f15741d0013a703ee63ef673983d465d3a0c9c190e95f8da4fe", + "https://jsr.io/@std/path/0.210.0/_common/normalize.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/normalize_string.ts": "88c472f28ae49525f9fe82de8c8816d93442d46a30d6bb5063b07ff8a89ff589", + "https://jsr.io/@std/path/0.210.0/_common/relative.ts": "1af19d787a2a84b8c534cc487424fe101f614982ae4851382c978ab2216186b4", + "https://jsr.io/@std/path/0.210.0/_common/strip_trailing_separators.ts": "7ffc7c287e97bdeeee31b155828686967f222cd73f9e5780bfe7dfb1b58c6c65", + "https://jsr.io/@std/path/0.210.0/_common/to_file_url.ts": "a8cdd1633bc9175b7eebd3613266d7c0b6ae0fb0cff24120b6092ac31662f9ae", + "https://jsr.io/@std/path/0.210.0/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", + "https://jsr.io/@std/path/0.210.0/_os.ts": "30b0c2875f360c9296dbe6b7f2d528f0f9c741cecad2e97f803f5219e91b40a2", + "https://jsr.io/@std/path/0.210.0/basename.ts": "04bb5ef3e86bba8a35603b8f3b69537112cdd19ce64b77f2522006da2977a5f3", + "https://jsr.io/@std/path/0.210.0/common.ts": "8fcbd9399cd86e390e4160ea56e5afe7c65310e4152845392903e7b9afce4a3d", + "https://jsr.io/@std/path/0.210.0/dirname.ts": "88a0a71c21debafc4da7a4cd44fd32e899462df458fbca152390887d41c40361", + "https://jsr.io/@std/path/0.210.0/extname.ts": "8c6d6112bce335b4d3d5a07cb0451816d0c2094c147049874fca2db5f707044b", + "https://jsr.io/@std/path/0.210.0/format.ts": "3457530cc85d1b4bab175f9ae73998b34fd456c830d01883169af0681b8894fb", + "https://jsr.io/@std/path/0.210.0/from_file_url.ts": "a45def541616dfe357424708c19a9fe890b170893d77d8f2a1381294249774ce", + "https://jsr.io/@std/path/0.210.0/glob.ts": "a00a81a55c02bbe074ab21a50b6495c6f7795f54cd718c824adaa92c6c9b7419", + "https://jsr.io/@std/path/0.210.0/glob_to_regexp.ts": "74d7448c471e293d03f05ccb968df4365fed6aaa508506b6325a8efdc01d8271", + "https://jsr.io/@std/path/0.210.0/is_absolute.ts": "67232b41b860571c5b7537f4954c88d86ae2ba45e883ee37d3dec27b74909d13", + "https://jsr.io/@std/path/0.210.0/is_glob.ts": "567dce5c6656bdedfc6b3ee6c0833e1e4db2b8dff6e62148e94a917f289c06ad", + "https://jsr.io/@std/path/0.210.0/join.ts": "3ee91038e3eaa966897eddda43d5207d7cae5c2de8a658bdbd722e8f8f29206a", + "https://jsr.io/@std/path/0.210.0/join_globs.ts": "9b84d5103b63d3dbed4b2cf8b12477b2ad415c7d343f1488505162dc0e5f4db8", + "https://jsr.io/@std/path/0.210.0/mod.ts": "7c6fe3556d36492aee78badf4e92cecf67ca747e72d70cac6aac268fb5ccd47f", + "https://jsr.io/@std/path/0.210.0/normalize.ts": "aa95be9a92c7bd4f9dc0ba51e942a1973e2b93d266cd74f5ca751c136d520b66", + "https://jsr.io/@std/path/0.210.0/normalize_glob.ts": "674baa82e1c00b6cb153bbca36e06f8e0337cb8062db6d905ab5de16076ca46b", + "https://jsr.io/@std/path/0.210.0/parse.ts": "d87ff0deef3fb495bc0d862278ff96da5a06acf0625ca27769fc52ac0d3d6ece", + "https://jsr.io/@std/path/0.210.0/posix/_util.ts": "80c8e9b22ec44de0ea718f30738d382fb6278af2db504537dd559b064f762355", + "https://jsr.io/@std/path/0.210.0/posix/basename.ts": "86f4db191cc622da3f674d1cde6f8ad343c14d5fc484ff8feedbc8bba796d7d7", + "https://jsr.io/@std/path/0.210.0/posix/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/posix/dirname.ts": "70c73fd302935a05c0f453ab239bb526fb9ddd06e98d7524ff248a0027e5d4c8", + "https://jsr.io/@std/path/0.210.0/posix/extname.ts": "4b96dc7b8ef6ce156c759a126cbe8a00f8d022476425ad32eef01d16a910caa4", + "https://jsr.io/@std/path/0.210.0/posix/format.ts": "df268803afafeba3df4d20b4b7f287339cb4efcfc6caf55585fb45deda6e718f", + "https://jsr.io/@std/path/0.210.0/posix/from_file_url.ts": "e1ee657d8e993dc7a38c85cda95fa83049c35e75336e09d33810480a24a4120f", + "https://jsr.io/@std/path/0.210.0/posix/glob_to_regexp.ts": "e0ce84c7517db460ea9f99558c190584615fff5cb0ddacad98604e96d81edc1e", + "https://jsr.io/@std/path/0.210.0/posix/is_absolute.ts": "7b139bd0574c2cb4940ca3cdb5070258269d29e01d870a5e42ced4e9553cb7b2", + "https://jsr.io/@std/path/0.210.0/posix/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/posix/join.ts": "d8748c1dca2c199a7d371d31ca7f7ba425a2aad0ce25701375449165a7ef6887", + "https://jsr.io/@std/path/0.210.0/posix/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/posix/mod.ts": "30e9a595bb14869559df577cfacf79a35ece94227e814f5c1fc34c513cf9cc4e", + "https://jsr.io/@std/path/0.210.0/posix/normalize.ts": "b8f962d83e1bd5cd305fa5e34742c2ea4238ebb745a2cf641632bf6a09453456", + "https://jsr.io/@std/path/0.210.0/posix/normalize_glob.ts": "b648aa0d42a0d796eec26329c329c1de7b618e02b062a92085560394190a687a", + "https://jsr.io/@std/path/0.210.0/posix/parse.ts": "1df1f2b311ba07be7a83733444be1bae08f2dbaf70b85a084f67a49ebd05b2cf", + "https://jsr.io/@std/path/0.210.0/posix/relative.ts": "c67d8b2c80ddc978d30dc6e5e35b6eed51dd9de3e75b5f1a22afdf1b4080c60b", + "https://jsr.io/@std/path/0.210.0/posix/resolve.ts": "0de87a7a7032ab739b01620f66b51b7fb2b1dc0c6a7bbd3fb3fd402368673cf6", + "https://jsr.io/@std/path/0.210.0/posix/separator.ts": "0b6573b5f3269a3164d8edc9cefc33a02dd51003731c561008c8bb60220ebac1", + "https://jsr.io/@std/path/0.210.0/posix/to_file_url.ts": "2fc025607330c0e8b0a94bc180c07e517881de00f1c8ea8c3abdd0e70a2a404f", + "https://jsr.io/@std/path/0.210.0/posix/to_namespaced_path.ts": "c9228a0e74fd37e76622cd7b142b8416663a9b87db643302fa0926b5a5c83bdc", + "https://jsr.io/@std/path/0.210.0/relative.ts": "23d45ede8b7ac464a8299663a43488aad6b561414e7cbbe4790775590db6349c", + "https://jsr.io/@std/path/0.210.0/resolve.ts": "5b184efc87155a0af9fa305ff68a109e28de9aee81fc3e77cd01380f19daf867", + "https://jsr.io/@std/path/0.210.0/separator.ts": "1a21ffd408bfaa317bffff604e5a799f78a7a5571590bde6b9cdce7685953d74", + "https://jsr.io/@std/path/0.210.0/to_file_url.ts": "8895a9cd369819c689f8e53131c03277c0c79b56acbe0533b42f2f0b4ead7cbe", + "https://jsr.io/@std/path/0.210.0/to_namespaced_path.ts": "cf8734848aac3c7527d1689d2adf82132b1618eff3cc523a775068847416b22a", + "https://jsr.io/@std/path/0.210.0/windows/_util.ts": "4e44914486b5dc4cca98880693971ea15238c6bae67d8131c39e1112ea427909", + "https://jsr.io/@std/path/0.210.0/windows/basename.ts": "9ae2c0d1df814af9d660fd170c239dde1b66cbdf158185b4fbd7dddccc91bac4", + "https://jsr.io/@std/path/0.210.0/windows/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/windows/dirname.ts": "8be11039908fc7d09ac13e37ad2f31b7b19c0a5d6a238181c46e3ea41b910ac2", + "https://jsr.io/@std/path/0.210.0/windows/extname.ts": "0e22da7b84d0a89b79cc7a2e9c7163ab742fc600a8ffd8ea42aae633a5ac5a30", + "https://jsr.io/@std/path/0.210.0/windows/format.ts": "e3d94cb0f2ca1ed31c268ab6231dbd7478dec3cb7b276ece4421474598b55226", + "https://jsr.io/@std/path/0.210.0/windows/from_file_url.ts": "00d145aa2c793781cdc2740612bf897dac81c18a6c15420fb516e4030269108a", + "https://jsr.io/@std/path/0.210.0/windows/glob_to_regexp.ts": "5cbefcad6ae88294d23faf5b0f4766f4e1a0c2369ca14edae02c3876d1fa1ed9", + "https://jsr.io/@std/path/0.210.0/windows/is_absolute.ts": "16bc7d8aa335780336821158a147dba360127bc648699ea4302719454647e160", + "https://jsr.io/@std/path/0.210.0/windows/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/windows/join.ts": "a5c3ce40827eaac55ef52e791bdd30d8d40c9e748227243ea3185ecfe49a85fc", + "https://jsr.io/@std/path/0.210.0/windows/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/windows/mod.ts": "98e5151661d2cf34a0a291ff16e292e5079e9fb7cd64c93684f3f5a29d217123", + "https://jsr.io/@std/path/0.210.0/windows/normalize.ts": "d5c2da8f188f5ec342695f1284e2585ba50678ba187c8897c566569bbf9e4092", + "https://jsr.io/@std/path/0.210.0/windows/normalize_glob.ts": "db339cfb08e9bb38d49ce005ce318a20d03b77dbb75294a68d050f3d254887ad", + "https://jsr.io/@std/path/0.210.0/windows/parse.ts": "307029d3c69e8310452df48c238993e4ee41cbc8f7b9f4be6c1ad1201658c608", + "https://jsr.io/@std/path/0.210.0/windows/relative.ts": "f79960e8b922ed35197e53d2ae09a95ffdce7844c8430bf782f01f9d721731c7", + "https://jsr.io/@std/path/0.210.0/windows/resolve.ts": "c9111c13cbe521d36e3cb54eaeee146d04b9674ecb0df91aa9536f6bfd97903a", + "https://jsr.io/@std/path/0.210.0/windows/separator.ts": "ae21f27015f10510ed1ac4a0ba9c4c9c967cbdd9d9e776a3e4967553c397bd5d", + "https://jsr.io/@std/path/0.210.0/windows/to_file_url.ts": "2be7e66a8321a66cc382ddbeeaf79e0e962c83688e2e3c4be689276099680298", + "https://jsr.io/@std/path/0.210.0/windows/to_namespaced_path.ts": "e4e6f67f9c0f097f8eb913597064aacadb3abb158735773096d55f8d234f466b", + "https://jsr.io/@std/streams/0.210.0/_common.ts": "3b2c1f0287ce2ad51fff4091a7d0f48375c85b0ec341468e76d5ac13bb0014dd", + "https://jsr.io/@std/streams/0.210.0/buffer.ts": "ef343c8e8d51fe8b3e3b9ef5f08e119a630c0565713884efe54200207b8de513", + "https://jsr.io/@std/streams/0.210.0/byte_slice_stream.ts": "1831fdeb6237ab0404dc612eb78e2fcec9d24cb9cfa9519e4bd36188a81df6e2", + "https://jsr.io/@std/streams/0.210.0/copy.ts": "6a33fdb2c93817e33e5fdd78c8e799b914d09f45ac5608a84b56495c7823fdc6", + "https://jsr.io/@std/streams/0.210.0/delimiter_stream.ts": "db0c1d5852853d6fbb60abda6e2067efd6f121d6668367d7dc571aeecc0f1393", + "https://jsr.io/@std/streams/0.210.0/early_zip_readable_streams.ts": "3adf4c78d52fad18c6f201159b7796317c8082620036dd9a3d990204b5764981", + "https://jsr.io/@std/streams/0.210.0/iterate_reader.ts": "12b4d47ca6540a8feab09599828f59a44d431dc1a9c779d54f4d544185e5c326", + "https://jsr.io/@std/streams/0.210.0/limited_bytes_transform_stream.ts": "43c91a66ac7c3066133d007e4a25b802667d80d84c3de221d18a67167c3088e3", + "https://jsr.io/@std/streams/0.210.0/limited_transform_stream.ts": "584af31000cb4dc970d8244c41b2b3b3a6e3f9a078fceefea8c4312c8aee6e51", + "https://jsr.io/@std/streams/0.210.0/merge_readable_streams.ts": "e69a985ac1d4e24d29476c134f2ceb2b517b528649fd4ad8f66b887dbf65a8cf", + "https://jsr.io/@std/streams/0.210.0/mod.ts": "e133c271474f1e9dc19f5c4959406f5c2101540c56a3e7d7abc6bdb7bcef807e", + "https://jsr.io/@std/streams/0.210.0/read_all.ts": "c4c8b499668a7225fcb898274ec00374cf7b331e0d14dfe9bf44da03644a968c", + "https://jsr.io/@std/streams/0.210.0/readable_stream_from_reader.ts": "3d5bfd2567560557291ac6b01f0b045cd2336e3ebdb1f8c6c46726121585752c", + "https://jsr.io/@std/streams/0.210.0/reader_from_iterable.ts": "cbe640306618c4a61b2e43a710b1c89336c343e627f97b03bc5aa2c78a9c97a4", + "https://jsr.io/@std/streams/0.210.0/reader_from_stream_reader.ts": "56ef51217a464551e8efdc65a4c28c6d14148fbfd23ed88401732c50fcb3cf3d", + "https://jsr.io/@std/streams/0.210.0/text_delimiter_stream.ts": "00158278225105fedbadc0cbe5bf0e7d70cb2cf062eb48b4f5db694ba3a2dd61", + "https://jsr.io/@std/streams/0.210.0/text_line_stream.ts": "a74dc71908ebde4bf4d186b6d4be64475d7e43269a44e29c2d38984692501f03", + "https://jsr.io/@std/streams/0.210.0/to_array_buffer.ts": "c1322d7d8601f3e7516f2e1fc391a278b23d13ecd0213b44f4de63f9bdefa227", + "https://jsr.io/@std/streams/0.210.0/to_blob.ts": "0f5750b41e92abeeac81008e6df848206a0b83caf74d398da717d65cbb86a786", + "https://jsr.io/@std/streams/0.210.0/to_json.ts": "8986526388c2520c89abeba59fac3e1b6eaeee630f2bc271da0ba48cc24281c1", + "https://jsr.io/@std/streams/0.210.0/to_text.ts": "914a799c0e931d1f94cb8762d3909e3d9abdd15f20d7136ba2c848128825d8e6", + "https://jsr.io/@std/streams/0.210.0/to_transform_stream.ts": "59ff4acbd3a071daef6ad658213a7a7bac0cb33491b10e96210fb040e870a7c0", + "https://jsr.io/@std/streams/0.210.0/writable_stream_from_writer.ts": "6536e7aa2201e42730f24c901f27376edb092751d1aba6592ff5926c00537998", + "https://jsr.io/@std/streams/0.210.0/write_all.ts": "f96c63b2ab49ce4b7404250e53e0e02b15d499d8e67e950718280252888aae1d", + "https://jsr.io/@std/streams/0.210.0/writer_from_stream_writer.ts": "1e442c1523abf3343070edb598b9f71650ee375b53e7b1c8c41d1a2f1dc16a8b", + "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638", + "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" + }, + "workspace": { + "dependencies": [ + "jsr:@dsherret/dax" + ] + } +} diff --git a/tests/specs/config_changes/RemovingWorkspaceMember.txt b/tests/specs/config_changes/RemovingWorkspaceMember.txt new file mode 100644 index 0000000..a5b0d82 --- /dev/null +++ b/tests/specs/config_changes/RemovingWorkspaceMember.txt @@ -0,0 +1,645 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@dsherret/dax": "jsr:@dsherret/dax@0.0.1", + "jsr:@dsherret/which@0.0.1": "jsr:@dsherret/which@0.0.1", + "jsr:@oak/commons@0.4": "jsr:@oak/commons@0.4.0", + "jsr:@oak/oak": "jsr:@oak/oak@12.6.3", + "jsr:@std/assert@0.210": "jsr:@std/assert@0.210.0", + "jsr:@std/assert@^0.210.0": "jsr:@std/assert@0.210.0", + "jsr:@std/bytes@0.210": "jsr:@std/bytes@0.210.0", + "jsr:@std/bytes@^0.210.0": "jsr:@std/bytes@0.210.0", + "jsr:@std/crypto@0.210": "jsr:@std/crypto@0.210.0", + "jsr:@std/encoding@0.210": "jsr:@std/encoding@0.210.0", + "jsr:@std/encoding@^0.210.0": "jsr:@std/encoding@0.210.0", + "jsr:@std/fmt@0.210.0": "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0": "jsr:@std/fs@0.210.0", + "jsr:@std/http@0.210": "jsr:@std/http@0.210.0", + "jsr:@std/io@0.210": "jsr:@std/io@0.210.0", + "jsr:@std/io@0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/io@^0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/media_types@0.210": "jsr:@std/media_types@0.210.0", + "jsr:@std/path@0.210": "jsr:@std/path@0.210.0", + "jsr:@std/path@0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/path@^0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210": "jsr:@std/streams@0.210.0", + "jsr:@std/streams@0.210.0": "jsr:@std/streams@0.210.0", + "jsr:@zome_unreferenced/package": "jsr:@zome_unreferenced/package@0.1.0", + "jsr:@zome_unreferenced/package_b": "jsr:@zome_unreferenced/package_b@0.1.0", + "npm:path-to-regexp@6.2.1": "npm:path-to-regexp@6.2.1" + }, + "npm": { + "path-to-regexp@6.2.1": { + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", + "dependencies": {} + } + }, + "jsr": { + "@dsherret/dax@0.0.1": { + "dependencies": [ + "jsr:@dsherret/which@0.0.1", + "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0", + "jsr:@std/io@0.210.0", + "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210.0" + ] + }, + "@oak/commons@0.4.0": { + "dependencies": [ + "jsr:@std/assert@0.210" + ] + }, + "@oak/oak@12.6.3": { + "dependencies": [ + "jsr:@oak/commons@0.4", + "jsr:@std/bytes@0.210", + "jsr:@std/crypto@0.210", + "jsr:@std/encoding@0.210", + "jsr:@std/http@0.210", + "jsr:@std/io@0.210", + "jsr:@std/media_types@0.210", + "jsr:@std/path@0.210", + "jsr:@std/streams@0.210", + "npm:path-to-regexp@6.2.1" + ] + }, + "@std/crypto@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/encoding@^0.210.0" + ] + }, + "@std/fs@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/path@^0.210.0" + ] + }, + "@std/http@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/encoding@^0.210.0" + ] + }, + "@std/io@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0" + ] + }, + "@std/path@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0" + ] + }, + "@std/streams@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0", + "jsr:@std/io@^0.210.0" + ] + }, + "jsr:@zome_unreferenced/package@0.1.0": { + "dependencies": [ + "jsr:@zome_unreferenced/package_b" + ] + } + } + }, + "remote": { + "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@dsherret/dax/0.0.1/src/command.ts": "e5dc7e3af38240657b4b9dc106b044c9c75bf16385c8f8af1c795ca89e27c3bc", + "https://jsr.io/@dsherret/dax/0.0.1/src/command_handler.ts": "56ee6893bf5ec829c370fe5a9367f60b3590e571f7b69153d48686779ab14d98", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/args.ts": "a138aef24294e3cbf13cef08f4836d018e8dd99fd06ad82e7e7f08ef680bbc1d", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cat.ts": "984035bd43b62c12764bcf321d84ce4bbe271aedaac48d251c8db080022d5cbf", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cd.ts": "82e85b573dd3006eefc20d1849ca638e461946688749e9a4ea53ab07c03ef7e4", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cp_mv.ts": "aa09e3ab95c5eaae1186ad9a84d94977e19f4fa3c3fd5ab6a45b0b009600aae6", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/echo.ts": "a4f86022ad4eb5b8e8326e45fd2f571f6bd5e3c842f0c10e0be69f35b0d78180", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/exit.ts": "86b181d0f1e7723b265ec7a8858a43f5cac56cd485375524b4d8f022c5632419", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/export.ts": "1d5012c6b991e3c1112cc5841520e1ae651a20a0fd6c2e8014c79eba571755be", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/mkdir.ts": "620ecc4d690b342ecea9e9849303a4f8e2f65b430b70be846c1de766c9b5bbe7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/printenv.ts": "1efa36e21c6039da424c99753d748a486c3a7621507ca9d8d319e2a6e3e259ac", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/pwd.ts": "d89fac9ca37afe54967acd24744c3255aacc63f51697c27fe8d2e90a9049088f", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/rm.ts": "9c3b200c154c4a3c7e3b9ab9204daaad62b961453e9a8c8fc9a0451953e59f75", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/sleep.ts": "50b162accce6b8f20180f13d01613a6da6d88920d8322ac46ff7a2bbd6fcfbd7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/test.ts": "d4a72076e652b3be65eaec9ff26eb342f5293140a82fa6bc357fa77b895ec3ab", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/touch.ts": "8386148784f92455502f09880306bc859ab61540c80fe0de0686b323662ee1fb", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/unset.ts": "dbebdad7e6e301ee621161a13669ab4164025aee5b323658ab283dab64b9eebf", + "https://jsr.io/@dsherret/dax/0.0.1/src/common.ts": "7295d13ab0023bb09d4c97e3a131cedada6294a33474f136b652a145330c8e3e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/confirm.ts": "ffcc76ebf10c8bfde6e4072b70b271e0453170ab0bd0bb795bc4e52a1237062e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/logger.ts": "e0ab5025915cef70df03681c756e211f25bb2e4331f82ed4256b17ddd9e794ea", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/mod.ts": "de8af7d646f6cb222eee6560171993690247941b13ed9d757789d16f019d73ee", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/multiSelect.ts": "50ff5de156028ff21025917b4c797c877037bf1460974b0f72b6ab0907d0a3d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/format.ts": "15ddbb8051580f88ed499281e12ca6f881f875ab73268d7451d7113ee130bd7d", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/interval.ts": "82bd91b9f8219c8d03b7aad51e7425f3276d96615b32826693dffd5905d663d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/mod.ts": "5ae6cf88fe8caaa5c8218511c9458944201da5fbc9749b200d9e1227c93b3b9e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/prompt.ts": "91c8d03fe2179438629491e71a6bdf0b6ca5bd31cbcc29ac7a2529daefe24d94", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/select.ts": "6b96555d7a13acd6e864a874e5687044932cf2412a45dc2811613cb2f00900ca", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/utils.ts": "4e4f8cf5e435345e4ad94523544dc112e25969a12bdd05fb8073729e078cf47a", + "https://jsr.io/@dsherret/dax/0.0.1/src/deps.ts": "8e1acae3e51645f52fda44ffa528e3c346f00b37afc4bba1c2c90433d551bccb", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/mod.ts": "c992db99c8259ae3bf2d35666585dfefda84cf7cf4e624e42ea2ac7367900fe0", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/rs_lib.generated.js": "932a69348ce575e4a5c2398c896e9cd06cf287f6c18fb25dfdf23badca1c9f54", + "https://jsr.io/@dsherret/dax/0.0.1/src/path.ts": "365ed563f1a7421c20b094f5e56ca1f1ae9608b2a568b7ad394a63bdeabc1313", + "https://jsr.io/@dsherret/dax/0.0.1/src/pipes.ts": "850243b55f40eaad1f0020455c63905a0a41f543c2b7031d38188051398692d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/request.ts": "9856b955ac1a0831a4998b23ba7be2f5e74ab3fd17230bc28476781c9f0f20d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/result.ts": "0908b69c16b25c3b258f6b2ada12e124686df5f7ea2b98daa27a83973c7b118c", + "https://jsr.io/@dsherret/dax/0.0.1/src/shell.ts": "e18dcdccd5edf8ad8cd56b1e58a2b4f094eb969f3499303adde66ee71d231770", + "https://jsr.io/@dsherret/dax/0.0.1/src/vendor/outdent.ts": "d2f45f327f06ac8607a8fb6f6c428f25f8bb03673d07795541cf880e5f5c38e2", + "https://jsr.io/@dsherret/which/0.0.1/mod.ts": "cca0ebcff4f6c9088f7b9d7e5859b3561f0701b83a83b739000bfebb34eaebb5", + "https://jsr.io/@oak/commons/0.4.0/deps.ts": "468549378f3ee4d2c96b66e2913b2029ac0a5a41c7dbd6f41d0b77c4131f46d0", + "https://jsr.io/@oak/commons/0.4.0/http_errors.ts": "e540c727b765af754bfbe3c041f332c288d3682bad1ba27971ce216e139b8cc9", + "https://jsr.io/@oak/commons/0.4.0/method.ts": "819862202d471682773ac6a573dc47553acdae865121adb54a71eee1c9389771", + "https://jsr.io/@oak/commons/0.4.0/server_sent_event.ts": "417937cc14754a632bbbce02f58dad539bb7a99015dc183e19d689887bce667b", + "https://jsr.io/@oak/commons/0.4.0/status.ts": "f13e0e61c2aaf5e254ca528569b03896aee89d96ebc256fa740ea7305a68f53f", + "https://jsr.io/@oak/oak/12.6.3/application.ts": "38f3346ff817d70f368352e9ef0f9f2bf58635c528a44f6f31cdc26ca37b3e28", + "https://jsr.io/@oak/oak/12.6.3/body.ts": "1899761b97fc9d776f3710b2637fb047ba29b968609afc6c0e5219b1108e703c", + "https://jsr.io/@oak/oak/12.6.3/buf_reader.ts": "26640736541598dbd9f2b84a9d0595756afff03c9ca55b66eef1911f7798b56d", + "https://jsr.io/@oak/oak/12.6.3/content_disposition.ts": "8b8c3cb2fba7138cd5b7f82fc3b5ea39b33db924a824b28261659db7e164621e", + "https://jsr.io/@oak/oak/12.6.3/context.ts": "043dc433504cc69a1b596a31ff8063d1647883ff5cf604a73e19a24324137442", + "https://jsr.io/@oak/oak/12.6.3/deps.ts": "2a872896c9ff15627a41d380992897d7e19686786957b75086f47a3ce6ccb1ee", + "https://jsr.io/@oak/oak/12.6.3/etag.ts": "32e47726b41698aefdd71faac5aaf2907c9bdd41ef18a7693863be4f8fee115d", + "https://jsr.io/@oak/oak/12.6.3/forwarded.ts": "e656f96a85574e2a6ee54dc35efc9f72d543c9ae0923760ef426ee7369eef01c", + "https://jsr.io/@oak/oak/12.6.3/headers.ts": "769fd042d34fbcd5667cbd745b5c65d335cc8430e822dbf1f87d65313cab4b47", + "https://jsr.io/@oak/oak/12.6.3/helpers.ts": "6b03c6a2be06ec775d54449e442a2bac234aa952948ca758356eab6dc87af618", + "https://jsr.io/@oak/oak/12.6.3/http_server_native.ts": "7dd27f851e4f47843ad2206aff5d414997d974d97410bacb8fc091d415598407", + "https://jsr.io/@oak/oak/12.6.3/http_server_native_request.ts": "552b174b5e13e92de8897d5b6f716b1e5a53543115481d65a651a41e4ca29ec9", + "https://jsr.io/@oak/oak/12.6.3/isMediaType.ts": "62d638abcf837ece3a8f07a4b7ca59794135cb0d4b73194c7d5837efd4161005", + "https://jsr.io/@oak/oak/12.6.3/mediaTyper.ts": "042b853fc8e9c3f6c628dd389e03ef481552bf07242efc3f8a1af042102a6105", + "https://jsr.io/@oak/oak/12.6.3/middleware.ts": "c7f7a0424a6dd99a00e4b8d7d6e131efc0facc8dea781845d713b63df8ef1862", + "https://jsr.io/@oak/oak/12.6.3/middleware/proxy.ts": "ab1465801b6dcf20e0d5b005ce59a929cb638f47b17143691303b8fd9841ff8e", + "https://jsr.io/@oak/oak/12.6.3/mod.ts": "f6aa47ad1b6099470c9a884cccad9d3ac0fd242ba940896291ab76cd26cf554b", + "https://jsr.io/@oak/oak/12.6.3/multipart.ts": "e76ba8587fdce04b69831ee7b1cc0c5da06919dd2d9c316a01d5aed8aca1307a", + "https://jsr.io/@oak/oak/12.6.3/range.ts": "04dfb168fac62413a430873b304667f850de0162d117103c7f4fb265c79bd2d0", + "https://jsr.io/@oak/oak/12.6.3/request.ts": "7b919fe422f67c74d88d48ad88c72cea106950620f5446e40449105fb3a859b9", + "https://jsr.io/@oak/oak/12.6.3/response.ts": "701ebc0532dce13a2eccdb4f95f0d025cdd0e8dea2604a76dddc8e3dbc7c09a6", + "https://jsr.io/@oak/oak/12.6.3/router.ts": "935c377ed809eb60a90e3534ba426444b71e3d9b45150887627b702485dfa40d", + "https://jsr.io/@oak/oak/12.6.3/send.ts": "5ec49f106294593f468317a0c885da4f3274bf6d0fe9e16a7304391730b4f4fb", + "https://jsr.io/@oak/oak/12.6.3/structured_clone.ts": "c3888b14d1eec558345bfbf13d0993d59bd45aaa8588444e35dd558c3a921cd8", + "https://jsr.io/@oak/oak/12.6.3/testing.ts": "9defd9f2e31080f77b5f7cd6437968f194521cc708b8a631164a633cb0c9b4ef", + "https://jsr.io/@oak/oak/12.6.3/util.ts": "30338dcf9e94c2716438a2fed0330e630ed400716c54876d905e04ba5bfb7b03", + "https://jsr.io/@std/assert/0.210.0/assert.ts": "482cc19da8c816e226caa566d2b146258ecd6744eaac9c11ba7ad4560728f539", + "https://jsr.io/@std/assert/0.210.0/assertion_error.ts": "933921a961c2268d1d6914502b6dc927635952c87945cf4f378e1faa44ed5c41", + "https://jsr.io/@std/bytes/0.210.0/concat.ts": "e2ce8efada37cd155af124be42d8223cbbf8c799d002c453d61b34d4890df68a", + "https://jsr.io/@std/bytes/0.210.0/copy.ts": "7c8aa7f6e8280f34976712c30207ffb9de5c58a6f04dfeebcd34d946010cbe7c", + "https://jsr.io/@std/bytes/0.210.0/ends_with.ts": "21a9860e56476d5327a81269ce4936fe43821e90fed066330f6e18db26303170", + "https://jsr.io/@std/bytes/0.210.0/equals.ts": "fc190cce412b2136979181b163ec7e05f7e7a947e39102eee4b8c0d62519ddf9", + "https://jsr.io/@std/bytes/0.210.0/includes_needle.ts": "52f712898557827096bad92798cbb7a816af6637c1bf5003fc802b573a6a35e8", + "https://jsr.io/@std/bytes/0.210.0/index_of_needle.ts": "f678648ac446b4544fe7ea3ac799f511a201e13c3a9ae1286ad2cad053181262", + "https://jsr.io/@std/bytes/0.210.0/last_index_of_needle.ts": "3d1b5edfa2244538840e92ea728cc30405f8a0b421ebab9d8ba5b868fdf4ea79", + "https://jsr.io/@std/bytes/0.210.0/mod.ts": "9ed597c10cc61cdcd4cf725ad7ed935f6dc7ff481ba6bcc6d6a47633ea1ae0b8", + "https://jsr.io/@std/bytes/0.210.0/repeat.ts": "3a00f65e7b821938d424ae93cee7bf0c7fa188308b64085d027e2e088c1fc09e", + "https://jsr.io/@std/bytes/0.210.0/starts_with.ts": "5b0f2d1f93570639aa832ee21940c8418aa7ebc6ff8a54c1f8b9812b0e98c646", + "https://jsr.io/@std/crypto/0.210.0/timing_safe_equal.ts": "3dfd69a5cf20e4d5e94698dee8de9b596fa36356b04a47a5cdf8879a023abbbc", + "https://jsr.io/@std/crypto/0.210.0/unstable_keystack.ts": "58322099078d73a471146287de70f5e9a12ad52a0e5973a050aedeed54b2167d", + "https://jsr.io/@std/encoding/0.210.0/_util.ts": "f368920189c4fe6592ab2e93bd7ded8f3065b84f95cd3e036a4a10a75649dcba", + "https://jsr.io/@std/encoding/0.210.0/base64.ts": "4d2d7230ff6296e1617bfbd62585996118c9699fdc9b70a3051605b1c329cb91", + "https://jsr.io/@std/encoding/0.210.0/base64url.ts": "f2a5b519052d574f27a06e2a12c34228b1cdd23d81935001606744f2615e4092", + "https://jsr.io/@std/fmt/0.210.0/colors.ts": "9c7152c3104edb8f118139b3270ec46df7a7033225cc7e7a0c4df671228012c9", + "https://jsr.io/@std/fs/0.210.0/_create_walk_entry.ts": "bc8fcc74f6811d934418fa4956e3b75325c63c54970acdefa058499e57313635", + "https://jsr.io/@std/fs/0.210.0/_get_file_info_type.ts": "9c92ff74f39bfba66b09faf9901af6a944cc71f014d9649e7d3e32eac4aeddfc", + "https://jsr.io/@std/fs/0.210.0/_is_same_path.ts": "3327f0ba58f918072a2ce6f7b606c3dd348e39419d187bfaeed845e2c2391df8", + "https://jsr.io/@std/fs/0.210.0/_is_subdir.ts": "7edb37b72e9ce64e8e3684f8115a1298333a9ffaa127394345ce4062261ebdb2", + "https://jsr.io/@std/fs/0.210.0/_to_path_string.ts": "0519fed81d0c52c5fd922e39335e7d84f9ca8b651ec3e2d1e8623ee882a91506", + "https://jsr.io/@std/fs/0.210.0/copy.ts": "9044a577c1b56f03f8476e9b101628617d7c7312c8ee3959c7f447dbf8988211", + "https://jsr.io/@std/fs/0.210.0/empty_dir.ts": "085f7bc11d4b0745e35c089b2b981d1f17c43d2dd25bf52fdfd2270bc356491c", + "https://jsr.io/@std/fs/0.210.0/ensure_dir.ts": "f768f673feb21e59a4f641c7002da783f133d3b0a27bc7a34ee7ce06330bc44b", + "https://jsr.io/@std/fs/0.210.0/ensure_file.ts": "a77e5ab6673aaae81072a4f26ce60a04bd395169ff3cc7362e1c6b7e6eee7af4", + "https://jsr.io/@std/fs/0.210.0/ensure_link.ts": "abf16dee6ea1455acae7ff84647666b888ddb63a597db9f39eb4fe399135f300", + "https://jsr.io/@std/fs/0.210.0/ensure_symlink.ts": "2ac390f6c409068e7184b25ecbd152c7f4955b74f8d2f57831e62f8c3c1d2df8", + "https://jsr.io/@std/fs/0.210.0/eol.ts": "11422201f6483e801ec2db385ff5c893d808e218037d38fee2c0574ea6227440", + "https://jsr.io/@std/fs/0.210.0/exists.ts": "42636533140f9a37d9d22d963fff062eda65a0e3e7c3d626da2a13517fdf13e7", + "https://jsr.io/@std/fs/0.210.0/expand_glob.ts": "09dc879cff29ba647897150008ab483a5583840c0090190ce5155bfbdae7e2c9", + "https://jsr.io/@std/fs/0.210.0/mod.ts": "bc3d0acd488cc7b42627044caf47d72019846d459279544e1934418955ba4898", + "https://jsr.io/@std/fs/0.210.0/move.ts": "fa54fd66e050b0a9f24c4e78e72da6a9de1bd39f6f3d01202236e440956fc5e7", + "https://jsr.io/@std/fs/0.210.0/walk.ts": "b5c2c4e171e98f8911ed9e5c6515b056bd6fa02dd766f9946d7754b2836918cd", + "https://jsr.io/@std/http/0.210.0/_negotiation/common.ts": "14d1a52427ab258a4b7161cd80e1d8a207b7cc64b46e911780f57ead5f4323c6", + "https://jsr.io/@std/http/0.210.0/_negotiation/encoding.ts": "ff747d107277c88cb7a6a62a08eeb8d56dad91564cbcccb30694d5dc126dcc53", + "https://jsr.io/@std/http/0.210.0/_negotiation/language.ts": "7bcddd8db3330bdb7ce4fc00a213c5547c1968139864201efd67ef2d0d51887d", + "https://jsr.io/@std/http/0.210.0/_negotiation/media_type.ts": "58847517cd549384ad677c0fe89e0a4815be36fe7a303ea63cee5f6a1d7e1692", + "https://jsr.io/@std/http/0.210.0/etag.ts": "af7592ca9a65a69713341e401773a6b8c4f68baea2ad7c52d80520c17721a547", + "https://jsr.io/@std/http/0.210.0/negotiation.ts": "1f1c2e447589e8b2a2f42106822a41f22f2ce28a416b3d58366a1f214257b99b", + "https://jsr.io/@std/http/0.210.0/unstable_cookie_map.ts": "ba0bd29cecb30d1628b07a2a4510189618173895f36db420f6efb89b7f6ba637", + "https://jsr.io/@std/http/0.210.0/user_agent.ts": "ec375d4251b8ed23229401a5685d038c709e3d344fd7860b7ed64209200e5b59", + "https://jsr.io/@std/io/0.210.0/buf_reader.ts": "54283f8a528aff9428a4d082fb5b688e0472124274cee683deb35bedd818a3e6", + "https://jsr.io/@std/io/0.210.0/buf_writer.ts": "162459043c3285a316c8ce859ccefadc1336362cb1f8c00682240e284bc68254", + "https://jsr.io/@std/io/0.210.0/buffer.ts": "a868771d439504ac06abb0f3081fa72c9592c1658ad95645f4d7dd5902cc346b", + "https://jsr.io/@std/io/0.210.0/copy_n.ts": "db62715df471ed1a9f4ec2e6828d75f64d02c81cf8e9a216d40f39c72ca3963b", + "https://jsr.io/@std/io/0.210.0/limited_reader.ts": "cbcecd962fa9d292b5a226e657d3c9e60a374d19ae8a3bba9956e6ce4a08d760", + "https://jsr.io/@std/io/0.210.0/mod.ts": "61c2100d3eac23f0574cffb74257069a8308cf5183342d8c344fcf307e1d5b8c", + "https://jsr.io/@std/io/0.210.0/multi_reader.ts": "e7edd9157732776ba5483b2bc2597f7b3b27913207dbf411c79172c1fc8a884d", + "https://jsr.io/@std/io/0.210.0/read_delim.ts": "4dedfd0ff0216bbb5f71bdbbc6513be6d3a327659cfc07c004ef6254bc625618", + "https://jsr.io/@std/io/0.210.0/read_int.ts": "4e96b319f9b82b066c04e13f9f14ad4460bcaf367454844f6395b51820f5b74f", + "https://jsr.io/@std/io/0.210.0/read_lines.ts": "45b1a27df6d046adb7c14c72bfb328734160f1d2cafa4ab42e100ad99fb06e2a", + "https://jsr.io/@std/io/0.210.0/read_long.ts": "b24d81075cd69660ad789948a8413c04038b007890f69418fd3d96dfc5609903", + "https://jsr.io/@std/io/0.210.0/read_range.ts": "bdc3a159054afd1fb0fd0060f841434bc774ea2db67382d9909c0a2defd8cc5f", + "https://jsr.io/@std/io/0.210.0/read_short.ts": "a2dd615728dbb5cf4a16e23ef12a0d208bd36ceff8dc062a34e0cd2140538f53", + "https://jsr.io/@std/io/0.210.0/read_string_delim.ts": "acbc79d5eb807f6c736f861078c152cf3e6a103b0addda8d94335a8baf10b186", + "https://jsr.io/@std/io/0.210.0/slice_long_to_bytes.ts": "970b12c39f2a68dd29a038ae8f9ccf51298973867e97f4da739b669eb57f85b4", + "https://jsr.io/@std/io/0.210.0/string_reader.ts": "fd7e8babd7137e9b622dde2438c7f7d9638902d63f29ca43e91aa67ac957cb5c", + "https://jsr.io/@std/io/0.210.0/string_writer.ts": "5c0f8261b8c1a5a89f1885af091feda7021e25f7b40d567890e7c31ce8ee78eb", + "https://jsr.io/@std/media_types/0.210.0/_db.ts": "7606d83e31f23ce1a7968cbaee852810c2cf477903a095696cdc62eaab7ce570", + "https://jsr.io/@std/media_types/0.210.0/_util.ts": "0879b04cc810ff18d3dcd97d361e03c9dfb29f67d7fc4a9c6c9d387282ef5fe8", + "https://jsr.io/@std/media_types/0.210.0/content_type.ts": "9d610421833ccfefa4b84383f628eabf54939936afb1a99665af933510ba4d3e", + "https://jsr.io/@std/media_types/0.210.0/extension.ts": "3e584be89a6c7fbce1c4f7db4948fcc7cfabf460382cf89191ff4929f31500e5", + "https://jsr.io/@std/media_types/0.210.0/extensions_by_type.ts": "b79817bc5c05e22309f702818702e03979809592952aebbb65cbd4ae48bca107", + "https://jsr.io/@std/media_types/0.210.0/format_media_type.ts": "b7f2db7843a73b96cef6262368483ccd06687ebb726170fa6490012c6209ebc8", + "https://jsr.io/@std/media_types/0.210.0/get_charset.ts": "d8483018dd8ac55b2bcccf933c359b676265abe1226b88c76a8c77722b23ca77", + "https://jsr.io/@std/media_types/0.210.0/mod.ts": "d3f0b99f85053bc0b98ecc24eaa3546dfa09b856dc0bbaf60d8956d2cdd710c8", + "https://jsr.io/@std/media_types/0.210.0/parse_media_type.ts": "419e4245cda84bdfc062e1bfff4ac4bf880851abb1b3952d19bf9db1bc5a5d41", + "https://jsr.io/@std/media_types/0.210.0/type_by_extension.ts": "5645c68a16c1191003a191146916ceaf032a294422fc332b28abbcc3ca0931b2", + "https://jsr.io/@std/media_types/0.210.0/vendor/mime-db.v1.52.0.ts": "6925bbcae81ca37241e3f55908d0505724358cda3384eaea707773b2c7e99586", + "https://jsr.io/@std/path/0.210.0/_common/assert_path.ts": "061e4d093d4ba5aebceb2c4da3318bfe3289e868570e9d3a8e327d91c2958946", + "https://jsr.io/@std/path/0.210.0/_common/basename.ts": "0d978ff818f339cd3b1d09dc914881f4d15617432ae519c1b8fdc09ff8d3789a", + "https://jsr.io/@std/path/0.210.0/_common/common.ts": "9e4233b2eeb50f8b2ae10ecc2108f58583aea6fd3e8907827020282dc2b76143", + "https://jsr.io/@std/path/0.210.0/_common/constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", + "https://jsr.io/@std/path/0.210.0/_common/dirname.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/format.ts": "018a88fb76802286e87a871cafe5e4be147a2a90d794a331121560b66845ab63", + "https://jsr.io/@std/path/0.210.0/_common/from_file_url.ts": "ef1bf3197d2efbf0297a2bdbf3a61d804b18f2bcce45548ae112313ec5be3c22", + "https://jsr.io/@std/path/0.210.0/_common/glob_to_reg_exp.ts": "50386887d6041f15741d0013a703ee63ef673983d465d3a0c9c190e95f8da4fe", + "https://jsr.io/@std/path/0.210.0/_common/normalize.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/normalize_string.ts": "88c472f28ae49525f9fe82de8c8816d93442d46a30d6bb5063b07ff8a89ff589", + "https://jsr.io/@std/path/0.210.0/_common/relative.ts": "1af19d787a2a84b8c534cc487424fe101f614982ae4851382c978ab2216186b4", + "https://jsr.io/@std/path/0.210.0/_common/strip_trailing_separators.ts": "7ffc7c287e97bdeeee31b155828686967f222cd73f9e5780bfe7dfb1b58c6c65", + "https://jsr.io/@std/path/0.210.0/_common/to_file_url.ts": "a8cdd1633bc9175b7eebd3613266d7c0b6ae0fb0cff24120b6092ac31662f9ae", + "https://jsr.io/@std/path/0.210.0/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", + "https://jsr.io/@std/path/0.210.0/_os.ts": "30b0c2875f360c9296dbe6b7f2d528f0f9c741cecad2e97f803f5219e91b40a2", + "https://jsr.io/@std/path/0.210.0/basename.ts": "04bb5ef3e86bba8a35603b8f3b69537112cdd19ce64b77f2522006da2977a5f3", + "https://jsr.io/@std/path/0.210.0/common.ts": "8fcbd9399cd86e390e4160ea56e5afe7c65310e4152845392903e7b9afce4a3d", + "https://jsr.io/@std/path/0.210.0/dirname.ts": "88a0a71c21debafc4da7a4cd44fd32e899462df458fbca152390887d41c40361", + "https://jsr.io/@std/path/0.210.0/extname.ts": "8c6d6112bce335b4d3d5a07cb0451816d0c2094c147049874fca2db5f707044b", + "https://jsr.io/@std/path/0.210.0/format.ts": "3457530cc85d1b4bab175f9ae73998b34fd456c830d01883169af0681b8894fb", + "https://jsr.io/@std/path/0.210.0/from_file_url.ts": "a45def541616dfe357424708c19a9fe890b170893d77d8f2a1381294249774ce", + "https://jsr.io/@std/path/0.210.0/glob.ts": "a00a81a55c02bbe074ab21a50b6495c6f7795f54cd718c824adaa92c6c9b7419", + "https://jsr.io/@std/path/0.210.0/glob_to_regexp.ts": "74d7448c471e293d03f05ccb968df4365fed6aaa508506b6325a8efdc01d8271", + "https://jsr.io/@std/path/0.210.0/is_absolute.ts": "67232b41b860571c5b7537f4954c88d86ae2ba45e883ee37d3dec27b74909d13", + "https://jsr.io/@std/path/0.210.0/is_glob.ts": "567dce5c6656bdedfc6b3ee6c0833e1e4db2b8dff6e62148e94a917f289c06ad", + "https://jsr.io/@std/path/0.210.0/join.ts": "3ee91038e3eaa966897eddda43d5207d7cae5c2de8a658bdbd722e8f8f29206a", + "https://jsr.io/@std/path/0.210.0/join_globs.ts": "9b84d5103b63d3dbed4b2cf8b12477b2ad415c7d343f1488505162dc0e5f4db8", + "https://jsr.io/@std/path/0.210.0/mod.ts": "7c6fe3556d36492aee78badf4e92cecf67ca747e72d70cac6aac268fb5ccd47f", + "https://jsr.io/@std/path/0.210.0/normalize.ts": "aa95be9a92c7bd4f9dc0ba51e942a1973e2b93d266cd74f5ca751c136d520b66", + "https://jsr.io/@std/path/0.210.0/normalize_glob.ts": "674baa82e1c00b6cb153bbca36e06f8e0337cb8062db6d905ab5de16076ca46b", + "https://jsr.io/@std/path/0.210.0/parse.ts": "d87ff0deef3fb495bc0d862278ff96da5a06acf0625ca27769fc52ac0d3d6ece", + "https://jsr.io/@std/path/0.210.0/posix/_util.ts": "80c8e9b22ec44de0ea718f30738d382fb6278af2db504537dd559b064f762355", + "https://jsr.io/@std/path/0.210.0/posix/basename.ts": "86f4db191cc622da3f674d1cde6f8ad343c14d5fc484ff8feedbc8bba796d7d7", + "https://jsr.io/@std/path/0.210.0/posix/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/posix/dirname.ts": "70c73fd302935a05c0f453ab239bb526fb9ddd06e98d7524ff248a0027e5d4c8", + "https://jsr.io/@std/path/0.210.0/posix/extname.ts": "4b96dc7b8ef6ce156c759a126cbe8a00f8d022476425ad32eef01d16a910caa4", + "https://jsr.io/@std/path/0.210.0/posix/format.ts": "df268803afafeba3df4d20b4b7f287339cb4efcfc6caf55585fb45deda6e718f", + "https://jsr.io/@std/path/0.210.0/posix/from_file_url.ts": "e1ee657d8e993dc7a38c85cda95fa83049c35e75336e09d33810480a24a4120f", + "https://jsr.io/@std/path/0.210.0/posix/glob_to_regexp.ts": "e0ce84c7517db460ea9f99558c190584615fff5cb0ddacad98604e96d81edc1e", + "https://jsr.io/@std/path/0.210.0/posix/is_absolute.ts": "7b139bd0574c2cb4940ca3cdb5070258269d29e01d870a5e42ced4e9553cb7b2", + "https://jsr.io/@std/path/0.210.0/posix/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/posix/join.ts": "d8748c1dca2c199a7d371d31ca7f7ba425a2aad0ce25701375449165a7ef6887", + "https://jsr.io/@std/path/0.210.0/posix/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/posix/mod.ts": "30e9a595bb14869559df577cfacf79a35ece94227e814f5c1fc34c513cf9cc4e", + "https://jsr.io/@std/path/0.210.0/posix/normalize.ts": "b8f962d83e1bd5cd305fa5e34742c2ea4238ebb745a2cf641632bf6a09453456", + "https://jsr.io/@std/path/0.210.0/posix/normalize_glob.ts": "b648aa0d42a0d796eec26329c329c1de7b618e02b062a92085560394190a687a", + "https://jsr.io/@std/path/0.210.0/posix/parse.ts": "1df1f2b311ba07be7a83733444be1bae08f2dbaf70b85a084f67a49ebd05b2cf", + "https://jsr.io/@std/path/0.210.0/posix/relative.ts": "c67d8b2c80ddc978d30dc6e5e35b6eed51dd9de3e75b5f1a22afdf1b4080c60b", + "https://jsr.io/@std/path/0.210.0/posix/resolve.ts": "0de87a7a7032ab739b01620f66b51b7fb2b1dc0c6a7bbd3fb3fd402368673cf6", + "https://jsr.io/@std/path/0.210.0/posix/separator.ts": "0b6573b5f3269a3164d8edc9cefc33a02dd51003731c561008c8bb60220ebac1", + "https://jsr.io/@std/path/0.210.0/posix/to_file_url.ts": "2fc025607330c0e8b0a94bc180c07e517881de00f1c8ea8c3abdd0e70a2a404f", + "https://jsr.io/@std/path/0.210.0/posix/to_namespaced_path.ts": "c9228a0e74fd37e76622cd7b142b8416663a9b87db643302fa0926b5a5c83bdc", + "https://jsr.io/@std/path/0.210.0/relative.ts": "23d45ede8b7ac464a8299663a43488aad6b561414e7cbbe4790775590db6349c", + "https://jsr.io/@std/path/0.210.0/resolve.ts": "5b184efc87155a0af9fa305ff68a109e28de9aee81fc3e77cd01380f19daf867", + "https://jsr.io/@std/path/0.210.0/separator.ts": "1a21ffd408bfaa317bffff604e5a799f78a7a5571590bde6b9cdce7685953d74", + "https://jsr.io/@std/path/0.210.0/to_file_url.ts": "8895a9cd369819c689f8e53131c03277c0c79b56acbe0533b42f2f0b4ead7cbe", + "https://jsr.io/@std/path/0.210.0/to_namespaced_path.ts": "cf8734848aac3c7527d1689d2adf82132b1618eff3cc523a775068847416b22a", + "https://jsr.io/@std/path/0.210.0/windows/_util.ts": "4e44914486b5dc4cca98880693971ea15238c6bae67d8131c39e1112ea427909", + "https://jsr.io/@std/path/0.210.0/windows/basename.ts": "9ae2c0d1df814af9d660fd170c239dde1b66cbdf158185b4fbd7dddccc91bac4", + "https://jsr.io/@std/path/0.210.0/windows/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/windows/dirname.ts": "8be11039908fc7d09ac13e37ad2f31b7b19c0a5d6a238181c46e3ea41b910ac2", + "https://jsr.io/@std/path/0.210.0/windows/extname.ts": "0e22da7b84d0a89b79cc7a2e9c7163ab742fc600a8ffd8ea42aae633a5ac5a30", + "https://jsr.io/@std/path/0.210.0/windows/format.ts": "e3d94cb0f2ca1ed31c268ab6231dbd7478dec3cb7b276ece4421474598b55226", + "https://jsr.io/@std/path/0.210.0/windows/from_file_url.ts": "00d145aa2c793781cdc2740612bf897dac81c18a6c15420fb516e4030269108a", + "https://jsr.io/@std/path/0.210.0/windows/glob_to_regexp.ts": "5cbefcad6ae88294d23faf5b0f4766f4e1a0c2369ca14edae02c3876d1fa1ed9", + "https://jsr.io/@std/path/0.210.0/windows/is_absolute.ts": "16bc7d8aa335780336821158a147dba360127bc648699ea4302719454647e160", + "https://jsr.io/@std/path/0.210.0/windows/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/windows/join.ts": "a5c3ce40827eaac55ef52e791bdd30d8d40c9e748227243ea3185ecfe49a85fc", + "https://jsr.io/@std/path/0.210.0/windows/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/windows/mod.ts": "98e5151661d2cf34a0a291ff16e292e5079e9fb7cd64c93684f3f5a29d217123", + "https://jsr.io/@std/path/0.210.0/windows/normalize.ts": "d5c2da8f188f5ec342695f1284e2585ba50678ba187c8897c566569bbf9e4092", + "https://jsr.io/@std/path/0.210.0/windows/normalize_glob.ts": "db339cfb08e9bb38d49ce005ce318a20d03b77dbb75294a68d050f3d254887ad", + "https://jsr.io/@std/path/0.210.0/windows/parse.ts": "307029d3c69e8310452df48c238993e4ee41cbc8f7b9f4be6c1ad1201658c608", + "https://jsr.io/@std/path/0.210.0/windows/relative.ts": "f79960e8b922ed35197e53d2ae09a95ffdce7844c8430bf782f01f9d721731c7", + "https://jsr.io/@std/path/0.210.0/windows/resolve.ts": "c9111c13cbe521d36e3cb54eaeee146d04b9674ecb0df91aa9536f6bfd97903a", + "https://jsr.io/@std/path/0.210.0/windows/separator.ts": "ae21f27015f10510ed1ac4a0ba9c4c9c967cbdd9d9e776a3e4967553c397bd5d", + "https://jsr.io/@std/path/0.210.0/windows/to_file_url.ts": "2be7e66a8321a66cc382ddbeeaf79e0e962c83688e2e3c4be689276099680298", + "https://jsr.io/@std/path/0.210.0/windows/to_namespaced_path.ts": "e4e6f67f9c0f097f8eb913597064aacadb3abb158735773096d55f8d234f466b", + "https://jsr.io/@std/streams/0.210.0/_common.ts": "3b2c1f0287ce2ad51fff4091a7d0f48375c85b0ec341468e76d5ac13bb0014dd", + "https://jsr.io/@std/streams/0.210.0/buffer.ts": "ef343c8e8d51fe8b3e3b9ef5f08e119a630c0565713884efe54200207b8de513", + "https://jsr.io/@std/streams/0.210.0/byte_slice_stream.ts": "1831fdeb6237ab0404dc612eb78e2fcec9d24cb9cfa9519e4bd36188a81df6e2", + "https://jsr.io/@std/streams/0.210.0/copy.ts": "6a33fdb2c93817e33e5fdd78c8e799b914d09f45ac5608a84b56495c7823fdc6", + "https://jsr.io/@std/streams/0.210.0/delimiter_stream.ts": "db0c1d5852853d6fbb60abda6e2067efd6f121d6668367d7dc571aeecc0f1393", + "https://jsr.io/@std/streams/0.210.0/early_zip_readable_streams.ts": "3adf4c78d52fad18c6f201159b7796317c8082620036dd9a3d990204b5764981", + "https://jsr.io/@std/streams/0.210.0/iterate_reader.ts": "12b4d47ca6540a8feab09599828f59a44d431dc1a9c779d54f4d544185e5c326", + "https://jsr.io/@std/streams/0.210.0/limited_bytes_transform_stream.ts": "43c91a66ac7c3066133d007e4a25b802667d80d84c3de221d18a67167c3088e3", + "https://jsr.io/@std/streams/0.210.0/limited_transform_stream.ts": "584af31000cb4dc970d8244c41b2b3b3a6e3f9a078fceefea8c4312c8aee6e51", + "https://jsr.io/@std/streams/0.210.0/merge_readable_streams.ts": "e69a985ac1d4e24d29476c134f2ceb2b517b528649fd4ad8f66b887dbf65a8cf", + "https://jsr.io/@std/streams/0.210.0/mod.ts": "e133c271474f1e9dc19f5c4959406f5c2101540c56a3e7d7abc6bdb7bcef807e", + "https://jsr.io/@std/streams/0.210.0/read_all.ts": "c4c8b499668a7225fcb898274ec00374cf7b331e0d14dfe9bf44da03644a968c", + "https://jsr.io/@std/streams/0.210.0/readable_stream_from_reader.ts": "3d5bfd2567560557291ac6b01f0b045cd2336e3ebdb1f8c6c46726121585752c", + "https://jsr.io/@std/streams/0.210.0/reader_from_iterable.ts": "cbe640306618c4a61b2e43a710b1c89336c343e627f97b03bc5aa2c78a9c97a4", + "https://jsr.io/@std/streams/0.210.0/reader_from_stream_reader.ts": "56ef51217a464551e8efdc65a4c28c6d14148fbfd23ed88401732c50fcb3cf3d", + "https://jsr.io/@std/streams/0.210.0/text_delimiter_stream.ts": "00158278225105fedbadc0cbe5bf0e7d70cb2cf062eb48b4f5db694ba3a2dd61", + "https://jsr.io/@std/streams/0.210.0/text_line_stream.ts": "a74dc71908ebde4bf4d186b6d4be64475d7e43269a44e29c2d38984692501f03", + "https://jsr.io/@std/streams/0.210.0/to_array_buffer.ts": "c1322d7d8601f3e7516f2e1fc391a278b23d13ecd0213b44f4de63f9bdefa227", + "https://jsr.io/@std/streams/0.210.0/to_blob.ts": "0f5750b41e92abeeac81008e6df848206a0b83caf74d398da717d65cbb86a786", + "https://jsr.io/@std/streams/0.210.0/to_json.ts": "8986526388c2520c89abeba59fac3e1b6eaeee630f2bc271da0ba48cc24281c1", + "https://jsr.io/@std/streams/0.210.0/to_text.ts": "914a799c0e931d1f94cb8762d3909e3d9abdd15f20d7136ba2c848128825d8e6", + "https://jsr.io/@std/streams/0.210.0/to_transform_stream.ts": "59ff4acbd3a071daef6ad658213a7a7bac0cb33491b10e96210fb040e870a7c0", + "https://jsr.io/@std/streams/0.210.0/writable_stream_from_writer.ts": "6536e7aa2201e42730f24c901f27376edb092751d1aba6592ff5926c00537998", + "https://jsr.io/@std/streams/0.210.0/write_all.ts": "f96c63b2ab49ce4b7404250e53e0e02b15d499d8e67e950718280252888aae1d", + "https://jsr.io/@std/streams/0.210.0/writer_from_stream_writer.ts": "1e442c1523abf3343070edb598b9f71650ee375b53e7b1c8c41d1a2f1dc16a8b", + "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638", + "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" + }, + "workspace": { + "dependencies": [ + "jsr:@dsherret/dax", + ], + "members": { + "package_a": { + "dependencies": [ + "jsr:@oak/oak" + ] + } + } + } +} + +# remove package_a member +{ + "dependencies": [ + "jsr:@dsherret/dax" + ] +} + +# output +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@dsherret/dax": "jsr:@dsherret/dax@0.0.1", + "jsr:@dsherret/which@0.0.1": "jsr:@dsherret/which@0.0.1", + "jsr:@std/assert@0.210": "jsr:@std/assert@0.210.0", + "jsr:@std/assert@^0.210.0": "jsr:@std/assert@0.210.0", + "jsr:@std/bytes@0.210": "jsr:@std/bytes@0.210.0", + "jsr:@std/bytes@^0.210.0": "jsr:@std/bytes@0.210.0", + "jsr:@std/fmt@0.210.0": "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0": "jsr:@std/fs@0.210.0", + "jsr:@std/io@0.210": "jsr:@std/io@0.210.0", + "jsr:@std/io@0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/io@^0.210.0": "jsr:@std/io@0.210.0", + "jsr:@std/path@0.210": "jsr:@std/path@0.210.0", + "jsr:@std/path@0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/path@^0.210.0": "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210": "jsr:@std/streams@0.210.0", + "jsr:@std/streams@0.210.0": "jsr:@std/streams@0.210.0", + "jsr:@zome_unreferenced/package": "jsr:@zome_unreferenced/package@0.1.0", + "jsr:@zome_unreferenced/package_b": "jsr:@zome_unreferenced/package_b@0.1.0" + }, + "jsr": { + "@dsherret/dax@0.0.1": { + "dependencies": [ + "jsr:@dsherret/which@0.0.1", + "jsr:@std/fmt@0.210.0", + "jsr:@std/fs@0.210.0", + "jsr:@std/io@0.210.0", + "jsr:@std/path@0.210.0", + "jsr:@std/streams@0.210.0" + ] + }, + "@std/fs@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/path@^0.210.0" + ] + }, + "@std/io@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0" + ] + }, + "@std/path@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0" + ] + }, + "@std/streams@0.210.0": { + "dependencies": [ + "jsr:@std/assert@^0.210.0", + "jsr:@std/bytes@^0.210.0", + "jsr:@std/io@^0.210.0" + ] + }, + "jsr:@zome_unreferenced/package@0.1.0": { + "dependencies": [ + "jsr:@zome_unreferenced/package_b" + ] + } + } + }, + "remote": { + "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@dsherret/dax/0.0.1/src/command.ts": "e5dc7e3af38240657b4b9dc106b044c9c75bf16385c8f8af1c795ca89e27c3bc", + "https://jsr.io/@dsherret/dax/0.0.1/src/command_handler.ts": "56ee6893bf5ec829c370fe5a9367f60b3590e571f7b69153d48686779ab14d98", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/args.ts": "a138aef24294e3cbf13cef08f4836d018e8dd99fd06ad82e7e7f08ef680bbc1d", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cat.ts": "984035bd43b62c12764bcf321d84ce4bbe271aedaac48d251c8db080022d5cbf", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cd.ts": "82e85b573dd3006eefc20d1849ca638e461946688749e9a4ea53ab07c03ef7e4", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/cp_mv.ts": "aa09e3ab95c5eaae1186ad9a84d94977e19f4fa3c3fd5ab6a45b0b009600aae6", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/echo.ts": "a4f86022ad4eb5b8e8326e45fd2f571f6bd5e3c842f0c10e0be69f35b0d78180", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/exit.ts": "86b181d0f1e7723b265ec7a8858a43f5cac56cd485375524b4d8f022c5632419", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/export.ts": "1d5012c6b991e3c1112cc5841520e1ae651a20a0fd6c2e8014c79eba571755be", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/mkdir.ts": "620ecc4d690b342ecea9e9849303a4f8e2f65b430b70be846c1de766c9b5bbe7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/printenv.ts": "1efa36e21c6039da424c99753d748a486c3a7621507ca9d8d319e2a6e3e259ac", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/pwd.ts": "d89fac9ca37afe54967acd24744c3255aacc63f51697c27fe8d2e90a9049088f", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/rm.ts": "9c3b200c154c4a3c7e3b9ab9204daaad62b961453e9a8c8fc9a0451953e59f75", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/sleep.ts": "50b162accce6b8f20180f13d01613a6da6d88920d8322ac46ff7a2bbd6fcfbd7", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/test.ts": "d4a72076e652b3be65eaec9ff26eb342f5293140a82fa6bc357fa77b895ec3ab", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/touch.ts": "8386148784f92455502f09880306bc859ab61540c80fe0de0686b323662ee1fb", + "https://jsr.io/@dsherret/dax/0.0.1/src/commands/unset.ts": "dbebdad7e6e301ee621161a13669ab4164025aee5b323658ab283dab64b9eebf", + "https://jsr.io/@dsherret/dax/0.0.1/src/common.ts": "7295d13ab0023bb09d4c97e3a131cedada6294a33474f136b652a145330c8e3e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/confirm.ts": "ffcc76ebf10c8bfde6e4072b70b271e0453170ab0bd0bb795bc4e52a1237062e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/logger.ts": "e0ab5025915cef70df03681c756e211f25bb2e4331f82ed4256b17ddd9e794ea", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/mod.ts": "de8af7d646f6cb222eee6560171993690247941b13ed9d757789d16f019d73ee", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/multiSelect.ts": "50ff5de156028ff21025917b4c797c877037bf1460974b0f72b6ab0907d0a3d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/format.ts": "15ddbb8051580f88ed499281e12ca6f881f875ab73268d7451d7113ee130bd7d", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/interval.ts": "82bd91b9f8219c8d03b7aad51e7425f3276d96615b32826693dffd5905d663d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/progress/mod.ts": "5ae6cf88fe8caaa5c8218511c9458944201da5fbc9749b200d9e1227c93b3b9e", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/prompt.ts": "91c8d03fe2179438629491e71a6bdf0b6ca5bd31cbcc29ac7a2529daefe24d94", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/select.ts": "6b96555d7a13acd6e864a874e5687044932cf2412a45dc2811613cb2f00900ca", + "https://jsr.io/@dsherret/dax/0.0.1/src/console/utils.ts": "4e4f8cf5e435345e4ad94523544dc112e25969a12bdd05fb8073729e078cf47a", + "https://jsr.io/@dsherret/dax/0.0.1/src/deps.ts": "8e1acae3e51645f52fda44ffa528e3c346f00b37afc4bba1c2c90433d551bccb", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/mod.ts": "c992db99c8259ae3bf2d35666585dfefda84cf7cf4e624e42ea2ac7367900fe0", + "https://jsr.io/@dsherret/dax/0.0.1/src/lib/rs_lib.generated.js": "932a69348ce575e4a5c2398c896e9cd06cf287f6c18fb25dfdf23badca1c9f54", + "https://jsr.io/@dsherret/dax/0.0.1/src/path.ts": "365ed563f1a7421c20b094f5e56ca1f1ae9608b2a568b7ad394a63bdeabc1313", + "https://jsr.io/@dsherret/dax/0.0.1/src/pipes.ts": "850243b55f40eaad1f0020455c63905a0a41f543c2b7031d38188051398692d4", + "https://jsr.io/@dsherret/dax/0.0.1/src/request.ts": "9856b955ac1a0831a4998b23ba7be2f5e74ab3fd17230bc28476781c9f0f20d3", + "https://jsr.io/@dsherret/dax/0.0.1/src/result.ts": "0908b69c16b25c3b258f6b2ada12e124686df5f7ea2b98daa27a83973c7b118c", + "https://jsr.io/@dsherret/dax/0.0.1/src/shell.ts": "e18dcdccd5edf8ad8cd56b1e58a2b4f094eb969f3499303adde66ee71d231770", + "https://jsr.io/@dsherret/dax/0.0.1/src/vendor/outdent.ts": "d2f45f327f06ac8607a8fb6f6c428f25f8bb03673d07795541cf880e5f5c38e2", + "https://jsr.io/@dsherret/which/0.0.1/mod.ts": "cca0ebcff4f6c9088f7b9d7e5859b3561f0701b83a83b739000bfebb34eaebb5", + "https://jsr.io/@std/assert/0.210.0/assert.ts": "482cc19da8c816e226caa566d2b146258ecd6744eaac9c11ba7ad4560728f539", + "https://jsr.io/@std/assert/0.210.0/assertion_error.ts": "933921a961c2268d1d6914502b6dc927635952c87945cf4f378e1faa44ed5c41", + "https://jsr.io/@std/bytes/0.210.0/concat.ts": "e2ce8efada37cd155af124be42d8223cbbf8c799d002c453d61b34d4890df68a", + "https://jsr.io/@std/bytes/0.210.0/copy.ts": "7c8aa7f6e8280f34976712c30207ffb9de5c58a6f04dfeebcd34d946010cbe7c", + "https://jsr.io/@std/bytes/0.210.0/ends_with.ts": "21a9860e56476d5327a81269ce4936fe43821e90fed066330f6e18db26303170", + "https://jsr.io/@std/bytes/0.210.0/equals.ts": "fc190cce412b2136979181b163ec7e05f7e7a947e39102eee4b8c0d62519ddf9", + "https://jsr.io/@std/bytes/0.210.0/includes_needle.ts": "52f712898557827096bad92798cbb7a816af6637c1bf5003fc802b573a6a35e8", + "https://jsr.io/@std/bytes/0.210.0/index_of_needle.ts": "f678648ac446b4544fe7ea3ac799f511a201e13c3a9ae1286ad2cad053181262", + "https://jsr.io/@std/bytes/0.210.0/last_index_of_needle.ts": "3d1b5edfa2244538840e92ea728cc30405f8a0b421ebab9d8ba5b868fdf4ea79", + "https://jsr.io/@std/bytes/0.210.0/mod.ts": "9ed597c10cc61cdcd4cf725ad7ed935f6dc7ff481ba6bcc6d6a47633ea1ae0b8", + "https://jsr.io/@std/bytes/0.210.0/repeat.ts": "3a00f65e7b821938d424ae93cee7bf0c7fa188308b64085d027e2e088c1fc09e", + "https://jsr.io/@std/bytes/0.210.0/starts_with.ts": "5b0f2d1f93570639aa832ee21940c8418aa7ebc6ff8a54c1f8b9812b0e98c646", + "https://jsr.io/@std/fmt/0.210.0/colors.ts": "9c7152c3104edb8f118139b3270ec46df7a7033225cc7e7a0c4df671228012c9", + "https://jsr.io/@std/fs/0.210.0/_create_walk_entry.ts": "bc8fcc74f6811d934418fa4956e3b75325c63c54970acdefa058499e57313635", + "https://jsr.io/@std/fs/0.210.0/_get_file_info_type.ts": "9c92ff74f39bfba66b09faf9901af6a944cc71f014d9649e7d3e32eac4aeddfc", + "https://jsr.io/@std/fs/0.210.0/_is_same_path.ts": "3327f0ba58f918072a2ce6f7b606c3dd348e39419d187bfaeed845e2c2391df8", + "https://jsr.io/@std/fs/0.210.0/_is_subdir.ts": "7edb37b72e9ce64e8e3684f8115a1298333a9ffaa127394345ce4062261ebdb2", + "https://jsr.io/@std/fs/0.210.0/_to_path_string.ts": "0519fed81d0c52c5fd922e39335e7d84f9ca8b651ec3e2d1e8623ee882a91506", + "https://jsr.io/@std/fs/0.210.0/copy.ts": "9044a577c1b56f03f8476e9b101628617d7c7312c8ee3959c7f447dbf8988211", + "https://jsr.io/@std/fs/0.210.0/empty_dir.ts": "085f7bc11d4b0745e35c089b2b981d1f17c43d2dd25bf52fdfd2270bc356491c", + "https://jsr.io/@std/fs/0.210.0/ensure_dir.ts": "f768f673feb21e59a4f641c7002da783f133d3b0a27bc7a34ee7ce06330bc44b", + "https://jsr.io/@std/fs/0.210.0/ensure_file.ts": "a77e5ab6673aaae81072a4f26ce60a04bd395169ff3cc7362e1c6b7e6eee7af4", + "https://jsr.io/@std/fs/0.210.0/ensure_link.ts": "abf16dee6ea1455acae7ff84647666b888ddb63a597db9f39eb4fe399135f300", + "https://jsr.io/@std/fs/0.210.0/ensure_symlink.ts": "2ac390f6c409068e7184b25ecbd152c7f4955b74f8d2f57831e62f8c3c1d2df8", + "https://jsr.io/@std/fs/0.210.0/eol.ts": "11422201f6483e801ec2db385ff5c893d808e218037d38fee2c0574ea6227440", + "https://jsr.io/@std/fs/0.210.0/exists.ts": "42636533140f9a37d9d22d963fff062eda65a0e3e7c3d626da2a13517fdf13e7", + "https://jsr.io/@std/fs/0.210.0/expand_glob.ts": "09dc879cff29ba647897150008ab483a5583840c0090190ce5155bfbdae7e2c9", + "https://jsr.io/@std/fs/0.210.0/mod.ts": "bc3d0acd488cc7b42627044caf47d72019846d459279544e1934418955ba4898", + "https://jsr.io/@std/fs/0.210.0/move.ts": "fa54fd66e050b0a9f24c4e78e72da6a9de1bd39f6f3d01202236e440956fc5e7", + "https://jsr.io/@std/fs/0.210.0/walk.ts": "b5c2c4e171e98f8911ed9e5c6515b056bd6fa02dd766f9946d7754b2836918cd", + "https://jsr.io/@std/io/0.210.0/buf_reader.ts": "54283f8a528aff9428a4d082fb5b688e0472124274cee683deb35bedd818a3e6", + "https://jsr.io/@std/io/0.210.0/buf_writer.ts": "162459043c3285a316c8ce859ccefadc1336362cb1f8c00682240e284bc68254", + "https://jsr.io/@std/io/0.210.0/buffer.ts": "a868771d439504ac06abb0f3081fa72c9592c1658ad95645f4d7dd5902cc346b", + "https://jsr.io/@std/io/0.210.0/copy_n.ts": "db62715df471ed1a9f4ec2e6828d75f64d02c81cf8e9a216d40f39c72ca3963b", + "https://jsr.io/@std/io/0.210.0/limited_reader.ts": "cbcecd962fa9d292b5a226e657d3c9e60a374d19ae8a3bba9956e6ce4a08d760", + "https://jsr.io/@std/io/0.210.0/mod.ts": "61c2100d3eac23f0574cffb74257069a8308cf5183342d8c344fcf307e1d5b8c", + "https://jsr.io/@std/io/0.210.0/multi_reader.ts": "e7edd9157732776ba5483b2bc2597f7b3b27913207dbf411c79172c1fc8a884d", + "https://jsr.io/@std/io/0.210.0/read_delim.ts": "4dedfd0ff0216bbb5f71bdbbc6513be6d3a327659cfc07c004ef6254bc625618", + "https://jsr.io/@std/io/0.210.0/read_int.ts": "4e96b319f9b82b066c04e13f9f14ad4460bcaf367454844f6395b51820f5b74f", + "https://jsr.io/@std/io/0.210.0/read_lines.ts": "45b1a27df6d046adb7c14c72bfb328734160f1d2cafa4ab42e100ad99fb06e2a", + "https://jsr.io/@std/io/0.210.0/read_long.ts": "b24d81075cd69660ad789948a8413c04038b007890f69418fd3d96dfc5609903", + "https://jsr.io/@std/io/0.210.0/read_range.ts": "bdc3a159054afd1fb0fd0060f841434bc774ea2db67382d9909c0a2defd8cc5f", + "https://jsr.io/@std/io/0.210.0/read_short.ts": "a2dd615728dbb5cf4a16e23ef12a0d208bd36ceff8dc062a34e0cd2140538f53", + "https://jsr.io/@std/io/0.210.0/read_string_delim.ts": "acbc79d5eb807f6c736f861078c152cf3e6a103b0addda8d94335a8baf10b186", + "https://jsr.io/@std/io/0.210.0/slice_long_to_bytes.ts": "970b12c39f2a68dd29a038ae8f9ccf51298973867e97f4da739b669eb57f85b4", + "https://jsr.io/@std/io/0.210.0/string_reader.ts": "fd7e8babd7137e9b622dde2438c7f7d9638902d63f29ca43e91aa67ac957cb5c", + "https://jsr.io/@std/io/0.210.0/string_writer.ts": "5c0f8261b8c1a5a89f1885af091feda7021e25f7b40d567890e7c31ce8ee78eb", + "https://jsr.io/@std/path/0.210.0/_common/assert_path.ts": "061e4d093d4ba5aebceb2c4da3318bfe3289e868570e9d3a8e327d91c2958946", + "https://jsr.io/@std/path/0.210.0/_common/basename.ts": "0d978ff818f339cd3b1d09dc914881f4d15617432ae519c1b8fdc09ff8d3789a", + "https://jsr.io/@std/path/0.210.0/_common/common.ts": "9e4233b2eeb50f8b2ae10ecc2108f58583aea6fd3e8907827020282dc2b76143", + "https://jsr.io/@std/path/0.210.0/_common/constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", + "https://jsr.io/@std/path/0.210.0/_common/dirname.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/format.ts": "018a88fb76802286e87a871cafe5e4be147a2a90d794a331121560b66845ab63", + "https://jsr.io/@std/path/0.210.0/_common/from_file_url.ts": "ef1bf3197d2efbf0297a2bdbf3a61d804b18f2bcce45548ae112313ec5be3c22", + "https://jsr.io/@std/path/0.210.0/_common/glob_to_reg_exp.ts": "50386887d6041f15741d0013a703ee63ef673983d465d3a0c9c190e95f8da4fe", + "https://jsr.io/@std/path/0.210.0/_common/normalize.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://jsr.io/@std/path/0.210.0/_common/normalize_string.ts": "88c472f28ae49525f9fe82de8c8816d93442d46a30d6bb5063b07ff8a89ff589", + "https://jsr.io/@std/path/0.210.0/_common/relative.ts": "1af19d787a2a84b8c534cc487424fe101f614982ae4851382c978ab2216186b4", + "https://jsr.io/@std/path/0.210.0/_common/strip_trailing_separators.ts": "7ffc7c287e97bdeeee31b155828686967f222cd73f9e5780bfe7dfb1b58c6c65", + "https://jsr.io/@std/path/0.210.0/_common/to_file_url.ts": "a8cdd1633bc9175b7eebd3613266d7c0b6ae0fb0cff24120b6092ac31662f9ae", + "https://jsr.io/@std/path/0.210.0/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", + "https://jsr.io/@std/path/0.210.0/_os.ts": "30b0c2875f360c9296dbe6b7f2d528f0f9c741cecad2e97f803f5219e91b40a2", + "https://jsr.io/@std/path/0.210.0/basename.ts": "04bb5ef3e86bba8a35603b8f3b69537112cdd19ce64b77f2522006da2977a5f3", + "https://jsr.io/@std/path/0.210.0/common.ts": "8fcbd9399cd86e390e4160ea56e5afe7c65310e4152845392903e7b9afce4a3d", + "https://jsr.io/@std/path/0.210.0/dirname.ts": "88a0a71c21debafc4da7a4cd44fd32e899462df458fbca152390887d41c40361", + "https://jsr.io/@std/path/0.210.0/extname.ts": "8c6d6112bce335b4d3d5a07cb0451816d0c2094c147049874fca2db5f707044b", + "https://jsr.io/@std/path/0.210.0/format.ts": "3457530cc85d1b4bab175f9ae73998b34fd456c830d01883169af0681b8894fb", + "https://jsr.io/@std/path/0.210.0/from_file_url.ts": "a45def541616dfe357424708c19a9fe890b170893d77d8f2a1381294249774ce", + "https://jsr.io/@std/path/0.210.0/glob.ts": "a00a81a55c02bbe074ab21a50b6495c6f7795f54cd718c824adaa92c6c9b7419", + "https://jsr.io/@std/path/0.210.0/glob_to_regexp.ts": "74d7448c471e293d03f05ccb968df4365fed6aaa508506b6325a8efdc01d8271", + "https://jsr.io/@std/path/0.210.0/is_absolute.ts": "67232b41b860571c5b7537f4954c88d86ae2ba45e883ee37d3dec27b74909d13", + "https://jsr.io/@std/path/0.210.0/is_glob.ts": "567dce5c6656bdedfc6b3ee6c0833e1e4db2b8dff6e62148e94a917f289c06ad", + "https://jsr.io/@std/path/0.210.0/join.ts": "3ee91038e3eaa966897eddda43d5207d7cae5c2de8a658bdbd722e8f8f29206a", + "https://jsr.io/@std/path/0.210.0/join_globs.ts": "9b84d5103b63d3dbed4b2cf8b12477b2ad415c7d343f1488505162dc0e5f4db8", + "https://jsr.io/@std/path/0.210.0/mod.ts": "7c6fe3556d36492aee78badf4e92cecf67ca747e72d70cac6aac268fb5ccd47f", + "https://jsr.io/@std/path/0.210.0/normalize.ts": "aa95be9a92c7bd4f9dc0ba51e942a1973e2b93d266cd74f5ca751c136d520b66", + "https://jsr.io/@std/path/0.210.0/normalize_glob.ts": "674baa82e1c00b6cb153bbca36e06f8e0337cb8062db6d905ab5de16076ca46b", + "https://jsr.io/@std/path/0.210.0/parse.ts": "d87ff0deef3fb495bc0d862278ff96da5a06acf0625ca27769fc52ac0d3d6ece", + "https://jsr.io/@std/path/0.210.0/posix/_util.ts": "80c8e9b22ec44de0ea718f30738d382fb6278af2db504537dd559b064f762355", + "https://jsr.io/@std/path/0.210.0/posix/basename.ts": "86f4db191cc622da3f674d1cde6f8ad343c14d5fc484ff8feedbc8bba796d7d7", + "https://jsr.io/@std/path/0.210.0/posix/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/posix/dirname.ts": "70c73fd302935a05c0f453ab239bb526fb9ddd06e98d7524ff248a0027e5d4c8", + "https://jsr.io/@std/path/0.210.0/posix/extname.ts": "4b96dc7b8ef6ce156c759a126cbe8a00f8d022476425ad32eef01d16a910caa4", + "https://jsr.io/@std/path/0.210.0/posix/format.ts": "df268803afafeba3df4d20b4b7f287339cb4efcfc6caf55585fb45deda6e718f", + "https://jsr.io/@std/path/0.210.0/posix/from_file_url.ts": "e1ee657d8e993dc7a38c85cda95fa83049c35e75336e09d33810480a24a4120f", + "https://jsr.io/@std/path/0.210.0/posix/glob_to_regexp.ts": "e0ce84c7517db460ea9f99558c190584615fff5cb0ddacad98604e96d81edc1e", + "https://jsr.io/@std/path/0.210.0/posix/is_absolute.ts": "7b139bd0574c2cb4940ca3cdb5070258269d29e01d870a5e42ced4e9553cb7b2", + "https://jsr.io/@std/path/0.210.0/posix/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/posix/join.ts": "d8748c1dca2c199a7d371d31ca7f7ba425a2aad0ce25701375449165a7ef6887", + "https://jsr.io/@std/path/0.210.0/posix/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/posix/mod.ts": "30e9a595bb14869559df577cfacf79a35ece94227e814f5c1fc34c513cf9cc4e", + "https://jsr.io/@std/path/0.210.0/posix/normalize.ts": "b8f962d83e1bd5cd305fa5e34742c2ea4238ebb745a2cf641632bf6a09453456", + "https://jsr.io/@std/path/0.210.0/posix/normalize_glob.ts": "b648aa0d42a0d796eec26329c329c1de7b618e02b062a92085560394190a687a", + "https://jsr.io/@std/path/0.210.0/posix/parse.ts": "1df1f2b311ba07be7a83733444be1bae08f2dbaf70b85a084f67a49ebd05b2cf", + "https://jsr.io/@std/path/0.210.0/posix/relative.ts": "c67d8b2c80ddc978d30dc6e5e35b6eed51dd9de3e75b5f1a22afdf1b4080c60b", + "https://jsr.io/@std/path/0.210.0/posix/resolve.ts": "0de87a7a7032ab739b01620f66b51b7fb2b1dc0c6a7bbd3fb3fd402368673cf6", + "https://jsr.io/@std/path/0.210.0/posix/separator.ts": "0b6573b5f3269a3164d8edc9cefc33a02dd51003731c561008c8bb60220ebac1", + "https://jsr.io/@std/path/0.210.0/posix/to_file_url.ts": "2fc025607330c0e8b0a94bc180c07e517881de00f1c8ea8c3abdd0e70a2a404f", + "https://jsr.io/@std/path/0.210.0/posix/to_namespaced_path.ts": "c9228a0e74fd37e76622cd7b142b8416663a9b87db643302fa0926b5a5c83bdc", + "https://jsr.io/@std/path/0.210.0/relative.ts": "23d45ede8b7ac464a8299663a43488aad6b561414e7cbbe4790775590db6349c", + "https://jsr.io/@std/path/0.210.0/resolve.ts": "5b184efc87155a0af9fa305ff68a109e28de9aee81fc3e77cd01380f19daf867", + "https://jsr.io/@std/path/0.210.0/separator.ts": "1a21ffd408bfaa317bffff604e5a799f78a7a5571590bde6b9cdce7685953d74", + "https://jsr.io/@std/path/0.210.0/to_file_url.ts": "8895a9cd369819c689f8e53131c03277c0c79b56acbe0533b42f2f0b4ead7cbe", + "https://jsr.io/@std/path/0.210.0/to_namespaced_path.ts": "cf8734848aac3c7527d1689d2adf82132b1618eff3cc523a775068847416b22a", + "https://jsr.io/@std/path/0.210.0/windows/_util.ts": "4e44914486b5dc4cca98880693971ea15238c6bae67d8131c39e1112ea427909", + "https://jsr.io/@std/path/0.210.0/windows/basename.ts": "9ae2c0d1df814af9d660fd170c239dde1b66cbdf158185b4fbd7dddccc91bac4", + "https://jsr.io/@std/path/0.210.0/windows/common.ts": "a3dade155e1855fe4d33ff0f4bee07848817d623c2593f778a4a38f13fd1293a", + "https://jsr.io/@std/path/0.210.0/windows/dirname.ts": "8be11039908fc7d09ac13e37ad2f31b7b19c0a5d6a238181c46e3ea41b910ac2", + "https://jsr.io/@std/path/0.210.0/windows/extname.ts": "0e22da7b84d0a89b79cc7a2e9c7163ab742fc600a8ffd8ea42aae633a5ac5a30", + "https://jsr.io/@std/path/0.210.0/windows/format.ts": "e3d94cb0f2ca1ed31c268ab6231dbd7478dec3cb7b276ece4421474598b55226", + "https://jsr.io/@std/path/0.210.0/windows/from_file_url.ts": "00d145aa2c793781cdc2740612bf897dac81c18a6c15420fb516e4030269108a", + "https://jsr.io/@std/path/0.210.0/windows/glob_to_regexp.ts": "5cbefcad6ae88294d23faf5b0f4766f4e1a0c2369ca14edae02c3876d1fa1ed9", + "https://jsr.io/@std/path/0.210.0/windows/is_absolute.ts": "16bc7d8aa335780336821158a147dba360127bc648699ea4302719454647e160", + "https://jsr.io/@std/path/0.210.0/windows/is_glob.ts": "fdeb5517b2eac316fb0a65cb9d16f1ede2d4b60df9e1d6c645085d7a027b6670", + "https://jsr.io/@std/path/0.210.0/windows/join.ts": "a5c3ce40827eaac55ef52e791bdd30d8d40c9e748227243ea3185ecfe49a85fc", + "https://jsr.io/@std/path/0.210.0/windows/join_globs.ts": "828c709d3e6c59ce1d8e91a0255836aac620cdfaef56028db33889e806382660", + "https://jsr.io/@std/path/0.210.0/windows/mod.ts": "98e5151661d2cf34a0a291ff16e292e5079e9fb7cd64c93684f3f5a29d217123", + "https://jsr.io/@std/path/0.210.0/windows/normalize.ts": "d5c2da8f188f5ec342695f1284e2585ba50678ba187c8897c566569bbf9e4092", + "https://jsr.io/@std/path/0.210.0/windows/normalize_glob.ts": "db339cfb08e9bb38d49ce005ce318a20d03b77dbb75294a68d050f3d254887ad", + "https://jsr.io/@std/path/0.210.0/windows/parse.ts": "307029d3c69e8310452df48c238993e4ee41cbc8f7b9f4be6c1ad1201658c608", + "https://jsr.io/@std/path/0.210.0/windows/relative.ts": "f79960e8b922ed35197e53d2ae09a95ffdce7844c8430bf782f01f9d721731c7", + "https://jsr.io/@std/path/0.210.0/windows/resolve.ts": "c9111c13cbe521d36e3cb54eaeee146d04b9674ecb0df91aa9536f6bfd97903a", + "https://jsr.io/@std/path/0.210.0/windows/separator.ts": "ae21f27015f10510ed1ac4a0ba9c4c9c967cbdd9d9e776a3e4967553c397bd5d", + "https://jsr.io/@std/path/0.210.0/windows/to_file_url.ts": "2be7e66a8321a66cc382ddbeeaf79e0e962c83688e2e3c4be689276099680298", + "https://jsr.io/@std/path/0.210.0/windows/to_namespaced_path.ts": "e4e6f67f9c0f097f8eb913597064aacadb3abb158735773096d55f8d234f466b", + "https://jsr.io/@std/streams/0.210.0/_common.ts": "3b2c1f0287ce2ad51fff4091a7d0f48375c85b0ec341468e76d5ac13bb0014dd", + "https://jsr.io/@std/streams/0.210.0/buffer.ts": "ef343c8e8d51fe8b3e3b9ef5f08e119a630c0565713884efe54200207b8de513", + "https://jsr.io/@std/streams/0.210.0/byte_slice_stream.ts": "1831fdeb6237ab0404dc612eb78e2fcec9d24cb9cfa9519e4bd36188a81df6e2", + "https://jsr.io/@std/streams/0.210.0/copy.ts": "6a33fdb2c93817e33e5fdd78c8e799b914d09f45ac5608a84b56495c7823fdc6", + "https://jsr.io/@std/streams/0.210.0/delimiter_stream.ts": "db0c1d5852853d6fbb60abda6e2067efd6f121d6668367d7dc571aeecc0f1393", + "https://jsr.io/@std/streams/0.210.0/early_zip_readable_streams.ts": "3adf4c78d52fad18c6f201159b7796317c8082620036dd9a3d990204b5764981", + "https://jsr.io/@std/streams/0.210.0/iterate_reader.ts": "12b4d47ca6540a8feab09599828f59a44d431dc1a9c779d54f4d544185e5c326", + "https://jsr.io/@std/streams/0.210.0/limited_bytes_transform_stream.ts": "43c91a66ac7c3066133d007e4a25b802667d80d84c3de221d18a67167c3088e3", + "https://jsr.io/@std/streams/0.210.0/limited_transform_stream.ts": "584af31000cb4dc970d8244c41b2b3b3a6e3f9a078fceefea8c4312c8aee6e51", + "https://jsr.io/@std/streams/0.210.0/merge_readable_streams.ts": "e69a985ac1d4e24d29476c134f2ceb2b517b528649fd4ad8f66b887dbf65a8cf", + "https://jsr.io/@std/streams/0.210.0/mod.ts": "e133c271474f1e9dc19f5c4959406f5c2101540c56a3e7d7abc6bdb7bcef807e", + "https://jsr.io/@std/streams/0.210.0/read_all.ts": "c4c8b499668a7225fcb898274ec00374cf7b331e0d14dfe9bf44da03644a968c", + "https://jsr.io/@std/streams/0.210.0/readable_stream_from_reader.ts": "3d5bfd2567560557291ac6b01f0b045cd2336e3ebdb1f8c6c46726121585752c", + "https://jsr.io/@std/streams/0.210.0/reader_from_iterable.ts": "cbe640306618c4a61b2e43a710b1c89336c343e627f97b03bc5aa2c78a9c97a4", + "https://jsr.io/@std/streams/0.210.0/reader_from_stream_reader.ts": "56ef51217a464551e8efdc65a4c28c6d14148fbfd23ed88401732c50fcb3cf3d", + "https://jsr.io/@std/streams/0.210.0/text_delimiter_stream.ts": "00158278225105fedbadc0cbe5bf0e7d70cb2cf062eb48b4f5db694ba3a2dd61", + "https://jsr.io/@std/streams/0.210.0/text_line_stream.ts": "a74dc71908ebde4bf4d186b6d4be64475d7e43269a44e29c2d38984692501f03", + "https://jsr.io/@std/streams/0.210.0/to_array_buffer.ts": "c1322d7d8601f3e7516f2e1fc391a278b23d13ecd0213b44f4de63f9bdefa227", + "https://jsr.io/@std/streams/0.210.0/to_blob.ts": "0f5750b41e92abeeac81008e6df848206a0b83caf74d398da717d65cbb86a786", + "https://jsr.io/@std/streams/0.210.0/to_json.ts": "8986526388c2520c89abeba59fac3e1b6eaeee630f2bc271da0ba48cc24281c1", + "https://jsr.io/@std/streams/0.210.0/to_text.ts": "914a799c0e931d1f94cb8762d3909e3d9abdd15f20d7136ba2c848128825d8e6", + "https://jsr.io/@std/streams/0.210.0/to_transform_stream.ts": "59ff4acbd3a071daef6ad658213a7a7bac0cb33491b10e96210fb040e870a7c0", + "https://jsr.io/@std/streams/0.210.0/writable_stream_from_writer.ts": "6536e7aa2201e42730f24c901f27376edb092751d1aba6592ff5926c00537998", + "https://jsr.io/@std/streams/0.210.0/write_all.ts": "f96c63b2ab49ce4b7404250e53e0e02b15d499d8e67e950718280252888aae1d", + "https://jsr.io/@std/streams/0.210.0/writer_from_stream_writer.ts": "1e442c1523abf3343070edb598b9f71650ee375b53e7b1c8c41d1a2f1dc16a8b", + "https://jsr.io/@std/streams/0.210.0/zip_readable_streams.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad638", + "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" + }, + "workspace": { + "dependencies": [ + "jsr:@dsherret/dax" + ] + } +} From 3f8a869237aa93a9d9ea9f5509f6a96dba7c9f72 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 20:00:14 -0500 Subject: [PATCH 28/38] Remove --- tests/integration_test.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration_test.rs b/tests/integration_test.rs index fa12695..e25a113 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -86,7 +86,6 @@ fn config_changes() { false, ) .unwrap(); - eprintln!("CONFIG FILE: {:#?}", config_file.content); for change_and_output in &mut spec.change_and_outputs { // setting the new workspace config should change the has_content_changed flag config_file.has_content_changed = false; From 8ff8f66e4cba9e1af9d01fb33b10dd9847b86ba4 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 20:18:47 -0500 Subject: [PATCH 29/38] Clippy --- tests/helpers/mod.rs | 2 +- tests/integration_test.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/helpers/mod.rs b/tests/helpers/mod.rs index e07c824..81c5df9 100644 --- a/tests/helpers/mod.rs +++ b/tests/helpers/mod.rs @@ -50,7 +50,7 @@ impl ConfigChangeSpec { let mut result = String::new(); while let Some(line) = lines.next() { result.push_str(line); - result.push_str("\n"); + result.push('\n'); if let Some(next_line) = lines.peek() { if next_line.starts_with('#') { break; diff --git a/tests/integration_test.rs b/tests/integration_test.rs index e25a113..837ba91 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -5,7 +5,6 @@ use std::path::PathBuf; use deno_lockfile::WorkspaceConfig; use deno_lockfile::WorkspaceMemberConfig; use pretty_assertions::assert_eq; -use serde; use deno_lockfile::Lockfile; use deno_lockfile::SetWorkspaceConfigOptions; @@ -18,7 +17,7 @@ mod helpers; fn nv_to_jsr_url(nv: &str) -> Option { // very hacky, but good enough for tests - let path = format!("@{}", nv[1..].replace("@", "/")); + let path = format!("@{}", nv[1..].replace('@', "/")); Some(format!("https://jsr.io/{}/", path)) } From 2b59da43e30163c2207b3799f33da789d96bc618 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 19 Jan 2024 20:54:03 -0500 Subject: [PATCH 30/38] Remove clearing code when adding an import map. Probably best for the user to just delete it --- src/lib.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d66a27c..222a355 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -129,7 +129,7 @@ pub struct PackagesContent { /// "dependencies": [ /// "jsr:@std/bytes@0.210", /// // ...etc... - /// "npm:path-to-regexpr@6.2.1" + /// "npm:path-to-regexpr@^6.2" /// ] /// } /// } @@ -155,14 +155,6 @@ impl PackagesContent { fn is_empty(&self) -> bool { self.specifiers.is_empty() && self.npm.is_empty() } - - fn clear_jsr(&mut self) { - self.specifiers.retain(|k, v| { - let has_npm = k.starts_with("jsr:") || v.starts_with("jsr:"); - !has_npm - }); - self.jsr.clear(); - } } #[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] @@ -414,13 +406,6 @@ impl Lockfile { .collect::>(); let mut removed_deps = HashSet::new(); - // clear out any jsr packages when someone adds an import map - if self.content.workspace.root.dependencies.is_none() - && options.config.root.dependencies.is_some() - { - self.content.packages.clear_jsr() - } - // set the root update_workspace_member( &mut self.has_content_changed, From 23310f1fb0e7f7adc9778e1dc93c6aa718f07ecc Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 21 Jan 2024 09:35:05 -0500 Subject: [PATCH 31/38] Maintain has_content_changed when lockfile is empty --- src/lib.rs | 23 +++++++++++-- tests/integration_test.rs | 69 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 222a355..4972a69 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,7 +28,7 @@ pub struct SetWorkspaceConfigOptions Option> { pub nv_to_jsr_url: F, } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WorkspaceConfig { #[serde(flatten)] pub root: WorkspaceMemberConfig, @@ -36,7 +36,7 @@ pub struct WorkspaceConfig { pub members: BTreeMap, } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WorkspaceMemberConfig { #[serde(default)] pub dependencies: Option>, @@ -241,6 +241,13 @@ impl LockfileContent { workspace: Default::default(), } } + + pub fn is_empty(&self) -> bool { + self.packages.is_empty() + && self.redirects.is_empty() + && self.remote.is_empty() + && self.workspace.is_empty() + } } #[derive(Debug, Clone, Hash)] @@ -398,6 +405,12 @@ impl Lockfile { } } + // If the lockfile is empty, it's most likely not created yet and so + // we don't want this information being added to the lockfile to cause + // a lockfile to be created. If this is the case, revert the lockfile back + // to !self.has_content_changed after populating it with this information + let allow_content_changed = + self.has_content_changed || !self.content.is_empty(); let old_deps = self .content .workspace @@ -471,6 +484,12 @@ impl Lockfile { &mut self.content.remote, ); } + + if !allow_content_changed { + // revert it back so this change doesn't by itself cause + // a lockfile to be created. + self.has_content_changed = false; + } } // Synchronize lock file to disk - noop if --lock-write file is not specified. diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 837ba91..fc313b6 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -131,3 +131,72 @@ fn config_changes() { } } } + +#[test] +fn adding_workspace_does_not_cause_content_changes() { + // should maintain the has_content_changed flag when lockfile empty + { + let mut lockfile = + Lockfile::new(PathBuf::from("./deno.lock"), true).unwrap(); + + assert!(!lockfile.has_content_changed); + lockfile.set_workspace_config(SetWorkspaceConfigOptions { + config: WorkspaceConfig { + root: WorkspaceMemberConfig { + dependencies: Some(BTreeSet::from( + ["jsr:@scope/package".to_string()], + )), + package_json_deps: None, + }, + members: BTreeMap::new(), + }, + nv_to_jsr_url, + }); + assert!(!lockfile.has_content_changed); // should not have changed + } + + // should maintain has_content_changed flag when true and lockfile is empty + { + let mut lockfile = + Lockfile::new(PathBuf::from("./deno.lock"), true).unwrap(); + lockfile.has_content_changed = true; + lockfile.set_workspace_config(SetWorkspaceConfigOptions { + config: WorkspaceConfig { + root: WorkspaceMemberConfig { + dependencies: Some(BTreeSet::from([ + "jsr:@scope/package2".to_string() + ])), + package_json_deps: None, + }, + members: BTreeMap::new(), + }, + nv_to_jsr_url, + }); + assert!(lockfile.has_content_changed); + } + + // should not maintain the has_content_changed flag when lockfile is not empty + { + let mut lockfile = + Lockfile::new(PathBuf::from("./deno.lock"), true).unwrap(); + lockfile + .content + .redirects + .insert("a".to_string(), "b".to_string()); + + assert!(!lockfile.has_content_changed); + lockfile.set_workspace_config(SetWorkspaceConfigOptions { + config: WorkspaceConfig { + root: WorkspaceMemberConfig { + dependencies: Some(BTreeSet::from( + ["jsr:@scope/package".to_string()], + )), + package_json_deps: None, + }, + members: BTreeMap::new(), + }, + nv_to_jsr_url, + }); + assert!(lockfile.has_content_changed); // should have changed since lockfile was not empty + } +} From ebd1aef60ee70ba1cd444b389c549cc89d48be49 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 21 Jan 2024 11:04:25 -0500 Subject: [PATCH 32/38] Should remove when a package.json or deno.json is deleted --- src/error.rs | 7 +- src/lib.rs | 88 +- tests/helpers/mod.rs | 3 + tests/integration_test.rs | 12 +- .../config_changes/NoConfigDoesNotRemove.txt | 1026 ----------------- .../specs/config_changes/NoConfigRemoves.txt | 219 ++++ .../{PeerDep01_only.txt => PeerDep01.txt} | 0 .../config_changes/RemovingWorkspaceDep.txt | 9 +- .../RemovingWorkspaceMember.txt | 2 +- 9 files changed, 317 insertions(+), 1049 deletions(-) delete mode 100644 tests/specs/config_changes/NoConfigDoesNotRemove.txt create mode 100644 tests/specs/config_changes/NoConfigRemoves.txt rename tests/specs/config_changes/{PeerDep01_only.txt => PeerDep01.txt} (100%) diff --git a/src/error.rs b/src/error.rs index ccbac2b..84e9478 100644 --- a/src/error.rs +++ b/src/error.rs @@ -10,6 +10,9 @@ pub enum LockfileError { #[error("Unable to read lockfile. {0}")] ReadError(String), - #[error("Unable to parse contents of lockfile. {0}")] - ParseError(String), + #[error("Unable to parse contents of lockfile. {0}: {1:#}")] + ParseError(String, serde_json::Error), + + #[error("Unsupported lockfile version '{0}'. Try upgrading Deno or recreating the lockfile.")] + UnsupportedVersion(String), } diff --git a/src/lib.rs b/src/lib.rs index 4972a69..bbf4388 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,6 +22,10 @@ use crate::graphs::LockfilePackageGraph; pub struct SetWorkspaceConfigOptions Option> { pub config: WorkspaceConfig, + /// If the user is running with --no-config + pub no_config: bool, + /// If the user is running with --no-npm, we don't want to clear out the package.json + pub no_npm: bool, /// Gives a name and version from JSR (ex. `@scope/package@1.0.0`) /// and expects a URL to the JSR package. This will then be used to /// remove items from the "remotes" for removed packages. @@ -311,24 +315,20 @@ impl Lockfile { } let value: serde_json::Map = - serde_json::from_str(content) - .map_err(|_| Error::ParseError(filename.display().to_string()))?; + serde_json::from_str(content).map_err(|err| { + Error::ParseError(filename.display().to_string(), err) + })?; let version = value.get("version").and_then(|v| v.as_str()); let value = match version { Some("3") => value, Some("2") => transforms::transform2_to_3(value), None => transforms::transform2_to_3(transforms::transform1_to_2(value)), Some(version) => { - return Err(Error::ParseError(format!( - "Unsupported lockfile version '{}'. Try upgrading Deno or recreating the lockfile.", - version - ))) + return Err(Error::UnsupportedVersion(version.to_string())); } }; let content = serde_json::from_value::(value.into()) - .map_err(|err| { - Error::ParseError(format!("{}: {:#}", filename.display(), err)) - })?; + .map_err(|err| Error::ParseError(filename.display().to_string(), err))?; Ok(Lockfile { overwrite, @@ -346,7 +346,7 @@ impl Lockfile { pub fn set_workspace_config Option>( &mut self, - options: SetWorkspaceConfigOptions, + mut options: SetWorkspaceConfigOptions, ) { fn update_workspace_member( has_content_changed: &mut bool, @@ -370,9 +370,9 @@ impl Lockfile { *has_content_changed = true; } } - } else { - // don't clear the deps because someone might be running - // a one-off script without a deno.json + } else if let Some(deps) = current.dependencies.take() { + removed_deps.extend(deps); + *has_content_changed = true; } if let Some(new_package_json_deps) = new.package_json_deps { @@ -399,9 +399,63 @@ impl Lockfile { *has_content_changed = true; } } - } else { - // don't clear the package.json field because someone might - // be running a one-off script without a package.json + } else if let Some(current_package_json) = current.package_json.take() { + removed_deps.extend(current_package_json.dependencies); + *has_content_changed = true; + } + } + + // if specified, don't modify the package.json dependencies + if options.no_npm || options.no_config { + if options.config.root.package_json_deps.is_none() { + options.config.root.package_json_deps = self + .content + .workspace + .root + .package_json + .as_ref() + .map(|p| p.dependencies.clone()); + } + for (key, value) in options.config.members.iter_mut() { + if value.package_json_deps.is_none() { + value.package_json_deps = self + .content + .workspace + .members + .get(key) + .and_then(|m| m.package_json.as_ref()) + .map(|p| p.dependencies.clone()); + } + } + } + if options.no_config { + if options.config.root.dependencies.is_none() { + options.config.root.dependencies = + self.content.workspace.root.dependencies.clone(); + } + for (key, value) in options.config.members.iter_mut() { + if value.dependencies.is_none() { + value.dependencies = self + .content + .workspace + .members + .get(key) + .and_then(|m| m.dependencies.clone()); + } + } + for (key, value) in self.content.workspace.members.iter() { + if options.config.members.get(key).is_none() { + options.config.members.insert( + key.clone(), + WorkspaceMemberConfig { + dependencies: value.dependencies.clone(), + package_json_deps: value + .package_json + .as_ref() + .map(|p| p.dependencies.clone()), + }, + ); + } } } @@ -711,7 +765,7 @@ mod tests { ) .err() .unwrap().to_string(), - "Unable to parse contents of lockfile. Unsupported lockfile version '2000'. Try upgrading Deno or recreating the lockfile.".to_string() + "Unsupported lockfile version '2000'. Try upgrading Deno or recreating the lockfile.".to_string() ); } diff --git a/tests/helpers/mod.rs b/tests/helpers/mod.rs index 81c5df9..f2decc4 100644 --- a/tests/helpers/mod.rs +++ b/tests/helpers/mod.rs @@ -26,6 +26,9 @@ impl ConfigChangeSpec { let files = if only_files.is_empty() { files } else { + if std::env::var("CI").is_ok() { + panic!("Cannot use _only files on CI"); + } only_files }; files diff --git a/tests/integration_test.rs b/tests/integration_test.rs index fc313b6..6baeff8 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -80,7 +80,7 @@ fn config_changes() { for mut spec in specs { eprintln!("Looking at {}...", spec.path.display()); let mut config_file = Lockfile::with_lockfile_content( - spec.path.with_extension(".lock"), + spec.path.with_extension("lock"), &spec.original_text.text, false, ) @@ -94,6 +94,8 @@ fn config_changes() { .unwrap() .into_workspace_config(); config_file.set_workspace_config(SetWorkspaceConfigOptions { + no_config: false, + no_npm: false, config: config.clone(), nv_to_jsr_url, }); @@ -107,6 +109,8 @@ fn config_changes() { // now try resetting it and the flag should remain the same config_file.has_content_changed = false; config_file.set_workspace_config(SetWorkspaceConfigOptions { + no_config: false, + no_npm: false, config: config.clone(), nv_to_jsr_url, }); @@ -141,6 +145,8 @@ fn adding_workspace_does_not_cause_content_changes() { assert!(!lockfile.has_content_changed); lockfile.set_workspace_config(SetWorkspaceConfigOptions { + no_config: false, + no_npm: false, config: WorkspaceConfig { root: WorkspaceMemberConfig { dependencies: Some(BTreeSet::from( @@ -161,6 +167,8 @@ fn adding_workspace_does_not_cause_content_changes() { Lockfile::new(PathBuf::from("./deno.lock"), true).unwrap(); lockfile.has_content_changed = true; lockfile.set_workspace_config(SetWorkspaceConfigOptions { + no_config: false, + no_npm: false, config: WorkspaceConfig { root: WorkspaceMemberConfig { dependencies: Some(BTreeSet::from([ @@ -186,6 +194,8 @@ fn adding_workspace_does_not_cause_content_changes() { assert!(!lockfile.has_content_changed); lockfile.set_workspace_config(SetWorkspaceConfigOptions { + no_config: false, + no_npm: false, config: WorkspaceConfig { root: WorkspaceMemberConfig { dependencies: Some(BTreeSet::from( diff --git a/tests/specs/config_changes/NoConfigDoesNotRemove.txt b/tests/specs/config_changes/NoConfigDoesNotRemove.txt deleted file mode 100644 index c4dc2f7..0000000 --- a/tests/specs/config_changes/NoConfigDoesNotRemove.txt +++ /dev/null @@ -1,1026 +0,0 @@ -# original -{ - "version": "3", - "packages": { - "specifiers": { - "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", - "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", - "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", - "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", - "npm:ts-morph": "npm:ts-morph@21.0.1" - }, - "jsr": { - "@scope/package_a@0.0.1": { - "dependencies": [ - "jsr:@scope/package_b" - ] - }, - "@scope/package_b@0.0.1": { - "dependencies": [ - "jsr:@scope/package_c" - ] - }, - "@scope/package_c@0.0.1": { - "dependencies": [ - "jsr:@scope/package_a" - ] - } - }, - "npm": { - "@example/orphan": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": {} - }, - "@nodelib/fs.scandir@2.1.5": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": { - "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", - "run-parallel": "run-parallel@1.2.0" - } - }, - "@nodelib/fs.stat@2.0.5": { - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dependencies": {} - }, - "@nodelib/fs.walk@1.2.8": { - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dependencies": { - "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", - "fastq": "fastq@1.16.0" - } - }, - "@ts-morph/common@0.22.0": { - "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", - "dependencies": { - "fast-glob": "fast-glob@3.3.2", - "minimatch": "minimatch@9.0.3", - "mkdirp": "mkdirp@3.0.1", - "path-browserify": "path-browserify@1.0.1" - } - }, - "balanced-match@1.0.2": { - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dependencies": {} - }, - "brace-expansion@2.0.1": { - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "balanced-match@1.0.2" - } - }, - "braces@3.0.2": { - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "fill-range@7.0.1" - } - }, - "code-block-writer@12.0.0": { - "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", - "dependencies": {} - }, - "fast-glob@3.3.2": { - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dependencies": { - "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", - "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", - "glob-parent": "glob-parent@5.1.2", - "merge2": "merge2@1.4.1", - "micromatch": "micromatch@4.0.5" - } - }, - "fastq@1.16.0": { - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", - "dependencies": { - "reusify": "reusify@1.0.4" - } - }, - "fill-range@7.0.1": { - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "to-regex-range@5.0.1" - } - }, - "glob-parent@5.1.2": { - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "is-glob@4.0.3" - } - }, - "is-extglob@2.1.1": { - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dependencies": {} - }, - "is-glob@4.0.3": { - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "is-extglob@2.1.1" - } - }, - "is-number@7.0.0": { - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dependencies": {} - }, - "merge2@1.4.1": { - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dependencies": {} - }, - "micromatch@4.0.5": { - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dependencies": { - "braces": "braces@3.0.2", - "picomatch": "picomatch@2.3.1" - } - }, - "minimatch@9.0.3": { - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dependencies": { - "brace-expansion": "brace-expansion@2.0.1" - } - }, - "mkdirp@3.0.1": { - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "dependencies": {} - }, - "path-browserify@1.0.1": { - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dependencies": {} - }, - "picomatch@2.3.1": { - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dependencies": {} - }, - "queue-microtask@1.2.3": { - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dependencies": {} - }, - "reusify@1.0.4": { - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dependencies": {} - }, - "run-parallel@1.2.0": { - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dependencies": { - "queue-microtask": "queue-microtask@1.2.3" - } - }, - "to-regex-range@5.0.1": { - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "is-number@7.0.0" - } - }, - "ts-morph@21.0.1": { - "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", - "dependencies": { - "@ts-morph/common": "@ts-morph/common@0.22.0", - "code-block-writer": "code-block-writer@12.0.0" - } - } - } - }, - "remote": { - "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", - "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", - "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" - }, - "workspace": { - "dependencies": [ - "jsr:@scope/package_a" - ], - "packageJson": { - "dependencies": [ - "npm:ts-morph" - ] - } - } -} - -# no config (no change) -{ -} - -# won't have any changes because someone might just be running a command with --no-config -{ - "version": "3", - "packages": { - "specifiers": { - "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", - "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", - "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", - "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", - "npm:ts-morph": "npm:ts-morph@21.0.1" - }, - "jsr": { - "@scope/package_a@0.0.1": { - "dependencies": [ - "jsr:@scope/package_b" - ] - }, - "@scope/package_b@0.0.1": { - "dependencies": [ - "jsr:@scope/package_c" - ] - }, - "@scope/package_c@0.0.1": { - "dependencies": [ - "jsr:@scope/package_a" - ] - } - }, - "npm": { - "@example/orphan": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": {} - }, - "@nodelib/fs.scandir@2.1.5": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": { - "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", - "run-parallel": "run-parallel@1.2.0" - } - }, - "@nodelib/fs.stat@2.0.5": { - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dependencies": {} - }, - "@nodelib/fs.walk@1.2.8": { - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dependencies": { - "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", - "fastq": "fastq@1.16.0" - } - }, - "@ts-morph/common@0.22.0": { - "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", - "dependencies": { - "fast-glob": "fast-glob@3.3.2", - "minimatch": "minimatch@9.0.3", - "mkdirp": "mkdirp@3.0.1", - "path-browserify": "path-browserify@1.0.1" - } - }, - "balanced-match@1.0.2": { - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dependencies": {} - }, - "brace-expansion@2.0.1": { - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "balanced-match@1.0.2" - } - }, - "braces@3.0.2": { - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "fill-range@7.0.1" - } - }, - "code-block-writer@12.0.0": { - "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", - "dependencies": {} - }, - "fast-glob@3.3.2": { - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dependencies": { - "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", - "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", - "glob-parent": "glob-parent@5.1.2", - "merge2": "merge2@1.4.1", - "micromatch": "micromatch@4.0.5" - } - }, - "fastq@1.16.0": { - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", - "dependencies": { - "reusify": "reusify@1.0.4" - } - }, - "fill-range@7.0.1": { - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "to-regex-range@5.0.1" - } - }, - "glob-parent@5.1.2": { - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "is-glob@4.0.3" - } - }, - "is-extglob@2.1.1": { - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dependencies": {} - }, - "is-glob@4.0.3": { - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "is-extglob@2.1.1" - } - }, - "is-number@7.0.0": { - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dependencies": {} - }, - "merge2@1.4.1": { - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dependencies": {} - }, - "micromatch@4.0.5": { - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dependencies": { - "braces": "braces@3.0.2", - "picomatch": "picomatch@2.3.1" - } - }, - "minimatch@9.0.3": { - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dependencies": { - "brace-expansion": "brace-expansion@2.0.1" - } - }, - "mkdirp@3.0.1": { - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "dependencies": {} - }, - "path-browserify@1.0.1": { - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dependencies": {} - }, - "picomatch@2.3.1": { - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dependencies": {} - }, - "queue-microtask@1.2.3": { - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dependencies": {} - }, - "reusify@1.0.4": { - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dependencies": {} - }, - "run-parallel@1.2.0": { - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dependencies": { - "queue-microtask": "queue-microtask@1.2.3" - } - }, - "to-regex-range@5.0.1": { - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "is-number@7.0.0" - } - }, - "ts-morph@21.0.1": { - "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", - "dependencies": { - "@ts-morph/common": "@ts-morph/common@0.22.0", - "code-block-writer": "code-block-writer@12.0.0" - } - } - } - }, - "remote": { - "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", - "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", - "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" - }, - "workspace": { - "dependencies": [ - "jsr:@scope/package_a" - ], - "packageJson": { - "dependencies": [ - "npm:ts-morph" - ] - } - } -} - -# no package.json (no change) -{ - "dependencies": [ - "jsr:@scope/package_a" - ] -} - -# won't have any change because someone may just be running a command without a package.json -{ - "version": "3", - "packages": { - "specifiers": { - "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", - "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", - "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", - "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", - "npm:ts-morph": "npm:ts-morph@21.0.1" - }, - "jsr": { - "@scope/package_a@0.0.1": { - "dependencies": [ - "jsr:@scope/package_b" - ] - }, - "@scope/package_b@0.0.1": { - "dependencies": [ - "jsr:@scope/package_c" - ] - }, - "@scope/package_c@0.0.1": { - "dependencies": [ - "jsr:@scope/package_a" - ] - } - }, - "npm": { - "@example/orphan": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": {} - }, - "@nodelib/fs.scandir@2.1.5": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": { - "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", - "run-parallel": "run-parallel@1.2.0" - } - }, - "@nodelib/fs.stat@2.0.5": { - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dependencies": {} - }, - "@nodelib/fs.walk@1.2.8": { - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dependencies": { - "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", - "fastq": "fastq@1.16.0" - } - }, - "@ts-morph/common@0.22.0": { - "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", - "dependencies": { - "fast-glob": "fast-glob@3.3.2", - "minimatch": "minimatch@9.0.3", - "mkdirp": "mkdirp@3.0.1", - "path-browserify": "path-browserify@1.0.1" - } - }, - "balanced-match@1.0.2": { - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dependencies": {} - }, - "brace-expansion@2.0.1": { - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "balanced-match@1.0.2" - } - }, - "braces@3.0.2": { - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "fill-range@7.0.1" - } - }, - "code-block-writer@12.0.0": { - "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", - "dependencies": {} - }, - "fast-glob@3.3.2": { - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dependencies": { - "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", - "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", - "glob-parent": "glob-parent@5.1.2", - "merge2": "merge2@1.4.1", - "micromatch": "micromatch@4.0.5" - } - }, - "fastq@1.16.0": { - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", - "dependencies": { - "reusify": "reusify@1.0.4" - } - }, - "fill-range@7.0.1": { - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "to-regex-range@5.0.1" - } - }, - "glob-parent@5.1.2": { - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "is-glob@4.0.3" - } - }, - "is-extglob@2.1.1": { - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dependencies": {} - }, - "is-glob@4.0.3": { - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "is-extglob@2.1.1" - } - }, - "is-number@7.0.0": { - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dependencies": {} - }, - "merge2@1.4.1": { - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dependencies": {} - }, - "micromatch@4.0.5": { - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dependencies": { - "braces": "braces@3.0.2", - "picomatch": "picomatch@2.3.1" - } - }, - "minimatch@9.0.3": { - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dependencies": { - "brace-expansion": "brace-expansion@2.0.1" - } - }, - "mkdirp@3.0.1": { - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "dependencies": {} - }, - "path-browserify@1.0.1": { - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dependencies": {} - }, - "picomatch@2.3.1": { - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dependencies": {} - }, - "queue-microtask@1.2.3": { - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dependencies": {} - }, - "reusify@1.0.4": { - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dependencies": {} - }, - "run-parallel@1.2.0": { - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dependencies": { - "queue-microtask": "queue-microtask@1.2.3" - } - }, - "to-regex-range@5.0.1": { - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "is-number@7.0.0" - } - }, - "ts-morph@21.0.1": { - "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", - "dependencies": { - "@ts-morph/common": "@ts-morph/common@0.22.0", - "code-block-writer": "code-block-writer@12.0.0" - } - } - } - }, - "remote": { - "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", - "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", - "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" - }, - "workspace": { - "dependencies": [ - "jsr:@scope/package_a" - ], - "packageJson": { - "dependencies": [ - "npm:ts-morph" - ] - } - } -} - -# no dependencies (no change) -{ - "packageJson": { - "dependencies": [ - "npm:ts-morph" - ] - } -} - -# won't have any change because someone may just be running a command without a deno.json, but with a package.json -{ - "version": "3", - "packages": { - "specifiers": { - "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", - "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", - "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", - "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", - "npm:ts-morph": "npm:ts-morph@21.0.1" - }, - "jsr": { - "@scope/package_a@0.0.1": { - "dependencies": [ - "jsr:@scope/package_b" - ] - }, - "@scope/package_b@0.0.1": { - "dependencies": [ - "jsr:@scope/package_c" - ] - }, - "@scope/package_c@0.0.1": { - "dependencies": [ - "jsr:@scope/package_a" - ] - } - }, - "npm": { - "@example/orphan": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": {} - }, - "@nodelib/fs.scandir@2.1.5": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": { - "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", - "run-parallel": "run-parallel@1.2.0" - } - }, - "@nodelib/fs.stat@2.0.5": { - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dependencies": {} - }, - "@nodelib/fs.walk@1.2.8": { - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dependencies": { - "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", - "fastq": "fastq@1.16.0" - } - }, - "@ts-morph/common@0.22.0": { - "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", - "dependencies": { - "fast-glob": "fast-glob@3.3.2", - "minimatch": "minimatch@9.0.3", - "mkdirp": "mkdirp@3.0.1", - "path-browserify": "path-browserify@1.0.1" - } - }, - "balanced-match@1.0.2": { - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dependencies": {} - }, - "brace-expansion@2.0.1": { - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "balanced-match@1.0.2" - } - }, - "braces@3.0.2": { - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "fill-range@7.0.1" - } - }, - "code-block-writer@12.0.0": { - "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", - "dependencies": {} - }, - "fast-glob@3.3.2": { - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dependencies": { - "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", - "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", - "glob-parent": "glob-parent@5.1.2", - "merge2": "merge2@1.4.1", - "micromatch": "micromatch@4.0.5" - } - }, - "fastq@1.16.0": { - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", - "dependencies": { - "reusify": "reusify@1.0.4" - } - }, - "fill-range@7.0.1": { - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "to-regex-range@5.0.1" - } - }, - "glob-parent@5.1.2": { - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "is-glob@4.0.3" - } - }, - "is-extglob@2.1.1": { - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dependencies": {} - }, - "is-glob@4.0.3": { - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "is-extglob@2.1.1" - } - }, - "is-number@7.0.0": { - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dependencies": {} - }, - "merge2@1.4.1": { - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dependencies": {} - }, - "micromatch@4.0.5": { - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dependencies": { - "braces": "braces@3.0.2", - "picomatch": "picomatch@2.3.1" - } - }, - "minimatch@9.0.3": { - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dependencies": { - "brace-expansion": "brace-expansion@2.0.1" - } - }, - "mkdirp@3.0.1": { - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "dependencies": {} - }, - "path-browserify@1.0.1": { - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dependencies": {} - }, - "picomatch@2.3.1": { - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dependencies": {} - }, - "queue-microtask@1.2.3": { - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dependencies": {} - }, - "reusify@1.0.4": { - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dependencies": {} - }, - "run-parallel@1.2.0": { - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dependencies": { - "queue-microtask": "queue-microtask@1.2.3" - } - }, - "to-regex-range@5.0.1": { - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "is-number@7.0.0" - } - }, - "ts-morph@21.0.1": { - "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", - "dependencies": { - "@ts-morph/common": "@ts-morph/common@0.22.0", - "code-block-writer": "code-block-writer@12.0.0" - } - } - } - }, - "remote": { - "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", - "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", - "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" - }, - "workspace": { - "dependencies": [ - "jsr:@scope/package_a" - ], - "packageJson": { - "dependencies": [ - "npm:ts-morph" - ] - } - } -} - -# now remove the deno.json import map contents -{ - "dependencies": [ - ], - "packageJson": { - "dependencies": [ - "npm:ts-morph" - ] - } -} - -# output -{ - "version": "3", - "packages": { - "specifiers": { - "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", - "npm:ts-morph": "npm:ts-morph@21.0.1" - }, - "npm": { - "@example/orphan": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": {} - }, - "@nodelib/fs.scandir@2.1.5": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": { - "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", - "run-parallel": "run-parallel@1.2.0" - } - }, - "@nodelib/fs.stat@2.0.5": { - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dependencies": {} - }, - "@nodelib/fs.walk@1.2.8": { - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dependencies": { - "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", - "fastq": "fastq@1.16.0" - } - }, - "@ts-morph/common@0.22.0": { - "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", - "dependencies": { - "fast-glob": "fast-glob@3.3.2", - "minimatch": "minimatch@9.0.3", - "mkdirp": "mkdirp@3.0.1", - "path-browserify": "path-browserify@1.0.1" - } - }, - "balanced-match@1.0.2": { - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dependencies": {} - }, - "brace-expansion@2.0.1": { - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "balanced-match@1.0.2" - } - }, - "braces@3.0.2": { - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "fill-range@7.0.1" - } - }, - "code-block-writer@12.0.0": { - "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", - "dependencies": {} - }, - "fast-glob@3.3.2": { - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dependencies": { - "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", - "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", - "glob-parent": "glob-parent@5.1.2", - "merge2": "merge2@1.4.1", - "micromatch": "micromatch@4.0.5" - } - }, - "fastq@1.16.0": { - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", - "dependencies": { - "reusify": "reusify@1.0.4" - } - }, - "fill-range@7.0.1": { - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "to-regex-range@5.0.1" - } - }, - "glob-parent@5.1.2": { - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "is-glob@4.0.3" - } - }, - "is-extglob@2.1.1": { - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dependencies": {} - }, - "is-glob@4.0.3": { - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "is-extglob@2.1.1" - } - }, - "is-number@7.0.0": { - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dependencies": {} - }, - "merge2@1.4.1": { - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dependencies": {} - }, - "micromatch@4.0.5": { - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dependencies": { - "braces": "braces@3.0.2", - "picomatch": "picomatch@2.3.1" - } - }, - "minimatch@9.0.3": { - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dependencies": { - "brace-expansion": "brace-expansion@2.0.1" - } - }, - "mkdirp@3.0.1": { - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "dependencies": {} - }, - "path-browserify@1.0.1": { - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dependencies": {} - }, - "picomatch@2.3.1": { - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dependencies": {} - }, - "queue-microtask@1.2.3": { - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dependencies": {} - }, - "reusify@1.0.4": { - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dependencies": {} - }, - "run-parallel@1.2.0": { - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dependencies": { - "queue-microtask": "queue-microtask@1.2.3" - } - }, - "to-regex-range@5.0.1": { - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "is-number@7.0.0" - } - }, - "ts-morph@21.0.1": { - "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", - "dependencies": { - "@ts-morph/common": "@ts-morph/common@0.22.0", - "code-block-writer": "code-block-writer@12.0.0" - } - } - } - }, - "remote": { - "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" - }, - "workspace": { - "dependencies": [], - "packageJson": { - "dependencies": [ - "npm:ts-morph" - ] - } - } -} - -# now remove the package.json deps -{ - "dependencies": [ - ], - "packageJson": { - "dependencies": [ - ] - } -} - -# output -{ - "version": "3", - "packages": { - "specifiers": { - "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1" - }, - "npm": { - "@example/orphan": { - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": {} - } - } - }, - "remote": { - "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" - }, - "workspace": { - "dependencies": [], - "packageJson": { - "dependencies": [] - } - } -} diff --git a/tests/specs/config_changes/NoConfigRemoves.txt b/tests/specs/config_changes/NoConfigRemoves.txt new file mode 100644 index 0000000..4d149cb --- /dev/null +++ b/tests/specs/config_changes/NoConfigRemoves.txt @@ -0,0 +1,219 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} + +# no config +{ +} + +# will remove the contents +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1" + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + } + } + }, + "remote": { + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + } +} diff --git a/tests/specs/config_changes/PeerDep01_only.txt b/tests/specs/config_changes/PeerDep01.txt similarity index 100% rename from tests/specs/config_changes/PeerDep01_only.txt rename to tests/specs/config_changes/PeerDep01.txt diff --git a/tests/specs/config_changes/RemovingWorkspaceDep.txt b/tests/specs/config_changes/RemovingWorkspaceDep.txt index 064dd2b..2e99d58 100644 --- a/tests/specs/config_changes/RemovingWorkspaceDep.txt +++ b/tests/specs/config_changes/RemovingWorkspaceDep.txt @@ -359,7 +359,7 @@ }, "workspace": { "dependencies": [ - "jsr:@dsherret/dax", + "jsr:@dsherret/dax" ], "members": { "package_a": { @@ -646,6 +646,11 @@ "workspace": { "dependencies": [ "jsr:@dsherret/dax" - ] + ], + "members": { + "package_a": { + "dependencies": [] + } + } } } diff --git a/tests/specs/config_changes/RemovingWorkspaceMember.txt b/tests/specs/config_changes/RemovingWorkspaceMember.txt index a5b0d82..3011d5d 100644 --- a/tests/specs/config_changes/RemovingWorkspaceMember.txt +++ b/tests/specs/config_changes/RemovingWorkspaceMember.txt @@ -359,7 +359,7 @@ }, "workspace": { "dependencies": [ - "jsr:@dsherret/dax", + "jsr:@dsherret/dax" ], "members": { "package_a": { From 3edd70bd87b4f571ae86bc42b1012530adfbe0f2 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 21 Jan 2024 11:13:02 -0500 Subject: [PATCH 33/38] Better functionality around --no-npm and --no-config --- tests/integration_test.rs | 10 +- .../config_changes/NoConfigMaintains.txt | 397 ++++++++++++++++ .../NoConfigWorkspaceMaintains.txt | 406 ++++++++++++++++ .../config_changes/NoNpmMaintainsNpm.txt | 373 +++++++++++++++ .../NoNpmWorkspaceMaintainsNpm.txt | 436 ++++++++++++++++++ ...igRemoves.txt => RemovedConfigRemoves.txt} | 0 .../config_changes/RemovedDenoJsonRemoves.txt | 378 +++++++++++++++ .../RemovedPackageJsonRemoves.txt | 249 ++++++++++ 8 files changed, 2245 insertions(+), 4 deletions(-) create mode 100644 tests/specs/config_changes/NoConfigMaintains.txt create mode 100644 tests/specs/config_changes/NoConfigWorkspaceMaintains.txt create mode 100644 tests/specs/config_changes/NoNpmMaintainsNpm.txt create mode 100644 tests/specs/config_changes/NoNpmWorkspaceMaintainsNpm.txt rename tests/specs/config_changes/{NoConfigRemoves.txt => RemovedConfigRemoves.txt} (100%) create mode 100644 tests/specs/config_changes/RemovedDenoJsonRemoves.txt create mode 100644 tests/specs/config_changes/RemovedPackageJsonRemoves.txt diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 6baeff8..a9cdfcd 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -93,9 +93,11 @@ fn config_changes() { ) .unwrap() .into_workspace_config(); + let no_npm = change_and_output.change.title.contains("--no-npm"); + let no_config = change_and_output.change.title.contains("--no-config"); config_file.set_workspace_config(SetWorkspaceConfigOptions { - no_config: false, - no_npm: false, + no_config, + no_npm, config: config.clone(), nv_to_jsr_url, }); @@ -109,8 +111,8 @@ fn config_changes() { // now try resetting it and the flag should remain the same config_file.has_content_changed = false; config_file.set_workspace_config(SetWorkspaceConfigOptions { - no_config: false, - no_npm: false, + no_config, + no_npm, config: config.clone(), nv_to_jsr_url, }); diff --git a/tests/specs/config_changes/NoConfigMaintains.txt b/tests/specs/config_changes/NoConfigMaintains.txt new file mode 100644 index 0000000..f115411 --- /dev/null +++ b/tests/specs/config_changes/NoConfigMaintains.txt @@ -0,0 +1,397 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} + +# --no-config (no change) +{ +} + +# will maintain the contents because --no-config was specified +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} diff --git a/tests/specs/config_changes/NoConfigWorkspaceMaintains.txt b/tests/specs/config_changes/NoConfigWorkspaceMaintains.txt new file mode 100644 index 0000000..bc25628 --- /dev/null +++ b/tests/specs/config_changes/NoConfigWorkspaceMaintains.txt @@ -0,0 +1,406 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "members": { + "package_a": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } + } + } +} + +# --no-config (no change) +{ +} + +# will maintain the contents because --no-config was specified +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": null, + "members": { + "package_a": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } + } + } +} diff --git a/tests/specs/config_changes/NoNpmMaintainsNpm.txt b/tests/specs/config_changes/NoNpmMaintainsNpm.txt new file mode 100644 index 0000000..7455471 --- /dev/null +++ b/tests/specs/config_changes/NoNpmMaintainsNpm.txt @@ -0,0 +1,373 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} + +# --no-npm +{ +} + +# will maintain npm because --no-npm was specified +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": null, + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} diff --git a/tests/specs/config_changes/NoNpmWorkspaceMaintainsNpm.txt b/tests/specs/config_changes/NoNpmWorkspaceMaintainsNpm.txt new file mode 100644 index 0000000..a8e7a6a --- /dev/null +++ b/tests/specs/config_changes/NoNpmWorkspaceMaintainsNpm.txt @@ -0,0 +1,436 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "members": { + "package_a": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } + } + } +} + +# --no-npm (no change) +{ + "members": { + "package_a": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + } +} + +# will maintain +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": null, + "members": { + "package_a": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } + } + } +} + +# --no-npm +{ +} + +# now will remove everything because the workspace members were removed +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1" + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + } + } + }, + "remote": { + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + } +} diff --git a/tests/specs/config_changes/NoConfigRemoves.txt b/tests/specs/config_changes/RemovedConfigRemoves.txt similarity index 100% rename from tests/specs/config_changes/NoConfigRemoves.txt rename to tests/specs/config_changes/RemovedConfigRemoves.txt diff --git a/tests/specs/config_changes/RemovedDenoJsonRemoves.txt b/tests/specs/config_changes/RemovedDenoJsonRemoves.txt new file mode 100644 index 0000000..ba6925f --- /dev/null +++ b/tests/specs/config_changes/RemovedDenoJsonRemoves.txt @@ -0,0 +1,378 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} + +# no deno.json +{ + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } +} + +# will remove the package.json deps +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": null, + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} diff --git a/tests/specs/config_changes/RemovedPackageJsonRemoves.txt b/tests/specs/config_changes/RemovedPackageJsonRemoves.txt new file mode 100644 index 0000000..f5a0f31 --- /dev/null +++ b/tests/specs/config_changes/RemovedPackageJsonRemoves.txt @@ -0,0 +1,249 @@ +# original +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1", + "npm:ts-morph": "npm:ts-morph@21.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + }, + "@nodelib/fs.scandir@2.1.5": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "run-parallel": "run-parallel@1.2.0" + } + }, + "@nodelib/fs.stat@2.0.5": { + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dependencies": {} + }, + "@nodelib/fs.walk@1.2.8": { + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "@nodelib/fs.scandir@2.1.5", + "fastq": "fastq@1.16.0" + } + }, + "@ts-morph/common@0.22.0": { + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", + "dependencies": { + "fast-glob": "fast-glob@3.3.2", + "minimatch": "minimatch@9.0.3", + "mkdirp": "mkdirp@3.0.1", + "path-browserify": "path-browserify@1.0.1" + } + }, + "balanced-match@1.0.2": { + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dependencies": {} + }, + "brace-expansion@2.0.1": { + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "balanced-match@1.0.2" + } + }, + "braces@3.0.2": { + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "fill-range@7.0.1" + } + }, + "code-block-writer@12.0.0": { + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", + "dependencies": {} + }, + "fast-glob@3.3.2": { + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "@nodelib/fs.stat@2.0.5", + "@nodelib/fs.walk": "@nodelib/fs.walk@1.2.8", + "glob-parent": "glob-parent@5.1.2", + "merge2": "merge2@1.4.1", + "micromatch": "micromatch@4.0.5" + } + }, + "fastq@1.16.0": { + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dependencies": { + "reusify": "reusify@1.0.4" + } + }, + "fill-range@7.0.1": { + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "to-regex-range@5.0.1" + } + }, + "glob-parent@5.1.2": { + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "is-glob@4.0.3" + } + }, + "is-extglob@2.1.1": { + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dependencies": {} + }, + "is-glob@4.0.3": { + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "is-extglob@2.1.1" + } + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dependencies": {} + }, + "merge2@1.4.1": { + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dependencies": {} + }, + "micromatch@4.0.5": { + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "braces@3.0.2", + "picomatch": "picomatch@2.3.1" + } + }, + "minimatch@9.0.3": { + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "brace-expansion@2.0.1" + } + }, + "mkdirp@3.0.1": { + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dependencies": {} + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dependencies": {} + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dependencies": {} + }, + "queue-microtask@1.2.3": { + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dependencies": {} + }, + "reusify@1.0.4": { + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dependencies": {} + }, + "run-parallel@1.2.0": { + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dependencies": { + "queue-microtask": "queue-microtask@1.2.3" + } + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "is-number@7.0.0" + } + }, + "ts-morph@21.0.1": { + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", + "dependencies": { + "@ts-morph/common": "@ts-morph/common@0.22.0", + "code-block-writer": "code-block-writer@12.0.0" + } + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": [ + "jsr:@scope/package_a" + ], + "packageJson": { + "dependencies": [ + "npm:ts-morph" + ] + } + } +} + +# no package.json +{ + "dependencies": [ + "jsr:@scope/package_a" + ] +} + +# will remove the package.json deps +{ + "version": "3", + "packages": { + "specifiers": { + "jsr:@scope/package_a": "jsr:@scope/package_a@0.0.1", + "jsr:@scope/package_b": "jsr:@scope/package_b@0.0.1", + "jsr:@scope/package_c": "jsr:@scope/package_c@0.0.1", + "jsr:@scope/package_orphan": "jsr:@scope/package_orphan@0.0.1" + }, + "jsr": { + "@scope/package_a@0.0.1": { + "dependencies": [ + "jsr:@scope/package_b" + ] + }, + "@scope/package_b@0.0.1": { + "dependencies": [ + "jsr:@scope/package_c" + ] + }, + "@scope/package_c@0.0.1": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } + }, + "npm": { + "@example/orphan": { + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": {} + } + } + }, + "remote": { + "https://jsr.io/@scope/package_a/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045", + "https://jsr.io/@scope/package_b/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046", + "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" + }, + "workspace": { + "dependencies": [ + "jsr:@scope/package_a" + ] + } +} From ba57e9b855ced0706b27913592c4a0c6ad2dad29 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 21 Jan 2024 11:23:55 -0500 Subject: [PATCH 34/38] Add better documentation. --- src/lib.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index bbf4388..1d651f6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,9 +22,17 @@ use crate::graphs::LockfilePackageGraph; pub struct SetWorkspaceConfigOptions Option> { pub config: WorkspaceConfig, - /// If the user is running with --no-config + /// Maintains deno.json dependencies and workspace config + /// regardless of the `config` options provided. + /// + /// Ex. the CLI sets this to `true` when someone runs a + /// one-off script with `--no-config`. pub no_config: bool, - /// If the user is running with --no-npm, we don't want to clear out the package.json + /// Maintains package.json dependencies regardless of the + /// `config` options provided. + /// + /// Ex. the CLI sets this to `true` when someone runs a + /// one-off script with `--no-npm`. pub no_npm: bool, /// Gives a name and version from JSR (ex. `@scope/package@1.0.0`) /// and expects a URL to the JSR package. This will then be used to From 360d1b581193b75dce239c995d0592c34c675c64 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 21 Jan 2024 13:49:09 -0500 Subject: [PATCH 35/38] Revert message back to expected in CLI --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1d651f6..aea23f2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -96,8 +96,8 @@ Actual: {actual} Expected: {expected} This could be caused by: -* the lock file may be corrupt -* the source itself may be corrupt + * the lock file may be corrupt + * the source itself may be corrupt Use \"--lock-write\" flag to regenerate the lockfile at \"{filename}\".", )] From b68069df435945ccb0283f6a23e225be8fe43354 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 21 Jan 2024 14:01:33 -0500 Subject: [PATCH 36/38] Cause less output in lockfile. --- src/lib.rs | 107 +++++++----------- tests/integration_test.rs | 31 ++--- .../specs/config_changes/CircularJsrDep01.txt | 5 +- .../specs/config_changes/CircularJsrDep02.txt | 5 +- .../specs/config_changes/CircularJsrDep03.txt | 5 +- .../NoConfigWorkspaceMaintains.txt | 1 - .../config_changes/NoNpmMaintainsNpm.txt | 1 - .../NoNpmWorkspaceMaintainsNpm.txt | 1 - .../config_changes/RemovedDenoJsonRemoves.txt | 1 - .../RemovingNpmDepsDenoJson.txt | 5 +- .../config_changes/RemovingOakThenDax.txt | 3 - .../config_changes/RemovingWorkspaceDep.txt | 4 +- .../ShiftingDepsDifferentWorkspaceMember.txt | 2 - 13 files changed, 58 insertions(+), 113 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index aea23f2..8a2a9e1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -51,9 +51,9 @@ pub struct WorkspaceConfig { #[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct WorkspaceMemberConfig { #[serde(default)] - pub dependencies: Option>, + pub dependencies: BTreeSet, #[serde(default)] - pub package_json_deps: Option>, + pub package_json_deps: BTreeSet, } pub struct NpmPackageLockfileInfo { @@ -173,32 +173,38 @@ impl PackagesContent { #[serde(rename_all = "camelCase")] struct LockfilePackageJsonContent { #[serde(default)] + #[serde(skip_serializing_if = "BTreeSet::is_empty")] dependencies: BTreeSet, } +impl LockfilePackageJsonContent { + pub fn is_empty(&self) -> bool { + self.dependencies.is_empty() + } +} + #[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] #[serde(rename_all = "camelCase")] struct WorkspaceMemberConfigContent { + #[serde(skip_serializing_if = "BTreeSet::is_empty")] #[serde(default)] - dependencies: Option>, - #[serde(skip_serializing_if = "Option::is_none")] + dependencies: BTreeSet, + #[serde(skip_serializing_if = "LockfilePackageJsonContent::is_empty")] #[serde(default)] - package_json: Option, + package_json: LockfilePackageJsonContent, } impl WorkspaceMemberConfigContent { pub fn is_empty(&self) -> bool { - self.dependencies.is_none() && self.package_json.is_none() + self.dependencies.is_empty() && self.package_json.is_empty() } pub fn dep_reqs(&self) -> impl Iterator { self .package_json - .as_ref() - .map(|s| s.dependencies.iter()) - .into_iter() - .chain(self.dependencies.as_ref().map(|s| s.iter())) - .flatten() + .dependencies + .iter() + .chain(self.dependencies.iter()) } } @@ -362,93 +368,65 @@ impl Lockfile { current: &mut WorkspaceMemberConfigContent, new: WorkspaceMemberConfig, ) { - if let Some(new_deps) = new.dependencies { - match &mut current.dependencies { - Some(current_deps) => { - if new_deps != *current_deps { - let old_deps = std::mem::replace(current_deps, new_deps); + if new.dependencies != current.dependencies { + let old_deps = + std::mem::replace(&mut current.dependencies, new.dependencies); - removed_deps.extend(old_deps); + removed_deps.extend(old_deps); - *has_content_changed = true; - } - } - None => { - current.dependencies = Some(new_deps); - *has_content_changed = true; - } - } - } else if let Some(deps) = current.dependencies.take() { - removed_deps.extend(deps); *has_content_changed = true; } - if let Some(new_package_json_deps) = new.package_json_deps { - match &mut current.package_json { - Some(current_package_json) => { - let current_package_json_deps = - &mut current_package_json.dependencies; - if new_package_json_deps != *current_package_json_deps { - // update self.content.package_json - let old_package_json_deps = std::mem::replace( - current_package_json_deps, - new_package_json_deps, - ); - - removed_deps.extend(old_package_json_deps); - - *has_content_changed = true; - } - } - None => { - current.package_json = Some(LockfilePackageJsonContent { - dependencies: new_package_json_deps, - }); - *has_content_changed = true; - } - } - } else if let Some(current_package_json) = current.package_json.take() { - removed_deps.extend(current_package_json.dependencies); + if new.package_json_deps != current.package_json.dependencies { + // update self.content.package_json + let old_package_json_deps = std::mem::replace( + &mut current.package_json.dependencies, + new.package_json_deps, + ); + + removed_deps.extend(old_package_json_deps); + *has_content_changed = true; } } // if specified, don't modify the package.json dependencies if options.no_npm || options.no_config { - if options.config.root.package_json_deps.is_none() { + if options.config.root.package_json_deps.is_empty() { options.config.root.package_json_deps = self .content .workspace .root .package_json - .as_ref() - .map(|p| p.dependencies.clone()); + .dependencies + .clone(); } for (key, value) in options.config.members.iter_mut() { - if value.package_json_deps.is_none() { + if value.package_json_deps.is_empty() { value.package_json_deps = self .content .workspace .members .get(key) - .and_then(|m| m.package_json.as_ref()) - .map(|p| p.dependencies.clone()); + .map(|m| m.package_json.dependencies.clone()) + .unwrap_or_default(); } } } if options.no_config { - if options.config.root.dependencies.is_none() { + if options.config.root.dependencies.is_empty() { options.config.root.dependencies = self.content.workspace.root.dependencies.clone(); } for (key, value) in options.config.members.iter_mut() { - if value.dependencies.is_none() { + if value.dependencies.is_empty() { value.dependencies = self .content .workspace .members .get(key) - .and_then(|m| m.dependencies.clone()); + .map(|m| m.dependencies.clone()) + .unwrap_or_default(); } } for (key, value) in self.content.workspace.members.iter() { @@ -457,10 +435,7 @@ impl Lockfile { key.clone(), WorkspaceMemberConfig { dependencies: value.dependencies.clone(), - package_json_deps: value - .package_json - .as_ref() - .map(|p| p.dependencies.clone()), + package_json_deps: value.package_json.dependencies.clone(), }, ); } diff --git a/tests/integration_test.rs b/tests/integration_test.rs index a9cdfcd..fedc59d 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -30,17 +30,16 @@ fn config_changes() { dependencies: BTreeSet, } - #[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] + #[derive(Debug, Default, Clone, Deserialize, Hash)] #[serde(rename_all = "camelCase")] struct WorkspaceMemberConfigContent { #[serde(default)] - dependencies: Option>, - #[serde(skip_serializing_if = "Option::is_none")] + dependencies: BTreeSet, #[serde(default)] - package_json: Option, + package_json: LockfilePackageJsonContent, } - #[derive(Debug, Default, Clone, Serialize, Deserialize, Hash)] + #[derive(Debug, Default, Clone, Deserialize, Hash)] #[serde(rename_all = "camelCase")] struct WorkspaceConfigContent { #[serde(default, flatten)] @@ -54,7 +53,7 @@ fn config_changes() { WorkspaceConfig { root: WorkspaceMemberConfig { dependencies: self.root.dependencies, - package_json_deps: self.root.package_json.map(|p| p.dependencies), + package_json_deps: self.root.package_json.dependencies, }, members: self .members @@ -64,7 +63,7 @@ fn config_changes() { k, WorkspaceMemberConfig { dependencies: v.dependencies, - package_json_deps: v.package_json.map(|p| p.dependencies), + package_json_deps: v.package_json.dependencies, }, ) }) @@ -151,10 +150,8 @@ fn adding_workspace_does_not_cause_content_changes() { no_npm: false, config: WorkspaceConfig { root: WorkspaceMemberConfig { - dependencies: Some(BTreeSet::from( - ["jsr:@scope/package".to_string()], - )), - package_json_deps: None, + dependencies: BTreeSet::from(["jsr:@scope/package".to_string()]), + package_json_deps: Default::default(), }, members: BTreeMap::new(), }, @@ -173,10 +170,8 @@ fn adding_workspace_does_not_cause_content_changes() { no_npm: false, config: WorkspaceConfig { root: WorkspaceMemberConfig { - dependencies: Some(BTreeSet::from([ - "jsr:@scope/package2".to_string() - ])), - package_json_deps: None, + dependencies: BTreeSet::from(["jsr:@scope/package2".to_string()]), + package_json_deps: Default::default(), }, members: BTreeMap::new(), }, @@ -200,10 +195,8 @@ fn adding_workspace_does_not_cause_content_changes() { no_npm: false, config: WorkspaceConfig { root: WorkspaceMemberConfig { - dependencies: Some(BTreeSet::from( - ["jsr:@scope/package".to_string()], - )), - package_json_deps: None, + dependencies: BTreeSet::from(["jsr:@scope/package".to_string()]), + package_json_deps: Default::default(), }, members: BTreeMap::new(), }, diff --git a/tests/specs/config_changes/CircularJsrDep01.txt b/tests/specs/config_changes/CircularJsrDep01.txt index a4d876a..94d495d 100644 --- a/tests/specs/config_changes/CircularJsrDep01.txt +++ b/tests/specs/config_changes/CircularJsrDep01.txt @@ -39,8 +39,5 @@ # output { "version": "3", - "remote": {}, - "workspace": { - "dependencies": [] - } + "remote": {} } diff --git a/tests/specs/config_changes/CircularJsrDep02.txt b/tests/specs/config_changes/CircularJsrDep02.txt index 9b6f5dd..9885c63 100644 --- a/tests/specs/config_changes/CircularJsrDep02.txt +++ b/tests/specs/config_changes/CircularJsrDep02.txt @@ -46,8 +46,5 @@ # output { "version": "3", - "remote": {}, - "workspace": { - "dependencies": [] - } + "remote": {} } diff --git a/tests/specs/config_changes/CircularJsrDep03.txt b/tests/specs/config_changes/CircularJsrDep03.txt index 0e721aa..89570a5 100644 --- a/tests/specs/config_changes/CircularJsrDep03.txt +++ b/tests/specs/config_changes/CircularJsrDep03.txt @@ -41,8 +41,5 @@ # output { "version": "3", - "remote": {}, - "workspace": { - "dependencies": [] - } + "remote": {} } diff --git a/tests/specs/config_changes/NoConfigWorkspaceMaintains.txt b/tests/specs/config_changes/NoConfigWorkspaceMaintains.txt index bc25628..e2ddd45 100644 --- a/tests/specs/config_changes/NoConfigWorkspaceMaintains.txt +++ b/tests/specs/config_changes/NoConfigWorkspaceMaintains.txt @@ -389,7 +389,6 @@ "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, "workspace": { - "dependencies": null, "members": { "package_a": { "dependencies": [ diff --git a/tests/specs/config_changes/NoNpmMaintainsNpm.txt b/tests/specs/config_changes/NoNpmMaintainsNpm.txt index 7455471..6452463 100644 --- a/tests/specs/config_changes/NoNpmMaintainsNpm.txt +++ b/tests/specs/config_changes/NoNpmMaintainsNpm.txt @@ -363,7 +363,6 @@ "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, "workspace": { - "dependencies": null, "packageJson": { "dependencies": [ "npm:ts-morph" diff --git a/tests/specs/config_changes/NoNpmWorkspaceMaintainsNpm.txt b/tests/specs/config_changes/NoNpmWorkspaceMaintainsNpm.txt index a8e7a6a..7a292b1 100644 --- a/tests/specs/config_changes/NoNpmWorkspaceMaintainsNpm.txt +++ b/tests/specs/config_changes/NoNpmWorkspaceMaintainsNpm.txt @@ -396,7 +396,6 @@ "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, "workspace": { - "dependencies": null, "members": { "package_a": { "dependencies": [ diff --git a/tests/specs/config_changes/RemovedDenoJsonRemoves.txt b/tests/specs/config_changes/RemovedDenoJsonRemoves.txt index ba6925f..fc2e9bf 100644 --- a/tests/specs/config_changes/RemovedDenoJsonRemoves.txt +++ b/tests/specs/config_changes/RemovedDenoJsonRemoves.txt @@ -368,7 +368,6 @@ "https://jsr.io/@scope/package_orphan/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada046" }, "workspace": { - "dependencies": null, "packageJson": { "dependencies": [ "npm:ts-morph" diff --git a/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt b/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt index 6492c1e..7be9f13 100644 --- a/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt +++ b/tests/specs/config_changes/RemovingNpmDepsDenoJson.txt @@ -170,8 +170,5 @@ # output { "version": "3", - "remote": {}, - "workspace": { - "dependencies": [] - } + "remote": {} } diff --git a/tests/specs/config_changes/RemovingOakThenDax.txt b/tests/specs/config_changes/RemovingOakThenDax.txt index bfa7fd7..495bd08 100644 --- a/tests/specs/config_changes/RemovingOakThenDax.txt +++ b/tests/specs/config_changes/RemovingOakThenDax.txt @@ -662,8 +662,5 @@ }, "remote": { "https://jsr.io/@zome_unreferenced/package/mod.ts": "111ba1b46147804eaf8fa233f78d4c04fedb7b36a0b44374c8cbbaa6bbfad639" - }, - "workspace": { - "dependencies": [] } } diff --git a/tests/specs/config_changes/RemovingWorkspaceDep.txt b/tests/specs/config_changes/RemovingWorkspaceDep.txt index 2e99d58..252ded8 100644 --- a/tests/specs/config_changes/RemovingWorkspaceDep.txt +++ b/tests/specs/config_changes/RemovingWorkspaceDep.txt @@ -648,9 +648,7 @@ "jsr:@dsherret/dax" ], "members": { - "package_a": { - "dependencies": [] - } + "package_a": {} } } } diff --git a/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt b/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt index 61d215d..0e642f6 100644 --- a/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt +++ b/tests/specs/config_changes/ShiftingDepsDifferentWorkspaceMember.txt @@ -56,7 +56,6 @@ "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" }, "workspace": { - "dependencies": [], "members": { "package_a": { "dependencies": [ @@ -99,7 +98,6 @@ "https://jsr.io/@dsherret/dax/0.0.1/mod.ts": "09154a97e18c4d6a1692e3b3c8a3b1ec2934f00b7c1caf7491d762d963ada045" }, "workspace": { - "dependencies": [], "members": { "package_b": { "dependencies": [ From 13fc231fc957ed86bec02f70bd1f787aa288d669 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 21 Jan 2024 16:57:00 -0500 Subject: [PATCH 37/38] Pre-allocate --- src/graphs.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/graphs.rs b/src/graphs.rs index 67ade0c..7be9f56 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -74,7 +74,9 @@ impl Option> content.specifiers.len(), ); // collect the specifiers to version mappings - let mut packages = HashMap::new(); + let mut packages = HashMap::with_capacity( + content.specifiers.len() + content.jsr.len() + content.npm.len(), + ); for (key, value) in content.specifiers { if let Some(value) = value.strip_prefix("npm:") { root_packages.insert( From f57512f250dacafdb816f17e891417a59a020469 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 21 Jan 2024 16:59:50 -0500 Subject: [PATCH 38/38] Pre-allocate --- src/graphs.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/graphs.rs b/src/graphs.rs index 7be9f56..e9d78af 100644 --- a/src/graphs.rs +++ b/src/graphs.rs @@ -74,9 +74,9 @@ impl Option> content.specifiers.len(), ); // collect the specifiers to version mappings - let mut packages = HashMap::with_capacity( - content.specifiers.len() + content.jsr.len() + content.npm.len(), - ); + let package_count = + content.specifiers.len() + content.jsr.len() + content.npm.len(); + let mut packages = HashMap::with_capacity(package_count); for (key, value) in content.specifiers { if let Some(value) = value.strip_prefix("npm:") { root_packages.insert( @@ -137,7 +137,8 @@ impl Option> // trace every root identifier through the graph finding all corresponding packages while let Some(root_id) = root_ids.pop() { - let mut pending = VecDeque::from([root_id.clone()]); + let mut pending = VecDeque::with_capacity(package_count); + pending.push_back(root_id.clone()); while let Some(id) = pending.pop_back() { if let Some(package) = packages.get_mut(&id) { match package {