es-git 0.1.0 → 0.2.0

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.
Files changed (2) hide show
  1. package/index.d.ts +49 -49
  2. package/package.json +17 -8
package/index.d.ts CHANGED
@@ -701,7 +701,7 @@ export enum ReferenceFormat {
701
701
  * @category Reference
702
702
  * @signature
703
703
  * ```ts
704
- * function normalizeReferenceName(refname: string, format?: number): string | null;
704
+ * function normalizeReferenceName(refname: string, format?: number | null | undefined): string | null;
705
705
  * ```
706
706
  *
707
707
  * @param {string} refname - Reference name to normalize.
@@ -1056,8 +1056,8 @@ export interface RepositoryCloneOptions {
1056
1056
  * ```ts
1057
1057
  * function initRepository(
1058
1058
  * path: string,
1059
- * options?: RepositoryInitOptions,
1060
- * signal?: AbortSignal,
1059
+ * options?: RepositoryInitOptions | null | undefined,
1060
+ * signal?: AbortSignal | null | undefined,
1061
1061
  * ): Promise<Repository>;
1062
1062
  * ```
1063
1063
  *
@@ -1075,7 +1075,7 @@ export interface RepositoryCloneOptions {
1075
1075
  * ```ts
1076
1076
  * import { initRepository } from 'es-git';
1077
1077
  *
1078
- * const repo = await iniRepository('/path/to/repo');
1078
+ * const repo = await initRepository('/path/to/repo');
1079
1079
  * ```
1080
1080
  *
1081
1081
  * Create bare repository.
@@ -1083,7 +1083,7 @@ export interface RepositoryCloneOptions {
1083
1083
  * ```ts
1084
1084
  * import { initRepository } from 'es-git';
1085
1085
  *
1086
- * const repo = await iniRepository('/path/to/repo.git', {
1086
+ * const repo = await initRepository('/path/to/repo.git', {
1087
1087
  * bare: true,
1088
1088
  * });
1089
1089
  * ```
@@ -1097,8 +1097,8 @@ export declare function initRepository(path: string, options?: RepositoryInitOpt
1097
1097
  * ```ts
1098
1098
  * function openRepository(
1099
1099
  * path: string,
1100
- * options?: RepositoryOpenOptions,
1101
- * signal?: AbortSignal,
1100
+ * options?: RepositoryOpenOptions | null | undefined,
1101
+ * signal?: AbortSignal | null | undefined,
1102
1102
  * ): Promise<Repository>;
1103
1103
  * ```
1104
1104
  *
@@ -1139,7 +1139,7 @@ export declare function openRepository(path: string, options?: RepositoryOpenOpt
1139
1139
  * @category Repository
1140
1140
  * @signature
1141
1141
  * ```ts
1142
- * function discoverRepository(path: string, signal?: AbortSignal): Promise<Repository>;
1142
+ * function discoverRepository(path: string, signal?: AbortSignal | null | undefined): Promise<Repository>;
1143
1143
  * ```
1144
1144
  *
1145
1145
  * @param {string} path - Directory path to discover repository.
@@ -1161,8 +1161,8 @@ export declare function discoverRepository(path: string, signal?: AbortSignal |
1161
1161
  * function cloneRepository(
1162
1162
  * url: string,
1163
1163
  * path: string,
1164
- * options?: RepositoryCloneOptions | null,
1165
- * signal?: AbortSignal | null
1164
+ * options?: RepositoryCloneOptions | null | undefined,
1165
+ * signal?: AbortSignal | null | undefined
1166
1166
  * ): Promise<Repository>;
1167
1167
  * ```
1168
1168
  *
@@ -1290,7 +1290,7 @@ export interface SignatureTimeOptions {
1290
1290
  * function createSignature(
1291
1291
  * name: string,
1292
1292
  * email: string,
1293
- * timeOptions?: SignatureTimeOptions,
1293
+ * timeOptions?: SignatureTimeOptions | null | undefined,
1294
1294
  * ): Signature;
1295
1295
  * ```
1296
1296
  *
@@ -1509,7 +1509,7 @@ export declare class Commit {
1509
1509
  * @signature
1510
1510
  * ```ts
1511
1511
  * class Commit {
1512
- * summary(): string;
1512
+ * summary(): string | null;
1513
1513
  * }
1514
1514
  * ```
1515
1515
  *
@@ -1531,7 +1531,7 @@ export declare class Commit {
1531
1531
  * @signature
1532
1532
  * ```ts
1533
1533
  * class Commit {
1534
- * body(): string;
1534
+ * body(): string | null;
1535
1535
  * }
1536
1536
  * ```
1537
1537
  *
@@ -2095,7 +2095,7 @@ export declare class Diff {
2095
2095
  * @signature
2096
2096
  * ```ts
2097
2097
  * class Diff {
2098
- * print(options?: DiffPrintOptions | null): string;
2098
+ * print(options?: DiffPrintOptions | null | undefined): string;
2099
2099
  * }
2100
2100
  * ```
2101
2101
  *
@@ -2115,7 +2115,7 @@ export declare class Diff {
2115
2115
  * @signature
2116
2116
  * ```ts
2117
2117
  * class Diff {
2118
- * findSimilar(options?: DiffFindOptions): void;
2118
+ * findSimilar(options?: DiffFindOptions | null | undefined): void;
2119
2119
  * }
2120
2120
  * ```
2121
2121
  *
@@ -2400,7 +2400,7 @@ export declare class Index {
2400
2400
  * @signature
2401
2401
  * ```ts
2402
2402
  * class Index {
2403
- * setVersion(version: number): number;
2403
+ * setVersion(version: number): void;
2404
2404
  * }
2405
2405
  * ```
2406
2406
  *
@@ -2417,7 +2417,7 @@ export declare class Index {
2417
2417
  * @signature
2418
2418
  * ```ts
2419
2419
  * class Index {
2420
- * getByPath(path: string, stage?: IndexStage): IndexEntry | null;
2420
+ * getByPath(path: string, stage?: IndexStage | null | undefined): IndexEntry | null;
2421
2421
  * }
2422
2422
  * ```
2423
2423
  *
@@ -2457,7 +2457,7 @@ export declare class Index {
2457
2457
  * @signature
2458
2458
  * ```ts
2459
2459
  * class Index {
2460
- * addAll(pathspecs: string[], options?: IndexAddAllOptions): void;
2460
+ * addAll(pathspecs: string[], options?: IndexAddAllOptions | null | undefined): void;
2461
2461
  * }
2462
2462
  * ```
2463
2463
  *
@@ -2490,7 +2490,7 @@ export declare class Index {
2490
2490
  * @signature
2491
2491
  * ```ts
2492
2492
  * class Index {
2493
- * read(force?: boolean): void;
2493
+ * read(force?: boolean | null | undefined): void;
2494
2494
  * }
2495
2495
  * ```
2496
2496
  *
@@ -2534,7 +2534,7 @@ export declare class Index {
2534
2534
  * @signature
2535
2535
  * ```ts
2536
2536
  * class Index {
2537
- * writeTree(): void;
2537
+ * writeTree(): string;
2538
2538
  * }
2539
2539
  * ```
2540
2540
  */
@@ -2550,7 +2550,7 @@ export declare class Index {
2550
2550
  * @signature
2551
2551
  * ```ts
2552
2552
  * class Index {
2553
- * removePath(path: string, options?: IndexRemoveOptions): void;
2553
+ * removePath(path: string, options?: IndexRemoveOptions | null | undefined): void;
2554
2554
  * }
2555
2555
  * ```
2556
2556
  *
@@ -2565,7 +2565,7 @@ export declare class Index {
2565
2565
  * @signature
2566
2566
  * ```ts
2567
2567
  * class Index {
2568
- * removeAll(pathspecs: string[], options?: IndexRemoveAllOptions): void;
2568
+ * removeAll(pathspecs: string[], options?: IndexRemoveAllOptions | null | undefined): void;
2569
2569
  * }
2570
2570
  * ```
2571
2571
  *
@@ -2586,7 +2586,7 @@ export declare class Index {
2586
2586
  * @signature
2587
2587
  * ```ts
2588
2588
  * class Index {
2589
- * updateAll(pathspecs: string[], options?: IndexUpdateAllOptions): void;
2589
+ * updateAll(pathspecs: string[], options?: IndexUpdateAllOptions | null | undefined): void;
2590
2590
  * }
2591
2591
  * ```
2592
2592
  *
@@ -2681,7 +2681,7 @@ export declare class GitObject {
2681
2681
  /**
2682
2682
  * Get the id (SHA1) of a repository object.
2683
2683
  *
2684
- * @category Object/Methods
2684
+ * @category GitObject/Methods
2685
2685
  * @signature
2686
2686
  * ```ts
2687
2687
  * class GitObject {
@@ -2695,7 +2695,7 @@ export declare class GitObject {
2695
2695
  /**
2696
2696
  * Get the object type of object.
2697
2697
  *
2698
- * @category Object/Methods
2698
+ * @category GitObject/Methods
2699
2699
  * @signature
2700
2700
  * ```ts
2701
2701
  * class GitObject {
@@ -2709,7 +2709,7 @@ export declare class GitObject {
2709
2709
  /**
2710
2710
  * Recursively peel an object until an object of the specified type is met.
2711
2711
  *
2712
- * @category Object/Methods
2712
+ * @category GitObject/Methods
2713
2713
  * @signature
2714
2714
  * ```ts
2715
2715
  * class GitObject {
@@ -2727,7 +2727,7 @@ export declare class GitObject {
2727
2727
  /**
2728
2728
  * Recursively peel an object until a commit is found.
2729
2729
  *
2730
- * @category Object/Methods
2730
+ * @category GitObject/Methods
2731
2731
  * @signature
2732
2732
  * ```ts
2733
2733
  * class GitObject {
@@ -2741,7 +2741,7 @@ export declare class GitObject {
2741
2741
  /**
2742
2742
  * Recursively peel an object until a blob is found.
2743
2743
  *
2744
- * @category Object/Methods
2744
+ * @category GitObject/Methods
2745
2745
  * @signature
2746
2746
  * ```ts
2747
2747
  * class GitObject {
@@ -2755,7 +2755,7 @@ export declare class GitObject {
2755
2755
  /**
2756
2756
  * Attempt to view this object as a commit.
2757
2757
  *
2758
- * @category Object/Methods
2758
+ * @category GitObject/Methods
2759
2759
  * @signature
2760
2760
  * ```ts
2761
2761
  * class GitObject {
@@ -2989,7 +2989,7 @@ export declare class Reference {
2989
2989
  * @signature
2990
2990
  * ```ts
2991
2991
  * class Reference {
2992
- * rename(newName: string, options?: RenameReferenceOptions): Reference;
2992
+ * rename(newName: string, options?: RenameReferenceOptions | null | undefined): Reference;
2993
2993
  * }
2994
2994
  * ```
2995
2995
  *
@@ -3095,8 +3095,8 @@ export declare class Remote {
3095
3095
  * class Remote {
3096
3096
  * fetch(
3097
3097
  * refspecs: string[],
3098
- * options?: FetchRemoteOptions,
3099
- * signal?: AbortSignal,
3098
+ * options?: FetchRemoteOptions | null | undefined,
3099
+ * signal?: AbortSignal | null | undefined,
3100
3100
  * ): Promise<void>;
3101
3101
  * }
3102
3102
  * ```
@@ -3132,8 +3132,8 @@ export declare class Remote {
3132
3132
  * class Remote {
3133
3133
  * push(
3134
3134
  * refspecs: string[],
3135
- * options?: PushOptions,
3136
- * signal?: AbortSignal,
3135
+ * options?: PushOptions | null | undefined,
3136
+ * signal?: AbortSignal | null | undefined,
3137
3137
  * ): Promise<void>;
3138
3138
  * }
3139
3139
  * ```
@@ -3169,7 +3169,7 @@ export declare class Remote {
3169
3169
  * @signature
3170
3170
  * ```ts
3171
3171
  * class Remote {
3172
- * prune(options?: PruneOptions, signal?: AbortSignal): Promise<void>;
3172
+ * prune(options?: PruneOptions | null | undefined, signal?: AbortSignal | null | undefined): Promise<void>;
3173
3173
  * }
3174
3174
  * ```
3175
3175
  *
@@ -3186,7 +3186,7 @@ export declare class Remote {
3186
3186
  * @signature
3187
3187
  * ```ts
3188
3188
  * class Remote {
3189
- * defaultBranch(signal?: AbortSignal): Promise<string>;
3189
+ * defaultBranch(signal?: AbortSignal | null | undefined): Promise<string>;
3190
3190
  * }
3191
3191
  * ```
3192
3192
  *
@@ -3262,7 +3262,7 @@ export declare class Repository {
3262
3262
  * @signature
3263
3263
  * ```ts
3264
3264
  * class Repository {
3265
- * commit(tree: Tree, message: string, options?: CommitOptions | null): string;
3265
+ * commit(tree: Tree, message: string, options?: CommitOptions | null | undefined): string;
3266
3266
  * }
3267
3267
  * ```
3268
3268
  *
@@ -3295,9 +3295,9 @@ export declare class Repository {
3295
3295
  * ```ts
3296
3296
  * class Repository {
3297
3297
  * diffTreeToTree(
3298
- * oldTree?: Tree,
3299
- * newTree?: Tree,
3300
- * options?: DiffOptions,
3298
+ * oldTree?: Tree | null | undefined,
3299
+ * newTree?: Tree | null | undefined,
3300
+ * options?: DiffOptions | null | undefined,
3301
3301
  * ): Diff;
3302
3302
  * }
3303
3303
  * ```
@@ -3322,7 +3322,7 @@ export declare class Repository {
3322
3322
  * diffIndexToIndex(
3323
3323
  * oldIndex: Index,
3324
3324
  * newIndex: Index,
3325
- * options?: DiffOptions,
3325
+ * options?: DiffOptions | null | undefined,
3326
3326
  * ): Diff;
3327
3327
  * }
3328
3328
  * ```
@@ -3346,7 +3346,7 @@ export declare class Repository {
3346
3346
  * @signature
3347
3347
  * ```ts
3348
3348
  * class Repository {
3349
- * diffIndexToWorkdir(index?: Index, options?: DiffOptions): Diff;
3349
+ * diffIndexToWorkdir(index?: Index | null | undefined, options?: DiffOptions | null | undefined): Diff;
3350
3350
  * }
3351
3351
  * ```
3352
3352
  *
@@ -3383,7 +3383,7 @@ export declare class Repository {
3383
3383
  * @signature
3384
3384
  * ```ts
3385
3385
  * class Repository {
3386
- * diffTreeToWorkdir(oldTree?: Tree, options?: DiffOptions): Diff;
3386
+ * diffTreeToWorkdir(oldTree?: Tree | null | undefined, options?: DiffOptions | null | undefined): Diff;
3387
3387
  * }
3388
3388
  * ```
3389
3389
  *
@@ -3407,7 +3407,7 @@ export declare class Repository {
3407
3407
  * @signature
3408
3408
  * ```ts
3409
3409
  * class Repository {
3410
- * diffTreeToWorkdirWithIndex(oldTree?: Tree, options?: DiffOptions): Diff;
3410
+ * diffTreeToWorkdirWithIndex(oldTree?: Tree | null | undefined, options?: DiffOptions | null | undefined): Diff;
3411
3411
  * }
3412
3412
  * ```
3413
3413
  *
@@ -3579,7 +3579,7 @@ export declare class Repository {
3579
3579
  * @signature
3580
3580
  * ```ts
3581
3581
  * class Repository {
3582
- * createRemote(name: string, url: string, options?: CreateRemoteOptions): Remote;
3582
+ * createRemote(name: string, url: string, options?: CreateRemoteOptions | null | undefined): Remote;
3583
3583
  * }
3584
3584
  * ```
3585
3585
  *
@@ -3815,7 +3815,7 @@ export declare class Repository {
3815
3815
  * @signature
3816
3816
  * ```ts
3817
3817
  * class Repository {
3818
- * tagNames(pattern?: string): string[];
3818
+ * tagNames(pattern?: string | null | undefined): string[];
3819
3819
  * }
3820
3820
  * ```
3821
3821
  *
@@ -3889,7 +3889,7 @@ export declare class Repository {
3889
3889
  * name: string,
3890
3890
  * target: GitObject,
3891
3891
  * message: string,
3892
- * options?: CreateTagOptions,
3892
+ * options?: CreateTagOptions | null | undefined,
3893
3893
  * ): string;
3894
3894
  * }
3895
3895
  * ```
@@ -3942,7 +3942,7 @@ export declare class Repository {
3942
3942
  * name: string,
3943
3943
  * target: GitObject,
3944
3944
  * message: string,
3945
- * options?: CreateAnnotationTagOptions,
3945
+ * options?: CreateAnnotationTagOptions | null | undefined,
3946
3946
  * ): string;
3947
3947
  * }
3948
3948
  * ```
@@ -3967,7 +3967,7 @@ export declare class Repository {
3967
3967
  * createLightweightTag(
3968
3968
  * name: string,
3969
3969
  * target: GitObject,
3970
- * options?: CreateLightweightTagOptions,
3970
+ * options?: CreateLightweightTagOptions | null | undefined,
3971
3971
  * ): string;
3972
3972
  * }
3973
3973
  * ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-git",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "files": [
@@ -22,8 +22,13 @@
22
22
  "x86_64-apple-darwin",
23
23
  "aarch64-apple-darwin",
24
24
  "x86_64-pc-windows-msvc",
25
+ "aarch64-pc-windows-msvc",
25
26
  "x86_64-unknown-linux-gnu",
26
- "x86_64-unknown-linux-musl"
27
+ "x86_64-unknown-linux-musl",
28
+ "aarch64-linux-android",
29
+ "aarch64-unknown-linux-gnu",
30
+ "aarch64-unknown-linux-musl",
31
+ "armv7-linux-androideabi"
27
32
  ]
28
33
  }
29
34
  },
@@ -35,7 +40,6 @@
35
40
  "benchmarks"
36
41
  ],
37
42
  "scripts": {
38
- "prepublishOnly": "napi prepublish -t npm",
39
43
  "build": "napi build --platform --release --no-const-enum --pipe=\"yarn transform:dts\"",
40
44
  "build:debug": "DEBUG=\"napi:*\" napi build --platform --no-const-enum --pipe=\"yarn transform:dts\"",
41
45
  "transform:dts": "jscodeshift -t transforms/dts.mjs index.d.ts",
@@ -53,10 +57,15 @@
53
57
  "vitest": "^3.0.5"
54
58
  },
55
59
  "optionalDependencies": {
56
- "es-git-darwin-x64": "0.1.0",
57
- "es-git-darwin-arm64": "0.1.0",
58
- "es-git-win32-x64-msvc": "0.1.0",
59
- "es-git-linux-x64-gnu": "0.1.0",
60
- "es-git-linux-x64-musl": "0.1.0"
60
+ "es-git-darwin-x64": "0.2.0",
61
+ "es-git-darwin-arm64": "0.2.0",
62
+ "es-git-win32-x64-msvc": "0.2.0",
63
+ "es-git-win32-arm64-msvc": "0.2.0",
64
+ "es-git-linux-x64-gnu": "0.2.0",
65
+ "es-git-linux-x64-musl": "0.2.0",
66
+ "es-git-android-arm64": "0.2.0",
67
+ "es-git-linux-arm64-gnu": "0.2.0",
68
+ "es-git-linux-arm64-musl": "0.2.0",
69
+ "es-git-android-arm-eabi": "0.2.0"
61
70
  }
62
71
  }