Skip to main content

Crate monochange_core

Crate monochange_core 

Source
Expand description

§monochange_core

monochange_core is the shared vocabulary for the monochange workspace.

Reach for this crate when you are building ecosystem adapters, release planners, or custom automation and need one set of types for packages, dependency edges, version groups, change signals, and release plans.

§Why use it?

  • avoid redefining package and release domain models in each crate
  • share one error and result surface across discovery, planning, and command layers
  • pass normalized workspace data between adapters and planners without extra translation

§Best for

  • implementing new ecosystem adapters against the shared EcosystemAdapter contract
  • moving normalized package or release data between crates without custom conversion code
  • depending on the workspace domain model without pulling in discovery or planning behavior

§What it provides

  • normalized package and dependency records
  • version-group definitions and planned group outcomes
  • change signals and compatibility assessments
  • changelog formats, changelog targets, structured release-note types, release-manifest types, source-automation config types, and changeset-policy evaluation types
  • shared error and result types

§Example

use monochange_core::render_release_notes;
use monochange_core::ChangelogFormat;
use monochange_core::ReleaseNotesDocument;
use monochange_core::ReleaseNotesSection;

let notes = ReleaseNotesDocument {
    title: "1.2.3".to_string(),
    summary: vec!["Grouped release for `sdk`.".to_string()],
    sections: vec![ReleaseNotesSection {
        title: "Features".to_string(),
        entries: vec!["- add keep-a-changelog output".to_string()],
    }],
};

let rendered = render_release_notes(ChangelogFormat::KeepAChangelog, &notes);

assert!(rendered.contains("## 1.2.3"));
assert!(rendered.contains("### Features"));
assert!(rendered.contains("- add keep-a-changelog output"));

Modules§

git

Structs§

AdapterDiscovery
ChangeSignal
ChangelogTarget
ChangesetContext
ChangesetPolicyEvaluation
ChangesetRevision
ChangesetSettings
ChangesetVerificationSettings
CliCommandDefinition
CliInputDefinition
CommitMessage
CompatibilityAssessment
DependencyEdge
DiscoveryPathFilter
DiscoveryReport
EcosystemSettings
EffectiveReleaseIdentity
ExtraChangelogSection
GroupDefinition
HostedActorRef
HostedCommitRef
HostedIssueCommentOutcome
HostedIssueCommentPlan
HostedIssueRef
HostedReviewRequestRef
HostedSourceFeatures
HostingCapabilities
LockfileCommandDefinition
LockfileCommandExecution
PackageDefinition
PackageDependency
PackageRecord
PlannedVersionGroup
PreparedChangeset
PreparedChangesetTarget
ProviderBotSettings
ProviderChangesetBotSettings
ProviderMergeRequestSettings
ProviderReleaseSettings
ReleaseDecision
ReleaseManifest
ReleaseManifestChangelog
ReleaseManifestCompatibilityEvidence
ReleaseManifestPlan
ReleaseManifestPlanDecision
ReleaseManifestPlanGroup
ReleaseManifestTarget
ReleaseNotesDocument
ReleaseNotesSection
ReleaseNotesSettings
ReleasePlan
ReleaseRecord
ReleaseRecordDiscovery
ReleaseRecordProvider
ReleaseRecordTarget
RetargetPlan
RetargetProviderResult
RetargetResult
RetargetTagResult
SourceCapabilities
SourceChangeRequest
SourceChangeRequestOutcome
SourceConfiguration
SourceReleaseOutcome
SourceReleaseRequest
VersionGroup
VersionedFileDefinition
WorkspaceConfiguration
WorkspaceDefaults

Enums§

BumpSeverity
ChangelogDefinition
ChangelogFormat
ChangesetPolicyStatus
ChangesetTargetKind
CliInputKind
CliStepDefinition
Built-in execution units for [[cli.<command>.steps]].
CliStepInputValue
CommandVariable
DependencyKind
DependencySourceKind
Ecosystem
EcosystemType
GroupChangelogInclude
HostedActorSourceKind
HostedIssueCommentOperation
HostedIssueRelationshipKind
HostedReviewRequestKind
HostingProviderKind
MonochangeError
PackageType
ProviderReleaseNotesSource
PublishState
ReleaseOwnerKind
ReleaseRecordError
RetargetOperation
RetargetProviderOperation
ShellConfig
Shell configuration for Command steps.
SourceChangeRequestOperation
SourceProvider
SourceReleaseOperation
VersionFormat

Constants§

DEFAULT_CHANGELOG_VERSION_TITLE_NAMESPACED
Default changelog version title for namespaced versioning (markdown-linked when source configured).
DEFAULT_CHANGELOG_VERSION_TITLE_PRIMARY
Default changelog version title for primary versioning (markdown-linked when source configured).
DEFAULT_RELEASE_TITLE_NAMESPACED
Default release title template for namespaced versioning: my-pkg 1.2.3 (2026-04-06).
DEFAULT_RELEASE_TITLE_PRIMARY
Default release title template for primary versioning: 1.2.3 (2026-04-06).
RELEASE_RECORD_END_MARKER
Closing marker for a commit-embedded release record block.
RELEASE_RECORD_HEADING
Human-readable heading used for commit-embedded release records.
RELEASE_RECORD_KIND
Required ReleaseRecord.kind discriminator.
RELEASE_RECORD_SCHEMA_VERSION
Current supported ReleaseRecord schema version.
RELEASE_RECORD_START_MARKER
Opening marker for a commit-embedded release record block.

Traits§

EcosystemAdapter
HostedSourceAdapter

Functions§

default_cli_commands
Return the built-in CLI command definitions used when config omits them.
materialize_dependency_edges
Build dependency edges by matching declared dependency names to known packages.
normalize_path
Normalize a path to an absolute, canonicalized path when possible.
parse_release_record_block
Parse a ReleaseRecord from a full commit message body.
relative_to_root
Return path relative to root after normalizing both paths.
release_record_release_tag_names
Return tag names that correspond to outward hosted releases.
release_record_tag_names
Return all tag names owned by the release record, deduplicated and sorted.
render_release_notes
Render release notes in the selected changelog format.
render_release_record_block
Render a ReleaseRecord into the reserved commit-message block format.
strip_json_comments
Remove // and /* ... */ comments from JSON-like text.
update_json_manifest_text
Update JSON manifest text while preserving most existing formatting.

Type Aliases§

MonochangeResult
ReleaseRecordResult
Result type used by release-record parsing and rendering helpers.