monochange_config
monochange_config parses and validates the inputs that drive planning and release commands.
Reach for this crate when you need to load monochange.toml, resolve package references, or turn .changeset/*.md files into validated change signals for the planner.
Why use it?
- centralize config parsing and validation rules in one place
- resolve package references against discovered workspace packages
- keep CLI command definitions, version groups, and change files aligned with the planner's expectations
Best for
- validating configuration before handing it to planning code
- parsing and resolving change files in custom automation
- keeping package-reference rules consistent across tools
Public entry points
load_workspace_configuration(root)loads and validatesmonochange.tomlload_change_signals(root, changes_dir, packages)parses markdown change files into change signalsresolve_package_reference(reference, workspace_root, packages)maps package names, ids, and paths to discovered packagesapply_version_groups(packages, configuration)attaches configured version groups to discovered packages
Responsibilities
- load
monochange.toml - validate version groups and CLI commands
- resolve package references against discovered packages
- parse change-input files, evidence, release-note
type/detailsfields, changelog paths, changelog format overrides, source-provider config, affected-package policy config, and command release/manifest/policy steps
Example
use load_workspace_configuration;
use ChangelogFormat;
let root = temp_dir.join;
let _ = remove_dir_all;
create_dir_all.unwrap;
write
.unwrap;
write
.unwrap;
let configuration = load_workspace_configuration.unwrap;
let package = configuration.package_by_id.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
let _ = remove_dir_all;