Skip to content

Releases: teneplaysofficial/use-git

v1.0.1

26 Feb 22:37

Choose a tag to compare

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

30 Jan 07:45

Choose a tag to compare

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 makeList Utility
    Refactored the internal makeList utility to accept optional prefixes and a replacement string, improving flexibility when parsing Git command output.

  • Biome Configuration Update
    Updated the lint-staged Biome configuration to include the --no-errors-on-unmatched flag, preventing errors when patterns do not match any files.

What's Changed

New Contributors

Full Changelog: v0.3.0...v1.0.0

v0.3.0

08 Jan 06:34

Choose a tag to compare

New Features

Comprehensive Commit API

  • commit
  • commitAll
  • commitAmend
  • commitEmpty
  • commitFixup
  • commitNoEdit
  • commitReuseMessage
  • commitSignoff
  • commitWithAuthor

Comprehensive Restore API

  • restore
  • restoreAll
  • restoreAllFromHead
  • restoreAllStaged
  • restoreBoth
  • restoreFrom
  • restoreFromHead
  • restoreStaged
  • restoreWorktree

Refactor

  • Migrated the internal Git command runner from node:child_process.exec to node:child_process.spawn
  • Removed the buildCmd and quoteArg utilities
  • Argument handling is now delegated directly to spawn, removing manual string construction and reducing edge cases

What's Changed

Full Changelog: v0.2.0...v0.3.0

v0.2.0

03 Jan 13:39

Choose a tag to compare

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.ts that provides a wide range of functions for comparing repository states.

  • Implemented a core diff function 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:

    • diffWorkingTree
    • diffStaged
    • diffHead
    • diffCommits
    • diffRange
    • diffFiles
  • Added diff statistics APIs including:

    • diffStats
    • diffStatsStaged
    • diffStatsCommits
  • Enabled tracking of file counts, additions, deletions, and binary file changes.

  • Added change detection and status utilities:

    • hasDiff
    • hasStagedDiff
    • hasOnlyWhitespaceChanges
    • hasOnlyEOLChanges
    • hasBinaryChanges
  • Added APIs for listing and counting changed or staged files:

    • diffChangedFiles
    • getChangedFiles
    • getStagedFiles
    • changedFileCount
    • stagedFileCount
  • Enhanced untracked file handling in src/lib/status.ts with:

    • hasUntrackedFiles
    • getUntrackedFiles
  • Added an internal utility parseNumStat (src/lib/utils/parseNumStat.ts) to convert git diff --numstat output into a structured format.

Chores

  • Updated build configuration.

What's Changed

New Contributors

Full Changelog: v0.1.0...v0.2.0

v0.1.0

03 Jan 09:00

Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub