From b696eb7608d921ae0e14a4296e412c33340ceee8 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 22 Feb 2026 16:37:49 +0900 Subject: refactor: reorganize crates to match Composer subpackage structure Rename mozart-constraint to mozart-semver (mirrors composer/semver) and extract mozart-class-map-generator from mozart-autoload (mirrors composer/class-map-generator). No logic changes. Co-Authored-By: Claude Opus 4.6 --- crates/mozart-registry/Cargo.toml | 2 +- crates/mozart-registry/src/resolver.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/mozart-registry') diff --git a/crates/mozart-registry/Cargo.toml b/crates/mozart-registry/Cargo.toml index 8672708..d0159b6 100644 --- a/crates/mozart-registry/Cargo.toml +++ b/crates/mozart-registry/Cargo.toml @@ -4,9 +4,9 @@ version.workspace = true edition.workspace = true [dependencies] -mozart-constraint.workspace = true mozart-core.workspace = true mozart-metadata-minifier.workspace = true +mozart-semver.workspace = true anyhow.workspace = true filetime.workspace = true flate2.workspace = true diff --git a/crates/mozart-registry/src/resolver.rs b/crates/mozart-registry/src/resolver.rs index 61895eb..e240dcd 100644 --- a/crates/mozart-registry/src/resolver.rs +++ b/crates/mozart-registry/src/resolver.rs @@ -15,8 +15,8 @@ use pubgrub::{ use crate::cache::Cache; use crate::packagist; -use mozart_constraint::{Constraint, VersionConstraint}; use mozart_core::package::Stability; +use mozart_semver::{Constraint, VersionConstraint}; // ───────────────────────────────────────────────────────────────────────────── // Stability constants @@ -372,7 +372,7 @@ fn single_constraint_to_ranges(c: &Constraint) -> Result { } /// Convert a `constraint::Version` to a `ComposerVersion`. -fn version_to_composer(v: &mozart_constraint::Version) -> Result { +fn version_to_composer(v: &mozart_semver::Version) -> Result { // Dev branches cannot be represented as ComposerVersion if v.is_dev_branch { return Err(format!( -- cgit v1.3.1