Releases: teneplaysofficial/use-git
v1.0.1
What's Changed
- chore(deps): update teneplaysofficial/sheriff action to v5 by @renovate[bot] in #21
- fix: use runCmdSafe for diff detection and add node types by @teneplaysofficial in #22
Full Changelog: v1.0.0...v1.0.1
v1.0.0
Breaking Changes
Dropped Chaining (Fluent API Removed)
The fluent / chainable API has been removed.
Git methods no longer return the API instance. Each method now resolves independently, simplifying internal flow control, improving error handling, and making behavior more predictable.
Migration impact:
- Chained calls like
git.add().commit()are no longer supported - Calls must now be executed independently
Features
Branch Management
- Added a comprehensive branch management API supporting create, delete, copy, rename, and list operations across both local and remote repositories.
- Supports multiple output formats for branch listings.
- Added utility functions for:
- Branch existence checks
- Upstream tracking configuration
- Resetting branches
- Retrieving the current and default branch information
Tag Management
- Added full Git tag management support, including:
- Creating tags (both lightweight and annotated)
- Deleting tags
- Listing tags (including SemVer-only filtering)
- Checking tag existence
- Validating tag names
- Introduced a consolidated Tag API for simpler and more ergonomic usage.
Chores
-
Updated pre-commit linting configuration to handle unmatched files gracefully, preventing commits from failing when no files match configured patterns.
-
New Tag API
Introduced a comprehensive and ergonomic API for Git tag operations, including creation, deletion, listing, and validation. -
Enhanced
makeListUtility
Refactored the internalmakeListutility to accept optional prefixes and a replacement string, improving flexibility when parsing Git command output. -
Biome Configuration Update
Updated thelint-stagedBiome configuration to include the--no-errors-on-unmatchedflag, preventing errors when patterns do not match any files.
What's Changed
- feat: add branch API by @teneplaysofficial in #11
- chore(deps): update pnpm to v10.28.0 by @renovate[bot] in #12
- chore(deps): update dependency tsdown to ^0.19.0 by @renovate[bot] in #13
- chore(deps): update pnpm to v10.28.1 by @renovate[bot] in #15
- chore: pre-commit autoupdate by @pre-commit-ci[bot] in #14
- chore(deps): update dependency tsdown to ^0.20.0 by @renovate[bot] in #16
- ci: pre-commit autoupdate by @pre-commit-ci[bot] in #17
- chore(deps): update pnpm to v10.28.2 by @renovate[bot] in #19
- feat: add tag API by @teneplaysofficial in #18
New Contributors
- @pre-commit-ci[bot] made their first contribution in #14
Full Changelog: v0.3.0...v1.0.0
v0.3.0
New Features
Comprehensive Commit API
commitcommitAllcommitAmendcommitEmptycommitFixupcommitNoEditcommitReuseMessagecommitSignoffcommitWithAuthor
Comprehensive Restore API
restorerestoreAllrestoreAllFromHeadrestoreAllStagedrestoreBothrestoreFromrestoreFromHeadrestoreStagedrestoreWorktree
Refactor
- Migrated the internal Git command runner from
node:child_process.exectonode:child_process.spawn - Removed the
buildCmdandquoteArgutilities - Argument handling is now delegated directly to
spawn, removing manual string construction and reducing edge cases
What's Changed
- feat: add comprehensive commit API by @teneplaysofficial in #9
- feat: add comprehensive restore API by @teneplaysofficial in #10
Full Changelog: v0.2.0...v0.3.0
v0.2.0
Features
-
Added a comprehensive Git diff API supporting multiple comparison modes, including working tree, staged changes, commits, commit ranges, and file-based comparisons.
-
Introduced a new diff module at
src/lib/diff.tsthat provides a wide range of functions for comparing repository states. -
Implemented a core
difffunction with support for common Git diff flags such as--patch,--stat,--numstat,--name-only, and--name-status. -
Added specialized helper functions for common diff use cases:
diffWorkingTreediffStageddiffHeaddiffCommitsdiffRangediffFiles
-
Added diff statistics APIs including:
diffStatsdiffStatsStageddiffStatsCommits
-
Enabled tracking of file counts, additions, deletions, and binary file changes.
-
Added change detection and status utilities:
hasDiffhasStagedDiffhasOnlyWhitespaceChangeshasOnlyEOLChangeshasBinaryChanges
-
Added APIs for listing and counting changed or staged files:
diffChangedFilesgetChangedFilesgetStagedFileschangedFileCountstagedFileCount
-
Enhanced untracked file handling in
src/lib/status.tswith:hasUntrackedFilesgetUntrackedFiles
-
Added an internal utility
parseNumStat(src/lib/utils/parseNumStat.ts) to convertgit diff --numstatoutput into a structured format.
Chores
- Updated build configuration.
What's Changed
- chore(deps): update pnpm to v10.27.0 by @renovate[bot] in #7
- feat: add diff utilities and refactor status by @teneplaysofficial in #8
New Contributors
- @teneplaysofficial made their first contribution in #8
Full Changelog: v0.1.0...v0.2.0
v0.1.0
🚀 Features
- Add init, clone, and info APIs - by @teneplaysofficial (e96ce)
- Introduce add and status API's - by @teneplaysofficial (608a5)
🐞 Bug Fixes
- JSR return types, type checking, typedoc index recursion and CI lint - by @teneplaysofficial (d7922)