@types/git-raw-commits
TypeScript icon, indicating that this package has built-in type declarations

5.0.0 • Public • Published

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.

/// <reference types="node" />

import * as Stream from "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: Tue, 04 Feb 2025 00:46:42 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Jason Kwok.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/git-raw-commits

Weekly Downloads

15,231

Version

5.0.0

License

MIT

Unpacked Size

6.21 kB

Total Files

5

Last publish

Collaborators

  • types