New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@types/git-parse

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/git-parse

TypeScript definitions for git-parse

ts3.6
ts3.7
ts3.8
ts3.9
ts4.0
ts4.1
ts4.2
ts4.3
ts4.4
ts4.5
ts4.6
ts4.7
npmnpm
Version
1.0.1
Version published
Weekly downloads
25
78.57%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/git-parse

Summary

This package contains type definitions for git-parse (https://github.com/wayfair/git-parse#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/git-parse.

index.d.ts

// Type definitions for git-parse 1.0
// Project: https://github.com/wayfair/git-parse#readme
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * A utility which generates an array of javascript objects representing the current branch of a local git repository's commit history.
 * Returns a promise which resolves with a list of objects describing git commits on the current branch.
 */
export function gitToJs(repoPath: string, options?: GitToJsOptions): Promise<GitCommit[]>;

/**
 * Checks out a commit given its repo and hash.
 * @async
 */
export function checkoutCommit(pathToRepo: string, hash: string, options?: CheckoutCommmitOptions): Promise<void>;

/**
 * Pulls a repo given its path.
 * @async
 */
export function gitPull(pathToRepo: string): Promise<void>;

/**
 * Returns a git diff given a path to the repo, a commit,
 * an optional second commit, and an optional file.
 */
export function gitDiff(pathToRepo: string, commitHash1: string, commitHash2?: string, file?: string): Promise<string>;

// types

export interface FileModification {
    path: string;
    linesAdded?: number | undefined;
    linesDeleted?: number | undefined;
}

export interface FileRename {
    oldPath: string;
    newPath: string;
}

/**
 *  Object representing the current branch of a local git repository's commit history
 */
export interface GitCommit {
    hash: string;
    authorName: string;
    authorEmail: string;
    date: string;
    message: string;
    filesAdded: FileModification[];
    filesDeleted: FileModification[];
    filesModified: FileModification[];
    filesRenamed: FileRename[];
}

export interface GitToJsOptions {
    sinceCommit?: string | undefined;
}

export interface CheckoutCommmitOptions {
    force?: boolean | undefined;
}

Additional Details

  • Last updated: Thu, 08 Jul 2021 12:02:07 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Piotr Błażejewicz.

FAQs

Package last updated on 08 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts