simple-git
Advanced tools
Comparing version 2.47.1 to 2.48.0
# Change History & Release Notes | ||
## [2.48.0](https://www.github.com/steveukx/git-js/compare/v2.47.1...v2.48.0) (2021-12-01) | ||
### Features | ||
* `StatusResult` returned by `git.status()` should include `detached` state of the working copy. ([#695](https://www.github.com/steveukx/git-js/issues/695)) ([f464ebe](https://www.github.com/steveukx/git-js/commit/f464ebe567c6c5cd4e99fd7e6300d9efdd4cbb1b)) | ||
### Bug Fixes | ||
* Add example for empty commit message in `git.commit()` ([61089cb](https://www.github.com/steveukx/git-js/commit/61089cbcb791acf9dc596dcc903e7b9c6c76c0e1)) | ||
### [2.47.1](https://www.github.com/steveukx/git-js/compare/v2.47.0...v2.47.1) (2021-11-29) | ||
@@ -4,0 +16,0 @@ |
{ | ||
"name": "simple-git", | ||
"description": "Simple GIT interface for node.js", | ||
"version": "2.47.1", | ||
"version": "2.48.0", | ||
"author": "Steve King <steve@mydev.co>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -1,39 +0,18 @@ | ||
import { FileStatusResult, StatusResult, StatusResultRenamed } from '../../../typings'; | ||
/** | ||
* The StatusSummary is returned as a response to getting `git().status()` | ||
*/ | ||
import { StatusResult } from '../../../typings'; | ||
export declare class StatusSummary implements StatusResult { | ||
not_added: string[]; | ||
conflicted: string[]; | ||
created: string[]; | ||
deleted: string[]; | ||
modified: string[]; | ||
renamed: StatusResultRenamed[]; | ||
/** | ||
* All files represented as an array of objects containing the `path` and status in `index` and | ||
* in the `working_dir`. | ||
*/ | ||
files: FileStatusResult[]; | ||
staged: string[]; | ||
/** | ||
* Number of commits ahead of the tracked branch | ||
*/ | ||
not_added: never[]; | ||
conflicted: never[]; | ||
created: never[]; | ||
deleted: never[]; | ||
modified: never[]; | ||
renamed: never[]; | ||
files: never[]; | ||
staged: never[]; | ||
ahead: number; | ||
/** | ||
*Number of commits behind the tracked branch | ||
*/ | ||
behind: number; | ||
/** | ||
* Name of the current branch | ||
*/ | ||
current: string | null; | ||
/** | ||
* Name of the branch being tracked | ||
*/ | ||
tracking: string | null; | ||
/** | ||
* Gets whether this StatusSummary represents a clean working branch. | ||
*/ | ||
current: null; | ||
tracking: null; | ||
detached: boolean; | ||
isClean(): boolean; | ||
} | ||
export declare const parseStatusSummary: (text: string) => StatusResult; |
@@ -6,5 +6,2 @@ "use strict"; | ||
const FileStatusSummary_1 = require("./FileStatusSummary"); | ||
/** | ||
* The StatusSummary is returned as a response to getting `git().status()` | ||
*/ | ||
class StatusSummary { | ||
@@ -18,28 +15,10 @@ constructor() { | ||
this.renamed = []; | ||
/** | ||
* All files represented as an array of objects containing the `path` and status in `index` and | ||
* in the `working_dir`. | ||
*/ | ||
this.files = []; | ||
this.staged = []; | ||
/** | ||
* Number of commits ahead of the tracked branch | ||
*/ | ||
this.ahead = 0; | ||
/** | ||
*Number of commits behind the tracked branch | ||
*/ | ||
this.behind = 0; | ||
/** | ||
* Name of the current branch | ||
*/ | ||
this.current = null; | ||
/** | ||
* Name of the branch being tracked | ||
*/ | ||
this.tracking = null; | ||
this.detached = false; | ||
} | ||
/** | ||
* Gets whether this StatusSummary represents a clean working branch. | ||
*/ | ||
isClean() { | ||
@@ -118,2 +97,3 @@ return !this.files.length; | ||
result.current = regexResult && regexResult[1] || result.current; | ||
result.detached = /\(no branch\)/.test(line); | ||
}] | ||
@@ -120,0 +100,0 @@ ]); |
@@ -297,9 +297,36 @@ import { DefaultLogFields } from '../src/lib/tasks/log'; | ||
staged: string[]; | ||
/** | ||
* All files represented as an array of objects containing the `path` and status in `index` and | ||
* in the `working_dir`. | ||
*/ | ||
files: FileStatusResult[]; | ||
/** | ||
* Number of commits ahead of the tracked branch | ||
*/ | ||
ahead: number; | ||
/** | ||
*Number of commits behind the tracked branch | ||
*/ | ||
behind: number; | ||
/** | ||
* Name of the current branch | ||
*/ | ||
current: string | null; | ||
/** | ||
* Name of the branch being tracked | ||
*/ | ||
tracking: string | null; | ||
/** | ||
* Detached status of the working copy, for more detail of what the working branch | ||
* is detached from use `git.branch()` | ||
*/ | ||
detached: boolean; | ||
/** | ||
* Gets whether this represents a clean working branch. | ||
@@ -306,0 +333,0 @@ */ |
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
410934
6011