es-git 0.5.0-next.158 → 0.5.0-next.160
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 +62 -0
- package/package.json +11 -11
package/index.d.ts
CHANGED
|
@@ -547,6 +547,23 @@ export declare class Commit {
|
|
|
547
547
|
* @returns Commit time of a commit.
|
|
548
548
|
*/
|
|
549
549
|
time(): Date
|
|
550
|
+
/**
|
|
551
|
+
* Get the id of the tree pointed to by this commit.
|
|
552
|
+
*
|
|
553
|
+
* No attempts are made to fetch an object from the ODB.
|
|
554
|
+
*
|
|
555
|
+
* @category Commit/Methods
|
|
556
|
+
*
|
|
557
|
+
* @signature
|
|
558
|
+
* ```ts
|
|
559
|
+
* class Commit {
|
|
560
|
+
* treeId(): string;
|
|
561
|
+
* }
|
|
562
|
+
* ```
|
|
563
|
+
*
|
|
564
|
+
* @returns Get the id of the tree pointed to by a commit.
|
|
565
|
+
*/
|
|
566
|
+
treeId(): string
|
|
550
567
|
/**
|
|
551
568
|
* Get the tree pointed to by a commit.
|
|
552
569
|
*
|
|
@@ -577,6 +594,27 @@ export declare class Commit {
|
|
|
577
594
|
* @returns `GitObject` that casted from this commit.
|
|
578
595
|
*/
|
|
579
596
|
asObject(): GitObject
|
|
597
|
+
/**
|
|
598
|
+
* Amend this existing commit with all non-nullable values
|
|
599
|
+
*
|
|
600
|
+
* This creates a new commit that is exactly the same as the old commit,
|
|
601
|
+
* except that any non-nullable values will be updated. The new commit has
|
|
602
|
+
* the same parents as the old commit.
|
|
603
|
+
*
|
|
604
|
+
* @category Commit/Methods
|
|
605
|
+
*
|
|
606
|
+
* @signature
|
|
607
|
+
* ```ts
|
|
608
|
+
* class Commit {
|
|
609
|
+
* amend(options?: AmendOptions, tree?: Tree): string;
|
|
610
|
+
* }
|
|
611
|
+
* ```
|
|
612
|
+
*
|
|
613
|
+
* @param {AmendOptions} [options] - Options for amending commit.
|
|
614
|
+
* @param {Tree} [tree] - Tree to use for amending commit.
|
|
615
|
+
* @returns ID(SHA1) of amended commit.
|
|
616
|
+
*/
|
|
617
|
+
amend(options?: AmendOptions | undefined | null, tree?: Tree | undefined | null): string
|
|
580
618
|
/**
|
|
581
619
|
* Get the author of this commit, using the mailmap to map it to the canonical name and email.
|
|
582
620
|
*
|
|
@@ -5254,6 +5292,30 @@ export interface AddMailmapEntryData {
|
|
|
5254
5292
|
replaceEmail: string
|
|
5255
5293
|
}
|
|
5256
5294
|
|
|
5295
|
+
export interface AmendOptions {
|
|
5296
|
+
/**
|
|
5297
|
+
* If not NULL, name of the reference that will be updated to point to this commit.
|
|
5298
|
+
* If the reference is not direct, it will be resolved to a direct reference.
|
|
5299
|
+
* Use "HEAD" to update the HEAD of the current branch and make it point to this commit.
|
|
5300
|
+
*
|
|
5301
|
+
* If the reference doesn't exist yet, it will be created.
|
|
5302
|
+
* If it does exist, the first parent must be the tip of this branch.
|
|
5303
|
+
*/
|
|
5304
|
+
updateRef?: string
|
|
5305
|
+
/** Signature for author. */
|
|
5306
|
+
author?: SignaturePayload
|
|
5307
|
+
/** Signature for committer. */
|
|
5308
|
+
committer?: SignaturePayload
|
|
5309
|
+
/** Full message for this commit */
|
|
5310
|
+
message?: string
|
|
5311
|
+
/**
|
|
5312
|
+
* The encoding for the message in the commit, represented with a standard encoding name.
|
|
5313
|
+
* E.g. "UTF-8".
|
|
5314
|
+
* If NULL, no encoding header is written and UTF-8 is assumed.
|
|
5315
|
+
*/
|
|
5316
|
+
messageEncoding?: string
|
|
5317
|
+
}
|
|
5318
|
+
|
|
5257
5319
|
/**
|
|
5258
5320
|
* - `Unspecified` : Use the setting from the remote's configuration
|
|
5259
5321
|
* - `Auto` : Ask the server for tags pointing to objects we're already downloading
|
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.160+f86b483",
|
|
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.160+f86b483",
|
|
58
|
+
"es-git-darwin-arm64": "0.5.0-next.160+f86b483",
|
|
59
|
+
"es-git-win32-x64-msvc": "0.5.0-next.160+f86b483",
|
|
60
|
+
"es-git-win32-arm64-msvc": "0.5.0-next.160+f86b483",
|
|
61
|
+
"es-git-linux-x64-gnu": "0.5.0-next.160+f86b483",
|
|
62
|
+
"es-git-linux-x64-musl": "0.5.0-next.160+f86b483",
|
|
63
|
+
"es-git-android-arm64": "0.5.0-next.160+f86b483",
|
|
64
|
+
"es-git-linux-arm64-gnu": "0.5.0-next.160+f86b483",
|
|
65
|
+
"es-git-linux-arm64-musl": "0.5.0-next.160+f86b483",
|
|
66
|
+
"es-git-android-arm-eabi": "0.5.0-next.160+f86b483"
|
|
67
67
|
}
|
|
68
68
|
}
|