# @types/git-raw-commits

> TypeScript definitions for git-raw-commits

Latest version **5.0.1** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/git-raw-commits
pnpm add @types/git-raw-commits
yarn add @types/git-raw-commits
bun add @types/git-raw-commits
```

## Health

**Score 70/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.0.1 |
| Published | 2025-10-24 |
| First published | 2020-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/git-raw-commits
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/git-raw-commits
- npm.io page: https://npm.io/package/@types/git-raw-commits

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 5.0.1 (latest) — 2025-10-24
- 5.0.0 (ts5.0) — 2025-02-04
- 2.0.4 (ts4.8) — 2023-11-07
- 2.0.1 (ts4.3) — 2021-07-08
- 2.0.0 (ts3.4) — 2020-01-13
- 2.0.3 — 2023-10-18
- 2.0.2 — 2023-09-20

## README

# Installation
> `npm install --save @types/git-raw-commits`

# Summary
This package contains type definitions for git-raw-commits (https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/git-raw-commits#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/git-raw-commits.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/git-raw-commits/index.d.ts)
````ts
/// <reference types="node" />

import Stream = require("stream");

/**
 * Please check the available options at http://git-scm.com/docs/git-log.
 *
 * @remarks
 * Single dash arguments are not supported because of https://github.com/sindresorhus/dargs/blob/master/index.js#L5.
 *
 * @remarks
 * For `<revision range>` we can also use `<from>..<to>` pattern, and this
 * module has the following extra options for shortcut of this pattern:
 *
 * * `from`
 * * `to`
 *
 * This module also have the following additions:
 *
 * * `format`
 * * `debug`
 * * `path`
 */
export interface GitOptions {
    /**
     * Options to pass to `git` `childProcess`. Current working directory to run git.
     *
     * @default
     * process.cwd()
     */
    cwd?: string;

    /**
     * A function to get debug information.
     *
     * @default
     * false
     */
    debug?: boolean | ((message: any) => void);

    /**
     * Ignore commits that match provided string or RegExp.
     */
    ignore?: string | RegExp;

    /**
     * Only commits that are modifying this path.
     */
    path?: string | string[];

    /**
     * Starting commit reference or hash.
     *
     * @default
     * ''
     */
    from?: string;

    /**
     * Ending commit reference or hash.
     *
     * @default
     * 'HEAD'
     */
    to?: string;

    /**
     * Format of the commit.
     *
     * @default
     * '%B'
     */
    format?: string;

    [options: string]: any;
}

/**
 * Get raw commits from git-log.
 */
export function getRawCommits(options?: GitOptions): AsyncGenerator<string, void, unknown>;

/**
 * Get raw commits stream from git-log.
 */
export function getRawCommitsStream(options?: GitOptions): Stream.Readable;

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Jason Kwok](https://github.com/JasonHK).

---
_Source: https://npm.io/package/@types/git-raw-commits · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
