pub struct PackageBumpInfo {
pub name: String,
pub path: String,
pub current_version: String,
pub next_version: String,
pub bump_type: VersionBump,
pub will_bump: bool,
pub reason: String,
}Expand description
Information about a single package’s version bump.
Contains current and next versions, bump type, and whether the package will actually be bumped based on the versioning strategy and changesets.
§Examples
use sublime_cli_tools::commands::bump::snapshot::PackageBumpInfo;
use sublime_pkg_tools::types::VersionBump;
let info = PackageBumpInfo {
name: "@org/core".to_string(),
path: "packages/core".to_string(),
current_version: "1.2.3".to_string(),
next_version: "1.3.0".to_string(),
bump_type: VersionBump::Minor,
will_bump: true,
reason: "direct change from changeset".to_string(),
};
// Example: Package with dependency update but not bumping (Independent mode)
let info2 = PackageBumpInfo {
name: "@org/utils".to_string(),
path: "packages/utils".to_string(),
current_version: "2.0.0".to_string(),
next_version: "2.0.0".to_string(),
bump_type: VersionBump::None,
will_bump: false,
reason: "dependency updated (not bumping in independent mode)".to_string(),
};Fields§
§name: StringPackage name (e.g., “@org/core”).
path: StringRelative path to package directory.
current_version: StringCurrent version (e.g., “1.2.3”).
next_version: StringNext version after bump (e.g., “1.3.0”).
If will_bump is false, this is the same as current_version.
bump_type: VersionBumpType of version bump.
None if the package won’t be bumped.
will_bump: boolWhether this package will actually be bumped.
- Independent strategy: true only if package is in a changeset
- Unified strategy: true for all packages if any changeset exists
reason: StringHuman-readable reason for bump or no-bump.
Examples:
- Independent strategy:
- “direct change from changeset” - Package is in a changeset and will bump
- “in changeset but version unchanged” - Package in changeset but no version change needed
- “dependency updated (not bumping in independent mode)” - Dependency changed but package not in changeset
- “not in any changeset” - Package not affected by any changeset
- Unified strategy:
- “unified bump (package in changeset)” - Package is in a changeset causing unified bump
- “unified bump (all packages bumped together)” - Package bumped due to unified strategy
Trait Implementations§
Source§impl Clone for PackageBumpInfo
impl Clone for PackageBumpInfo
Source§fn clone(&self) -> PackageBumpInfo
fn clone(&self) -> PackageBumpInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PackageBumpInfo
impl Debug for PackageBumpInfo
Auto Trait Implementations§
impl Freeze for PackageBumpInfo
impl RefUnwindSafe for PackageBumpInfo
impl Send for PackageBumpInfo
impl Sync for PackageBumpInfo
impl Unpin for PackageBumpInfo
impl UnwindSafe for PackageBumpInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more