v0.6.0
What's new
5 new scenarios (32 total, up from 27):
partial-stage— 2 staged + 2 unstaged + 1 untrackedmonorepo-multi-package— workspaces monorepo with mixed statesmerge-no-conflict— completed--no-ffmerge at HEADorphan-branch—main+gh-pageswith no shared historystash-with-untracked— single stash with both tracked + untracked
Lifecycle-completion atoms — closes asymmetric gaps:
unstageFiles(inverse ofstageFiles)continueCherryPick,abortRevert,continueRevertstartMerge({ squash: true })
Utility atoms: gitClean, writeGitignore, writeGitattributes, bulkCommits
TempGitRepo: new readFile(path) and exists(path) helpers
spinUpScenario options bag (non-breaking): autoCleanup, remote
CLI: --json output + --kind/--tag filters; describe now shows tags
Vitest framework adapter — new subpath export @gfargo/git-scenarios/vitest mirroring the Jest adapter surface
Tags on every scenario + new findRegisteredByTag() for filtering the mutable registry
ARCHITECTURE.md documenting the layered design
Bug fixes
- CLI now sees custom-registered scenarios. It was importing from the static
scenarios/index.ts(built-ins only). Now uses the mutable registry solist,describe, andcreatesurface custom scenarios. - CLI no longer truncates piped output.
process.exit()was cutting off stdout at the pipe buffer boundary (~8KB on Linux) when output was piped.main()now setsprocess.exitCodeand lets Node drain naturally.
Refactors
- Shared
resolveScenario(name, origin)helper for consistent error messages emptyCommit/amendCommitmoved tocommits.ts(out ofoperations.ts)- Registry storage switched to
Map<string, Scenario>for O(1) lookup
Testing
- 431 tests pass (up from 314)
- All 4 CI matrix slots green: ubuntu + windows × Node 22.22.2 + 24.15.0
- Coverage gates met across the board
See CHANGELOG.md for the full list.