@types/git-parse
Advanced tools
| { | ||
| "name": "@types/git-parse", | ||
| "version": "1.0.1", | ||
| "description": "TypeScript definitions for git-parse", | ||
| "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/git-parse", | ||
| "license": "MIT", | ||
| "contributors": [ | ||
| { | ||
| "name": "Piotr Błażejewicz", | ||
| "url": "https://github.com/peterblazejewicz", | ||
| "githubUsername": "peterblazejewicz" | ||
| } | ||
| ], | ||
| "version": "2.1.1", | ||
| "typings": null, | ||
| "description": "Stub TypeScript definitions entry for git-parse, which provides its own types definitions", | ||
| "main": "", | ||
| "types": "index.d.ts", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
| "directory": "types/git-parse" | ||
| }, | ||
| "scripts": {}, | ||
| "dependencies": {}, | ||
| "typesPublisherContentHash": "8d794d601315b6e2681f834890811c0a06dc4beb9a23838c171e1b404789e477", | ||
| "typeScriptVersion": "3.6" | ||
| "author": "", | ||
| "license": "MIT", | ||
| "dependencies": { | ||
| "git-parse": "*" | ||
| } | ||
| } |
+2
-83
@@ -1,84 +0,3 @@ | ||
| # Installation | ||
| > `npm install --save @types/git-parse` | ||
| This is a stub types definition for @types/git-parse (https://github.com/wayfair/git-parse#readme). | ||
| # 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/git-parse/index.d.ts) | ||
| ````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](https://github.com/peterblazejewicz). | ||
| git-parse provides its own type definitions, so you don't need @types/git-parse installed! |
| // 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; | ||
| } |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1652
-73.86%1
Infinity%3
-25%0
-100%2
100%2
100%3
-96.47%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added