Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ ferrflow migrate --from semantic-release

It maps `tagFormat`, `branches`, and the common plugins (`changelog`, `exec`, `github`/`gitlab`) to their FerrFlow equivalents, and prints a summary of what mapped, what was ignored, and what needs manual review. Anything without a FerrFlow equivalent is surfaced, never guessed. JSON `.releaserc` is supported today; YAML `.releaserc` and JS `release.config.js` are reported as unsupported rather than mis-parsed.

`ferrflow migrate --from release-please` also maps `extra-files` (`generic` markers to a `txt` selector, `toml` on `Cargo.toml` and `json` on `$.version` to their formats), `bump-minor-pre-major` and `bump-patch-for-minor-pre-major` to `preMajor` (`breaking: minor`, `feat: patch`), and writes `autoMergeReleases: false` since release-please never merges its release PR. Lockfile updates are enabled when a versioned manifest has one. Entries it cannot express are listed under "Review manually". Only non-default keys are written.

### JSON Schema

Add `$schema` to get autocompletion and validation in VS Code, WebStorm, and any JSON-aware editor:
Expand Down Expand Up @@ -391,6 +393,21 @@ versioning = "calver" # override: date-based
| `sequential` | `N` | `42` | Simple incrementing build number |
| `zerover` | `0.MINOR.PATCH` | `0.15.2` | Permanently unstable, never hits 1.0 |

### Pre-1.0 bump rules

By default a `semver` project jumps to `1.0.0` on its first breaking change. Set `preMajor` to stay in 0.x: while the current major is `0`, a breaking change bumps what `breaking` says and a `feat` bumps what `feat` says (`minor` or `patch`). `fix` is unchanged.

```toml
[workspace]
versioning = "semver"

[workspace.preMajor]
breaking = "minor"
feat = "patch"
```

From `0.5.0`: `feat!` gives `0.6.0`, `feat` and `fix` give `0.5.1`. This matches release-please's `bump-minor-pre-major` plus `bump-patch-for-minor-pre-major`. From `1.0.0` on it has no effect, and `ferrflow release --force-version 1.0.0` leaves 0.x. Packages can override it with their own `preMajor`. Unset keeps the standard rules.

## Tag Template

