simple-git
Advanced tools
Comparing version 3.7.1 to 3.8.0
@@ -1,2 +0,3 @@ | ||
import { DiffResult } from '../../../typings'; | ||
export declare function parseDiffResult(stdOut: string): DiffResult; | ||
import { LogFormat } from '../args/log-format'; | ||
import { DiffSummary } from '../responses/DiffSummary'; | ||
export declare function getDiffParser(format?: LogFormat): (stdOut: string) => DiffSummary; |
import { LogResult } from '../../../typings'; | ||
import { LogFormat } from '../args/log-format'; | ||
export declare const START_BOUNDARY = "\u00F2\u00F2\u00F2\u00F2\u00F2\u00F2 "; | ||
export declare const COMMIT_BOUNDARY = " \u00F2\u00F2"; | ||
export declare const SPLITTER = " \u00F2 "; | ||
export declare function createListLogSummaryParser<T = any>(splitter?: string, fields?: string[]): (stdOut: string) => LogResult<T>; | ||
export declare function createListLogSummaryParser<T = any>(splitter?: string, fields?: string[], logFormat?: LogFormat): (stdOut: string) => LogResult<T>; |
import { StringTask } from '../types'; | ||
import { DiffResult } from '../../../typings'; | ||
export declare function diffSummaryTask(customArgs: string[]): StringTask<DiffResult>; | ||
import { EmptyTask } from './task'; | ||
export declare function diffSummaryTask(customArgs: string[]): StringTask<DiffResult> | EmptyTask; | ||
export declare function validateLogFormatConfig(customArgs: unknown[]): EmptyTask | void; |
@@ -1,3 +0,3 @@ | ||
import { Options, StringTask } from '../types'; | ||
import { LogResult, SimpleGit } from '../../../typings'; | ||
import type { Options, StringTask } from '../types'; | ||
import type { LogResult, SimpleGit } from '../../../typings'; | ||
export interface DefaultLogFields { | ||
@@ -4,0 +4,0 @@ hash: string; |
import { LogOptions, LogResult } from '../../../typings'; | ||
import { StringTask } from '../types'; | ||
export declare function stashListTask(opt: LogOptions<import("./log").DefaultLogFields> | undefined, customArgs: string[]): StringTask<LogResult>; | ||
import type { StringTask } from '../types'; | ||
import type { EmptyTask } from './task'; | ||
export declare function stashListTask(opt: LogOptions<import("./log").DefaultLogFields> | undefined, customArgs: string[]): EmptyTask | StringTask<LogResult>; |
@@ -1,2 +0,2 @@ | ||
import { BufferTask, EmptyTaskParser, SimpleGitTask, StringTask } from '../types'; | ||
import type { BufferTask, EmptyTaskParser, SimpleGitTask, StringTask } from '../types'; | ||
export declare const EMPTY_COMMANDS: []; | ||
@@ -3,0 +3,0 @@ export declare type EmptyTask = { |
@@ -1,5 +0,5 @@ | ||
import { TaskParser, TaskResponseFormat } from '../types'; | ||
import type { MaybeArray, TaskParser, TaskResponseFormat } from '../types'; | ||
import { GitOutputStreams } from './git-output-streams'; | ||
import { LineParser } from './line-parser'; | ||
export declare function callTaskParser<INPUT extends TaskResponseFormat, RESPONSE>(parser: TaskParser<INPUT, RESPONSE>, streams: GitOutputStreams<INPUT>): RESPONSE; | ||
export declare function parseStringResponse<T>(result: T, parsers: LineParser<T>[], ...texts: string[]): T; | ||
export declare function parseStringResponse<T>(result: T, parsers: LineParser<T>[], texts: MaybeArray<string>, trim?: boolean): T; |
{ | ||
"name": "simple-git", | ||
"description": "Simple GIT interface for node.js", | ||
"version": "3.7.1", | ||
"version": "3.8.0", | ||
"author": "Steve King <steve@mydev.co>", | ||
@@ -19,7 +19,7 @@ "contributors": [ | ||
"@kwsites/promise-deferred": "^1.1.1", | ||
"debug": "^4.3.3" | ||
"debug": "^4.3.4" | ||
}, | ||
"devDependencies": { | ||
"@kwsites/promise-result": "^1.1.0", | ||
"@simple-git/babel-config": "^1.0.0", | ||
"@kwsites/promise-result": "^1.1.0", | ||
"@types/debug": "^4.1.5", | ||
@@ -26,0 +26,0 @@ "@types/jest": "^27.0.3", |
@@ -189,6 +189,2 @@ # Simple Git | ||
| `.customBinary(gitPath)` | sets the command to use to reference git, allows for using a git binary not available on the path environment variable | | ||
| `.diff(options, handlerFn)` | get the diff of the current repo compared to the last commit with a set of options supplied as a string | | ||
| `.diff(handlerFn)` | get the diff for all file in the current repo compared to the last commit | | ||
| `.diffSummary(handlerFn)` | gets a summary of the diff for files in the repo, uses the `git diff --stat` format to calculate changes. Handler is called with a nullable error object and an instance of the [DiffSummary](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/DiffSummary.js) | | ||
| `.diffSummary(options, handlerFn)` | includes options in the call to `diff --stat options` and returns a [DiffSummary](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/DiffSummary.js) | | ||
| `.env(name, value)` | Set environment variables to be passed to the spawned child processes, [see usage in detail below](#environment-variables). | | ||
@@ -205,4 +201,2 @@ | `.exec(handlerFn)` | calls a simple function in the current step | | ||
| `.rmKeepLocal([fileA, ...], handlerFn)` | removes files from source control but leaves them on disk | | ||
| `.stash([options, ][ handlerFn])` | Stash the working directory, optional first argument can be an array of string arguments or [options](#how-to-specify-options) object to pass to the [git stash](https://git-scm.com/docs/git-stash) command. | | ||
| `.stashList([options, ][handlerFn])` | Retrieves the stash list, optional first argument can be an object specifying `options.splitter` to override the default value of `;;;;`, alternatively options can be a set of arguments as supported by the `git stash list` command. | | ||
| `.tag(args[], handlerFn)` | Runs any supported [git tag](https://git-scm.com/docs/git-tag) commands with arguments passed as an array of strings . | | ||
@@ -250,3 +244,2 @@ | `.tags([options, ] handlerFn)` | list all tags, use the optional [options](#how-to-specify-options) object to set any options allows by the [git tag](https://git-scm.com/docs/git-tag) command. Tags will be sorted by semantic version number by default, for git versions 2.7 and above, use the `--sort` option to set a custom sort. | | ||
## git config | ||
@@ -267,2 +260,13 @@ | ||
## git diff | ||
- `.diff([ options ])` get the diff of the current repo compared to the last commit, optionally including | ||
any number of other arguments supported by [git diff](https://git-scm.com/docs/git-diff) supplied as an | ||
[options](#how-to-specify-options) object/array. Returns the raw `diff` output as a string. | ||
- `.diffSummary([ options ])` creates a [DiffResult](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/DiffSummary.ts) | ||
to summarise the diff for files in the repo. Uses the `--stat` format by default which can be overridden | ||
by passing in any of the log format commands (eg: `--numstat` or `--name-stat`) as part of the optional | ||
[options](#how-to-specify-options) object/array. | ||
## git grep [examples](https://github.com/steveukx/git-js/blob/main/examples/git-grep.md) | ||
@@ -382,2 +386,8 @@ | ||
## git stash | ||
- `.stash([ options ])` Stash the working directory, optional first argument can be an array of string arguments or [options](#how-to-specify-options) object to pass to the [git stash](https://git-scm.com/docs/git-stash) command. | ||
- `.stashList([ options ])` Retrieves the stash list, optional first argument can be an object in the same format as used in [git log](#git-log). | ||
## changing the working directory [examples](https://github.com/steveukx/git-js/blob/main/examples/git-change-working-directory.md) | ||
@@ -384,0 +394,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
813865
102
9722
813
Updateddebug@^4.3.4