flutter_version_bumper 1.7.0
flutter_version_bumper: ^1.7.0 copied to clipboard
A command-line tool to easily bump Flutter project versions using SemVer and build numbers.
Changelog #
1.7.0 - 2026-11-12 #
Added #
- Transactional Release & Rollback Engine:
- Introduced
TransactionManager,TransactionSnapshot, andRollbackStepto guarantee atomic releases across filesystem mutations and Git operations. - Automatically snapshots pre-bump state (
pubspec.yaml,CHANGELOG.md, Git HEAD) and performs automatic rollback on failure (--rollback-on-failure). - Added manual rollback support via
fvb rollback(orfvb --rollback) to cleanly revert the most recent local version bump. - Added
--no-rollbackoverride flag androllback_on_failureconfiguration key in.fvb.yaml.
- Introduced
- Cross-Platform Git Hooks & Hardening:
- Added pre-push Git hook support via
--install-hook pre-push. - Added automatic restoration of developer hooks (
.fvb-backup) when using--remove-hook. - Normalized hook script shebangs to Unix LF (
\n) to prevent/bin/sh^M: bad interpretererrors on Windows MSYS2. - Added automated PATH export for Homebrew (
/opt/homebrew/bin,/usr/local/bin) and pub cache in Git hook scripts, ensuring hooks execute reliably in macOS GUI Git clients (VS Code, Xcode, GitHub Desktop). - Added Git worktree and submodule support where
.gitis a file withgitdir: <path>.
- Added pre-push Git hook support via
- CLI Flags & Enhancements:
- Added
--changelog-pathCLI option for configuring customCHANGELOG.mdfile paths. - Added
--versionflag (with--jsonsupport) for programmatic version querying. - Added mutual exclusivity validation between
--keep-build(-k) and-n/--build-number.
- Added
Fixed #
- Commit-Safe Manual Rollback: Only resets Git HEAD if FVB created a release commit during that transaction and HEAD matches it, strictly preserving subsequent developer commits.
- Clean Git Index on Rollback: Uses mixed reset and explicit unstaging to eliminate staged
MMdiscrepancies after rolling back. - Non-Git Directory Resilience: Gracefully warns and skips Git operations without triggering fatal software error rollbacks when executed in non-git directories.
- Windows Git Pathspec Normalization: Normalized relative changelog paths to forward slashes (
/) for Git CLI compatibility on Windows. - Windows Home Directory Fallback: Added
HOMEDRIVE+HOMEPATHfallback inSkillManagerwhenUSERPROFILEis unset in headless Windows environments. - Leading Badges & Preamble Preservation in Changelog: Preserves leading badges and comments before
# Changelogand keeps Keep-a-Changelog preamble descriptions above release headers.
1.6.0 - 2026-10-21 #
Fixed #
- Git Hook Auto-Discovery:
- Fixed hardcoded
bin/fvb.dartpath in generated Git pre-commit hooks. Hooks now seamlessly detect the globalfvbbinary inPATH, local repository scripts, or globally activated packages viadart pub global run.
- Fixed hardcoded
- Windows CRLF Line Ending Support:
- Resolved an issue in
ChangelogUpdaterwhere CRLF (\r\n\r\n) line endings prevented correct detection of header boundaries, ensuring clean release note insertion across Windows and Unix platforms.
- Resolved an issue in
- POSIX Diagnostic Stream Routing:
- Redirected all error and warning messages to
stderrinstead ofstdout, preventing stream pollution and guaranteeing valid JSON parsing when piped (--json).
- Redirected all error and warning messages to
- Terminal Escape Sequence Guards:
- Added terminal capability detection (
stdout.hasTerminal,supportsAnsiEscapes) andNO_COLORenvironment variable checks before emitting ANSI escape sequences.
- Added terminal capability detection (
- Global Skill Directory Validation:
- Added guards to verify
HOMEandUSERPROFILEenvironment variables during global AI Agent Skill deployment.
- Added guards to verify
Changed & Improved #
- Non-Destructive Library Execution:
- Refactored
bumpVersionto return standard POSIX integer exit codes (ExitCode.success.code,ExitCode.usage.code, etc.) instead of callingexit()directly within library code. Allows safe in-memory programmatic execution and unit testing without process termination.
- Refactored
- Entrypoint Modernization:
- Streamlined
bin/fvb.dartby removing legacyChain.capturecustom Zones in favor of native Dart 3 async stack trace preservation and terse error trace output.
- Streamlined
- Modern Dart 3 Features:
- Implemented Dart 3 pattern matching list destructuring in
PubspecVersion.parseand concise switch expressions for segment bumping.
- Implemented Dart 3 pattern matching list destructuring in
- Type-Safe Option Parsing:
- Upgraded to
package:args2.5+ type-safe accessors (argResults.flag(...)andargResults.option(...)).
- Upgraded to
- Deep API Documentation (Effective Dart):
- Comprehensive documentation overhaul across all public classes, methods, and properties strictly following
dart-write-documentationguidelines with 100% resolution indart doc.
- Comprehensive documentation overhaul across all public classes, methods, and properties strictly following
Added #
- Unit and integration tests for Windows CRLF changelog updates and in-memory exit code returns (78 passing tests total).
1.5.0 - 2026-09-16 #
Added #
- Pre-Release Promotion (
--release/--promote):- Graduate any pre-release version (e.g.,
1.2.0-beta.1+2) directly to a stable production release (1.2.0+3). - Added option
0. Promote to Stable Releaseto interactive mode (fvb -i) when current version has a pre-release.
- Graduate any pre-release version (e.g.,
- Git Working Tree Safety Guard (
--allow-dirty):- Automatically verifies that the Git working tree has no uncommitted changes before performing commit/tag/push operations, preventing accidental commits.
- Added
--allow-dirtyCLI flag andallow-dirty/allow_dirtyconfiguration setting to bypass the check when intentional.
- Standard POSIX Exit Codes (
package:io):- Standardized exit codes across the CLI for seamless CI/CD integration:
0(ExitCode.success) on successful execution.64(ExitCode.usage) on CLI syntax errors, conflicting arguments, or invalid build numbers.65(ExitCode.data) on version string or SemVer formatting errors.74(ExitCode.ioError) on file system read/write errors.78(ExitCode.config) on.fvb.yamlconfiguration parsing errors.
- Standardized exit codes across the CLI for seamless CI/CD integration:
- Clean Asynchronous Stack Trace Handling (
package:stack_trace):- Strips noisy internal Dart runtime frames to output concise, readable
Chain.terseerror traces on uncaught failures.
- Strips noisy internal Dart runtime frames to output concise, readable
- Strict Static Analysis Configuration:
- Added
analysis_options.yamlenforcingpackage:lints/recommended.yamland strict mode (strict-casts,strict-inference,strict-raw-types).
- Added
- Modern AI Agent Skill:
- Modernized
SKILL.mdand embeddeddefaultSkillContentwith progressive disclosure triggers, comprehensive command recipes, POSIX exit codes, and machine-readable JSON schemas.
- Modernized
- Expanded Test Coverage:
- Added 30 new tests in
test/cli_exit_codes_and_enhancements_test.dartbringing total passing tests to 74.
- Added 30 new tests in
Improved #
- Configuration Parsing:
- Added support for kebab-case configuration keys in
.fvb.yaml(e.g.,allow-dirty,tag-prefix,keep-build,no-build).
- Added support for kebab-case configuration keys in
- Path Resolution:
- Improved canonical absolute path comparison to eliminate false-positive dirty tree errors on Windows and across relative paths.
1.4.1 - 2026-08-08 #
1.4.0 - 2026-08-08 #
- Added fvb --install-skill command to automatically deploy AI Agent SKILL.md into local or global agent directories
1.3.0 - 2026-08-08 #
Added #
- Project Configuration File Support (
.fvb.yaml/pubspec.yaml):- Save project-level defaults in
.fvb.yamlor underfvb:inpubspec.yamlto avoid repeating long CLI flags.
- Save project-level defaults in
- Automated
CHANGELOG.mdUpdater (--changelog/-c):- Automatically prepends new release sections to
CHANGELOG.mdupon version bumping (-c/--changelog-msg).
- Automatically prepends new release sections to
- Git Hooks Integration (
--install-hook/--remove-hook):- Easily install executable Git pre-commit or pre-push hooks (
fvb --install-hook pre-commit) to enforce versioning checks.
- Easily install executable Git pre-commit or pre-push hooks (
Refactored #
- Clean Modular Architecture (
lib/src/):- Refactored monolithic codebase into dedicated modules (
models/,cli/,config/,git/,changelog/,utils/) for enhanced maintainability and testability.
- Refactored monolithic codebase into dedicated modules (
All notable changes to this project will be documented in this file.
1.2.0 - 2026-05-21 #
Added #
- Automated Prerelease Bumping (
--pre/--prerelease <label>):- Automatically transitions stable versions to prereleases (e.g.
1.0.0->1.0.1-beta.1). - Increments prerelease suffix counters when bumping the same label (e.g.
1.0.1-beta.1->1.0.1-beta.2). - Gracefully transitions between different labels (e.g.
beta.2->rc.1). - Seamlessly promotes to stable version track when running a standard bump without
--pre.
- Automatically transitions stable versions to prereleases (e.g.
- Git Push Automation (
--git-push):- Push committed files and created tags directly to Git remote origin (
git push origin HEADandgit push origin <tagName>) in one CLI invocation. - Full dry-run (
-d) simulation reporting support.
- Push committed files and created tags directly to Git remote origin (
1.1.0 - 2026-05-21 #
Added #
- Full SemVer & Pre-release Support: Bumper can parse and process versions with pre-release identifiers and metadata (e.g.
1.0.0-beta.1+12). - Interactive Mode: Launch via
fvb -ito bump versions step-by-step through a friendly interactive terminal selector. - Customizable Build Numbers:
--keep-build(-k) to keep build number constant.-n/--build-numberto explicitly override the build number.--no-buildto completely remove the build number segment.
- Git Commit & Tagging Automation: Staging, committing (
-g/--commit-msg), and tagging (-t/--tag-prefix) of the bumped version. - Dry-run Mode (
-d): Safe simulation of filesystem and git actions. - Monorepo / Custom Path (
-p/--path): Support custom paths for targeting monorepos. - Quiet & JSON Outputs:
--jsonand--quiet(-q) flags optimized for automation and CI/CD pipelines. - Comprehensive Test Suite: Expanded the test file covering all new advanced CLI features.
1.0.1 - 2026-04-08 #
Added #
- Comprehensive test coverage for:
- Bumping versions without build numbers.
- Versions with unconventional spacing.
- Versions in complex
pubspec.yamlstructures. - Multiple sequential bumps.
- The
--helpflag functionality.
Fixed #
- Resolved a "Could not parse" error in
pubspec.yamlby refining the version regex and enabling multiline support for more reliable matching in varying file structures.
Improved #
- Increased
pubspec.yamlparsing robustness to handle unconventional spacing and missing build numbers, verified by extensive new test cases.
1.0.0 - 2026-04-08 #
Initial Release #
- Converted from PowerShell script to cross-platform Dart CLI tool.
- Supports
major,minor,patch, andbuildbumping. - Option to set explicit versions (
--set). - Safe regex-based file parsing for
pubspec.yaml. - Global installation support via
dart pub global activate.