By default, FerrFlow tags single-repo releases as `v1.2.3` and monorepo releases as `api@v1.2.3`. Customize with `tag_template` at the workspace or package level using `{name}` and `{version}` placeholders.
Expand Down
46 changes: 46 additions & 0 deletions docs/site/data/schema/ferrflow-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,52 @@
"zerover"
]
},
"preMajor": {
"type": "object",
"description": "Per-package override for workspace.preMajor. While the current major is 0 on a `semver` project, remaps the bump: `breaking` replaces what a breaking change bumps (normally major) and `feat` replaces what a `feat` bumps (normally minor). `{\"breaking\": \"minor\", \"feat\": \"patch\"}` matches release-please's bump-minor-pre-major and bump-patch-for-minor-pre-major. No effect from 1.0.0 on, leave 0.x with `ferrflow release --force-version 1.0.0`. Omit for the standard semver rules.",
"properties": {
"breaking": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a breaking change takes while the current major is 0."
},
"feat": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a `feat` commit takes while the current major is 0."
}
},
"additionalProperties": false
},
"pre_major": {
"type": "object",
"description": "Snake_case form of `preMajor`, both spellings are accepted. Per-package override for workspace.preMajor. While the current major is 0 on a `semver` project, remaps the bump: `breaking` replaces what a breaking change bumps (normally major) and `feat` replaces what a `feat` bumps (normally minor). `{\"breaking\": \"minor\", \"feat\": \"patch\"}` matches release-please's bump-minor-pre-major and bump-patch-for-minor-pre-major. No effect from 1.0.0 on, leave 0.x with `ferrflow release --force-version 1.0.0`. Omit for the standard semver rules.",
"properties": {
"breaking": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a breaking change takes while the current major is 0."
},
"feat": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a `feat` commit takes while the current major is 0."
}
},
"additionalProperties": false
},
"versionTemplate": {
"type": "string",
"description": "Version format built from named variables. Variables: year, short_year, month, padded_month, day, padded_day, week, padded_week, quarter, seq, major, minor, patch. Each must be separated by a literal so the previous version can be read back. The literals cannot carry whitespace, control characters, or the characters git reserves in a ref name (~ ^ : ? * [ backslash), because the version becomes a git tag. Overrides workspace default. Takes precedence over 'versioning'.",
Expand Down
92 changes: 92 additions & 0 deletions docs/site/data/schema/ferrflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,52 @@
],
"default": "semver"
},
"preMajor": {
"type": "object",
"description": "While the current major is 0 on a `semver` project, remaps the bump: `breaking` replaces what a breaking change bumps (normally major) and `feat` replaces what a `feat` bumps (normally minor). `{\"breaking\": \"minor\", \"feat\": \"patch\"}` matches release-please's bump-minor-pre-major and bump-patch-for-minor-pre-major. No effect from 1.0.0 on, leave 0.x with `ferrflow release --force-version 1.0.0`. Omit for the standard semver rules.",
"properties": {
"breaking": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a breaking change takes while the current major is 0."
},
"feat": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a `feat` commit takes while the current major is 0."
}
},
"additionalProperties": false
},
"pre_major": {
"type": "object",
"description": "Snake_case form of `preMajor`, both spellings are accepted. While the current major is 0 on a `semver` project, remaps the bump: `breaking` replaces what a breaking change bumps (normally major) and `feat` replaces what a `feat` bumps (normally minor). `{\"breaking\": \"minor\", \"feat\": \"patch\"}` matches release-please's bump-minor-pre-major and bump-patch-for-minor-pre-major. No effect from 1.0.0 on, leave 0.x with `ferrflow release --force-version 1.0.0`. Omit for the standard semver rules.",
"properties": {
"breaking": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a breaking change takes while the current major is 0."
},
"feat": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a `feat` commit takes while the current major is 0."
}
},
"additionalProperties": false
},
"versionTemplate": {
"type": "string",
"description": "Version format built from named variables. Variables: year, short_year, month, padded_month, day, padded_day, week, padded_week, quarter, seq, major, minor, patch. Each must be separated by a literal so the previous version can be read back. The literals cannot carry whitespace, control characters, or the characters git reserves in a ref name (~ ^ : ? * [ backslash), because the version becomes a git tag. Takes precedence over 'versioning'.",
Expand Down Expand Up @@ -630,6 +676,52 @@
"zerover"
]
},
"preMajor": {
"type": "object",
"description": "Per-package override for workspace.preMajor. While the current major is 0 on a `semver` project, remaps the bump: `breaking` replaces what a breaking change bumps (normally major) and `feat` replaces what a `feat` bumps (normally minor). `{\"breaking\": \"minor\", \"feat\": \"patch\"}` matches release-please's bump-minor-pre-major and bump-patch-for-minor-pre-major. No effect from 1.0.0 on, leave 0.x with `ferrflow release --force-version 1.0.0`. Omit for the standard semver rules.",
"properties": {
"breaking": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a breaking change takes while the current major is 0."
},
"feat": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a `feat` commit takes while the current major is 0."
}
},
"additionalProperties": false
},
"pre_major": {
"type": "object",
"description": "Snake_case form of `preMajor`, both spellings are accepted. Per-package override for workspace.preMajor. While the current major is 0 on a `semver` project, remaps the bump: `breaking` replaces what a breaking change bumps (normally major) and `feat` replaces what a `feat` bumps (normally minor). `{\"breaking\": \"minor\", \"feat\": \"patch\"}` matches release-please's bump-minor-pre-major and bump-patch-for-minor-pre-major. No effect from 1.0.0 on, leave 0.x with `ferrflow release --force-version 1.0.0`. Omit for the standard semver rules.",
"properties": {
"breaking": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a breaking change takes while the current major is 0."
},
"feat": {
"type": "string",
"enum": [
"minor",
"patch"
],
"description": "Bump a `feat` commit takes while the current major is 0."
}
},
"additionalProperties": false
},
"versionTemplate": {
"type": "string",
"description": "Version format built from named variables. Variables: year, short_year, month, padded_month, day, padded_day, week, padded_week, quarter, seq, major, minor, patch. Each must be separated by a literal so the previous version can be read back. The literals cannot carry whitespace, control characters, or the characters git reserves in a ref name (~ ^ : ? * [ backslash), because the version becomes a git tag. Overrides workspace default. Takes precedence over 'versioning'.",
Expand Down
Loading
Loading