Documentation
¶
Overview ¶
Package bump handles semantic version bumping in package.json, Cargo.toml, pyproject.toml, and plain text version files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileChange ¶
type FileChange struct {
Path string
Before []byte
After []byte
Mode os.FileMode
// contains filtered or unexported fields
}
FileChange is an exact file mutation produced by a bump plan. Path is relative to RepoPath so it can be passed directly to Git without consulting the worktree status.
type Plan ¶
type Plan struct {
RepoPath string
CurrentVersion string
NewVersion string
Changes []FileChange
}
Plan is a side-effect-free description of a version bump. Creating a Plan only reads files; Apply is the mutation boundary.
func CreatePlan ¶
CreatePlan inspects all supported manifests and returns the exact mutations required for a bump. When autoDetect is false, only extraFiles are planned.
func (*Plan) Apply ¶
Apply transactionally writes all planned changes. It verifies every source file before the first write and restores committed files if a later rename fails.
func (*Plan) ChangedFiles ¶
ChangedFiles returns the exact repository-relative files Apply will mutate.