es-git 0.5.0-next.163 → 0.5.0-next.165
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +106 -0
- package/index.js +1 -0
- package/package.json +11 -11
package/index.d.ts
CHANGED
|
@@ -1083,6 +1083,28 @@ export declare class Deltas extends Iterator<DiffDelta, void, void> {
|
|
|
1083
1083
|
next(value?: void): IteratorResult<DiffDelta, void>
|
|
1084
1084
|
}
|
|
1085
1085
|
|
|
1086
|
+
/**
|
|
1087
|
+
* The result of a `describe` operation on either an `Describe` or a
|
|
1088
|
+
* `Repository`.
|
|
1089
|
+
*/
|
|
1090
|
+
export declare class Describe {
|
|
1091
|
+
/**
|
|
1092
|
+
* Prints this describe result, returning the result as a string.
|
|
1093
|
+
*
|
|
1094
|
+
* @category Describe/Methods
|
|
1095
|
+
* @signature
|
|
1096
|
+
* ```ts
|
|
1097
|
+
* class Describe {
|
|
1098
|
+
* format(options?: DescribeFormatOptions | null | undefined): string;
|
|
1099
|
+
* }
|
|
1100
|
+
* ```
|
|
1101
|
+
*
|
|
1102
|
+
* @param {DescribeFormatOptions} [options] - Options for formatting describe.
|
|
1103
|
+
* @returns Formatted string for this describe.
|
|
1104
|
+
*/
|
|
1105
|
+
format(options?: DescribeFormatOptions | undefined | null): string
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1086
1108
|
/**
|
|
1087
1109
|
* The diff object that contains all individual file deltas.
|
|
1088
1110
|
*
|
|
@@ -1530,6 +1552,23 @@ export declare class GitObject {
|
|
|
1530
1552
|
* @returns Returns `null` if the object is not actually a commit.
|
|
1531
1553
|
*/
|
|
1532
1554
|
asCommit(): Commit | null
|
|
1555
|
+
/**
|
|
1556
|
+
* Describes a commit
|
|
1557
|
+
*
|
|
1558
|
+
* Performs a describe operation on this commitish object.
|
|
1559
|
+
*
|
|
1560
|
+
* @category GitObject/Methods
|
|
1561
|
+
* @signature
|
|
1562
|
+
* ```ts
|
|
1563
|
+
* class Object {
|
|
1564
|
+
* describe(options?: DescribeOptions | null | undefined): Describe;
|
|
1565
|
+
* }
|
|
1566
|
+
* ```
|
|
1567
|
+
*
|
|
1568
|
+
* @param {DescribeOptions} [options] - Options for describe operation.
|
|
1569
|
+
* @returns Instance of describe.
|
|
1570
|
+
*/
|
|
1571
|
+
describe(options?: DescribeOptions | undefined | null): Describe
|
|
1533
1572
|
}
|
|
1534
1573
|
|
|
1535
1574
|
/**
|
|
@@ -4545,6 +4584,25 @@ export declare class Repository {
|
|
|
4545
4584
|
* @returns If it does not exist, returns `null`.
|
|
4546
4585
|
*/
|
|
4547
4586
|
findTree(oid: string): Tree | null
|
|
4587
|
+
/**
|
|
4588
|
+
* Describes a commit
|
|
4589
|
+
*
|
|
4590
|
+
* Performs a describe operation on the current commit and the worktree.
|
|
4591
|
+
* After performing a describe on `HEAD`, a status is run and description is
|
|
4592
|
+
* considered to be dirty if there are.
|
|
4593
|
+
*
|
|
4594
|
+
* @category Repository/Methods
|
|
4595
|
+
* @signature
|
|
4596
|
+
* ```ts
|
|
4597
|
+
* class Repository {
|
|
4598
|
+
* describe(options?: DescribeOptions | null | undefined): Describe;
|
|
4599
|
+
* }
|
|
4600
|
+
* ```
|
|
4601
|
+
*
|
|
4602
|
+
* @param {DescribeOptions} [options] - Options for describe operation.
|
|
4603
|
+
* @returns Instance of describe.
|
|
4604
|
+
*/
|
|
4605
|
+
describe(options?: DescribeOptions | undefined | null): Describe
|
|
4548
4606
|
}
|
|
4549
4607
|
|
|
4550
4608
|
/**
|
|
@@ -6091,6 +6149,54 @@ export type DeltaType = 'Unmodified'|
|
|
|
6091
6149
|
'Unreadable'|
|
|
6092
6150
|
'Conflicted';
|
|
6093
6151
|
|
|
6152
|
+
export interface DescribeFormatOptions {
|
|
6153
|
+
/**
|
|
6154
|
+
* Sets the size of the abbreviated commit id to use.
|
|
6155
|
+
*
|
|
6156
|
+
* The value is the lower bound for the length of the abbreviated string,
|
|
6157
|
+
* and the default is 7.
|
|
6158
|
+
*/
|
|
6159
|
+
abbreviatedSize?: number
|
|
6160
|
+
/**
|
|
6161
|
+
* Sets whether or not the long format is used even when a shorter name
|
|
6162
|
+
* could be used.
|
|
6163
|
+
*/
|
|
6164
|
+
alwaysUseLongFormat?: boolean
|
|
6165
|
+
/**
|
|
6166
|
+
* If the workdir is dirty and this is set, this string will be appended to
|
|
6167
|
+
* the description string.
|
|
6168
|
+
*/
|
|
6169
|
+
dirtySuffix?: string
|
|
6170
|
+
}
|
|
6171
|
+
|
|
6172
|
+
export interface DescribeOptions {
|
|
6173
|
+
maxCandidatesTags?: number
|
|
6174
|
+
/**
|
|
6175
|
+
* Sets the reference lookup strategy
|
|
6176
|
+
*
|
|
6177
|
+
* This behaves like the `--tags` option to git-describe.
|
|
6178
|
+
*/
|
|
6179
|
+
describeTags?: boolean
|
|
6180
|
+
/**
|
|
6181
|
+
* Sets the reference lookup strategy
|
|
6182
|
+
*
|
|
6183
|
+
* This behaves like the `--all` option to git-describe.
|
|
6184
|
+
*/
|
|
6185
|
+
describeAll?: boolean
|
|
6186
|
+
/**
|
|
6187
|
+
* Indicates when calculating the distance from the matching tag or
|
|
6188
|
+
* reference whether to only walk down the first-parent ancestry.
|
|
6189
|
+
*/
|
|
6190
|
+
onlyFollowFirstParent?: boolean
|
|
6191
|
+
/**
|
|
6192
|
+
* If no matching tag or reference is found whether a describe option would
|
|
6193
|
+
* normally fail. This option indicates, however, that it will instead fall
|
|
6194
|
+
* back to showing the full id of the commit.
|
|
6195
|
+
*/
|
|
6196
|
+
showCommitOidAsFallback?: boolean
|
|
6197
|
+
pattern?: string
|
|
6198
|
+
}
|
|
6199
|
+
|
|
6094
6200
|
export interface DiffFindOptions {
|
|
6095
6201
|
/** Look for renames? */
|
|
6096
6202
|
renames?: boolean
|
package/index.js
CHANGED
|
@@ -583,6 +583,7 @@ module.exports.Commit = nativeBinding.Commit
|
|
|
583
583
|
module.exports.Config = nativeBinding.Config
|
|
584
584
|
module.exports.ConfigEntries = nativeBinding.ConfigEntries
|
|
585
585
|
module.exports.Deltas = nativeBinding.Deltas
|
|
586
|
+
module.exports.Describe = nativeBinding.Describe
|
|
586
587
|
module.exports.Diff = nativeBinding.Diff
|
|
587
588
|
module.exports.DiffDelta = nativeBinding.DiffDelta
|
|
588
589
|
module.exports.DiffFile = nativeBinding.DiffFile
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-git",
|
|
3
|
-
"version": "0.5.0-next.
|
|
3
|
+
"version": "0.5.0-next.165+a053e66",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"vitest": "^3.0.5"
|
|
55
55
|
},
|
|
56
56
|
"optionalDependencies": {
|
|
57
|
-
"es-git-darwin-x64": "0.5.0-next.
|
|
58
|
-
"es-git-darwin-arm64": "0.5.0-next.
|
|
59
|
-
"es-git-win32-x64-msvc": "0.5.0-next.
|
|
60
|
-
"es-git-win32-arm64-msvc": "0.5.0-next.
|
|
61
|
-
"es-git-linux-x64-gnu": "0.5.0-next.
|
|
62
|
-
"es-git-linux-x64-musl": "0.5.0-next.
|
|
63
|
-
"es-git-android-arm64": "0.5.0-next.
|
|
64
|
-
"es-git-linux-arm64-gnu": "0.5.0-next.
|
|
65
|
-
"es-git-linux-arm64-musl": "0.5.0-next.
|
|
66
|
-
"es-git-android-arm-eabi": "0.5.0-next.
|
|
57
|
+
"es-git-darwin-x64": "0.5.0-next.165+a053e66",
|
|
58
|
+
"es-git-darwin-arm64": "0.5.0-next.165+a053e66",
|
|
59
|
+
"es-git-win32-x64-msvc": "0.5.0-next.165+a053e66",
|
|
60
|
+
"es-git-win32-arm64-msvc": "0.5.0-next.165+a053e66",
|
|
61
|
+
"es-git-linux-x64-gnu": "0.5.0-next.165+a053e66",
|
|
62
|
+
"es-git-linux-x64-musl": "0.5.0-next.165+a053e66",
|
|
63
|
+
"es-git-android-arm64": "0.5.0-next.165+a053e66",
|
|
64
|
+
"es-git-linux-arm64-gnu": "0.5.0-next.165+a053e66",
|
|
65
|
+
"es-git-linux-arm64-musl": "0.5.0-next.165+a053e66",
|
|
66
|
+
"es-git-android-arm-eabi": "0.5.0-next.165+a053e66"
|
|
67
67
|
}
|
|
68
68
|
}
|