Skip to content

v0.6.0

Choose a tag to compare

@gfargo gfargo released this 27 May 15:38
87e825e

What's new

5 new scenarios (32 total, up from 27):

  • partial-stage — 2 staged + 2 unstaged + 1 untracked
  • monorepo-multi-package — workspaces monorepo with mixed states
  • merge-no-conflict — completed --no-ff merge at HEAD
  • orphan-branchmain + gh-pages with no shared history
  • stash-with-untracked — single stash with both tracked + untracked

Lifecycle-completion atoms — closes asymmetric gaps:

  • unstageFiles (inverse of stageFiles)
  • continueCherryPick, abortRevert, continueRevert
  • startMerge({ 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 so list, describe, and create surface 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 sets process.exitCode and lets Node drain naturally.

Refactors

  • Shared resolveScenario(name, origin) helper for consistent error messages
  • emptyCommit/amendCommit moved to commits.ts (out of operations.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.