isomorphic-git 1.38.10 → 1.40.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.
- package/index.cjs +83 -3
- package/index.d.cts +78 -58
- package/index.d.ts +78 -58
- package/index.js +83 -3
- package/index.umd.min.d.ts +78 -58
- package/index.umd.min.js +1 -1
- package/index.umd.min.js.map +1 -1
- package/managers/index.cjs +11 -0
- package/managers/index.d.cts +4 -0
- package/managers/index.d.ts +4 -0
- package/managers/index.js +11 -0
- package/package.json +1 -1
package/index.umd.min.d.ts
CHANGED
|
@@ -353,6 +353,10 @@ export type CommitObject = {
|
|
|
353
353
|
* an array of zero or more SHA-1 object ids
|
|
354
354
|
*/
|
|
355
355
|
parent: string[];
|
|
356
|
+
/**
|
|
357
|
+
* Changed files as `[newOid, oldOid, filepath]`; present when `log` is called with `includeChanges: true`.
|
|
358
|
+
*/
|
|
359
|
+
changes?: (string | null)[][] | undefined;
|
|
356
360
|
author: {
|
|
357
361
|
name: string;
|
|
358
362
|
email: string;
|
|
@@ -705,6 +709,7 @@ export var Errors: Readonly<{
|
|
|
705
709
|
CherryPickMergeCommitError: typeof CherryPickMergeCommitError;
|
|
706
710
|
CherryPickRootCommitError: typeof CherryPickRootCommitError;
|
|
707
711
|
CommitNotFetchedError: typeof CommitNotFetchedError;
|
|
712
|
+
EmptyCommitError: typeof EmptyCommitError;
|
|
708
713
|
EmptyServerResponseError: typeof EmptyServerResponseError;
|
|
709
714
|
FastForwardError: typeof FastForwardError;
|
|
710
715
|
GitPushError: typeof GitPushError;
|
|
@@ -1200,6 +1205,7 @@ export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess,
|
|
|
1200
1205
|
* @param {boolean} [args.amend = false] - If true, replaces the last commit pointed to by `ref` with a new commit.
|
|
1201
1206
|
* @param {boolean} [args.dryRun = false] - If true, simulates making a commit so you can test whether it would succeed. Implies `noUpdateBranch`.
|
|
1202
1207
|
* @param {boolean} [args.noUpdateBranch = false] - If true, does not update the branch pointer after creating the commit.
|
|
1208
|
+
* @param {boolean} [args.disallowEmpty = false] - If true, throws an error instead of creating a commit with no staged changes.
|
|
1203
1209
|
* @param {string} [args.ref] - The fully expanded name of the branch to commit to. Default is the current branch pointed to by HEAD. (TODO: fix it so it can expand branch names without throwing if the branch doesn't exist yet.)
|
|
1204
1210
|
* @param {string[]} [args.parent] - The SHA-1 object ids of the commits to use as parents. If not specified, the commit pointed to by `ref` is used.
|
|
1205
1211
|
* @param {string} [args.tree] - The SHA-1 object id of the tree to use. If not specified, a new tree object is created from the current git index.
|
|
@@ -1220,7 +1226,7 @@ export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess,
|
|
|
1220
1226
|
* console.log(sha)
|
|
1221
1227
|
*
|
|
1222
1228
|
*/
|
|
1223
|
-
export function commit({ fs: _fs, onSign, dir, gitdir, message, author, committer, signingKey, amend, dryRun, noUpdateBranch, ref, parent, tree, cache, }: {
|
|
1229
|
+
export function commit({ fs: _fs, onSign, dir, gitdir, message, author, committer, signingKey, amend, dryRun, noUpdateBranch, disallowEmpty, ref, parent, tree, cache, }: {
|
|
1224
1230
|
fs: FsClient;
|
|
1225
1231
|
onSign?: SignCallback | undefined;
|
|
1226
1232
|
dir?: string | undefined;
|
|
@@ -1242,6 +1248,7 @@ export function commit({ fs: _fs, onSign, dir, gitdir, message, author, committe
|
|
|
1242
1248
|
amend?: boolean | undefined;
|
|
1243
1249
|
dryRun?: boolean | undefined;
|
|
1244
1250
|
noUpdateBranch?: boolean | undefined;
|
|
1251
|
+
disallowEmpty?: boolean | undefined;
|
|
1245
1252
|
ref?: string | undefined;
|
|
1246
1253
|
parent?: string[] | undefined;
|
|
1247
1254
|
tree?: string | undefined;
|
|
@@ -2177,6 +2184,7 @@ export function listTags({ fs, dir, gitdir }: {
|
|
|
2177
2184
|
* @param {Date} [args.since] - Return history newer than the given date. Can be combined with `depth` to get whichever is shorter.
|
|
2178
2185
|
* @param {boolean=} [args.force=false] do not throw error if filepath is not exist (works only for a single file). defaults to false
|
|
2179
2186
|
* @param {boolean=} [args.follow=false] Continue listing the history of a file beyond renames (works only for a single file). defaults to false
|
|
2187
|
+
* @param {boolean=} [args.includeChanges=false] Include changed file object ids for each commit. Each tuple is `[newOid, oldOid, filepath]`; an added or removed file has a null old or new oid, respectively.
|
|
2180
2188
|
* @param {object} [args.cache] - a [cache](cache.md) object
|
|
2181
2189
|
*
|
|
2182
2190
|
* @returns {Promise<Array<ReadCommitResult>>} Resolves to an array of ReadCommitResult objects
|
|
@@ -2193,7 +2201,7 @@ export function listTags({ fs, dir, gitdir }: {
|
|
|
2193
2201
|
* console.log(commits)
|
|
2194
2202
|
*
|
|
2195
2203
|
*/
|
|
2196
|
-
export function log({ fs, dir, gitdir, filepath, ref, depth, since, force, follow, cache, }: {
|
|
2204
|
+
export function log({ fs, dir, gitdir, filepath, ref, depth, since, force, follow, includeChanges, cache, }: {
|
|
2197
2205
|
fs: FsClient;
|
|
2198
2206
|
dir?: string | undefined;
|
|
2199
2207
|
gitdir?: string | undefined;
|
|
@@ -2203,6 +2211,7 @@ export function log({ fs, dir, gitdir, filepath, ref, depth, since, force, follo
|
|
|
2203
2211
|
since?: Date | undefined;
|
|
2204
2212
|
force?: boolean | undefined;
|
|
2205
2213
|
follow?: boolean | undefined;
|
|
2214
|
+
includeChanges?: boolean | undefined;
|
|
2206
2215
|
cache?: object;
|
|
2207
2216
|
}): Promise<Array<ReadCommitResult>>;
|
|
2208
2217
|
/**
|
|
@@ -4028,6 +4037,16 @@ declare namespace CommitNotFetchedError {
|
|
|
4028
4037
|
let code_5: "CommitNotFetchedError";
|
|
4029
4038
|
export { code_5 as code };
|
|
4030
4039
|
}
|
|
4040
|
+
declare class EmptyCommitError extends BaseError {
|
|
4041
|
+
constructor();
|
|
4042
|
+
code: "EmptyCommitError";
|
|
4043
|
+
name: "EmptyCommitError";
|
|
4044
|
+
data: {};
|
|
4045
|
+
}
|
|
4046
|
+
declare namespace EmptyCommitError {
|
|
4047
|
+
let code_6: "EmptyCommitError";
|
|
4048
|
+
export { code_6 as code };
|
|
4049
|
+
}
|
|
4031
4050
|
declare class EmptyServerResponseError extends BaseError {
|
|
4032
4051
|
constructor();
|
|
4033
4052
|
code: "EmptyServerResponseError";
|
|
@@ -4035,8 +4054,8 @@ declare class EmptyServerResponseError extends BaseError {
|
|
|
4035
4054
|
data: {};
|
|
4036
4055
|
}
|
|
4037
4056
|
declare namespace EmptyServerResponseError {
|
|
4038
|
-
let
|
|
4039
|
-
export {
|
|
4057
|
+
let code_7: "EmptyServerResponseError";
|
|
4058
|
+
export { code_7 as code };
|
|
4040
4059
|
}
|
|
4041
4060
|
declare class FastForwardError extends BaseError {
|
|
4042
4061
|
constructor();
|
|
@@ -4045,8 +4064,8 @@ declare class FastForwardError extends BaseError {
|
|
|
4045
4064
|
data: {};
|
|
4046
4065
|
}
|
|
4047
4066
|
declare namespace FastForwardError {
|
|
4048
|
-
let
|
|
4049
|
-
export {
|
|
4067
|
+
let code_8: "FastForwardError";
|
|
4068
|
+
export { code_8 as code };
|
|
4050
4069
|
}
|
|
4051
4070
|
declare class GitPushError extends BaseError {
|
|
4052
4071
|
/**
|
|
@@ -4062,8 +4081,8 @@ declare class GitPushError extends BaseError {
|
|
|
4062
4081
|
};
|
|
4063
4082
|
}
|
|
4064
4083
|
declare namespace GitPushError {
|
|
4065
|
-
let
|
|
4066
|
-
export {
|
|
4084
|
+
let code_9: "GitPushError";
|
|
4085
|
+
export { code_9 as code };
|
|
4067
4086
|
}
|
|
4068
4087
|
declare class HttpError extends BaseError {
|
|
4069
4088
|
/**
|
|
@@ -4081,8 +4100,8 @@ declare class HttpError extends BaseError {
|
|
|
4081
4100
|
};
|
|
4082
4101
|
}
|
|
4083
4102
|
declare namespace HttpError {
|
|
4084
|
-
let
|
|
4085
|
-
export {
|
|
4103
|
+
let code_10: "HttpError";
|
|
4104
|
+
export { code_10 as code };
|
|
4086
4105
|
}
|
|
4087
4106
|
declare class InternalError extends BaseError {
|
|
4088
4107
|
/**
|
|
@@ -4096,8 +4115,8 @@ declare class InternalError extends BaseError {
|
|
|
4096
4115
|
};
|
|
4097
4116
|
}
|
|
4098
4117
|
declare namespace InternalError {
|
|
4099
|
-
let
|
|
4100
|
-
export {
|
|
4118
|
+
let code_11: "InternalError";
|
|
4119
|
+
export { code_11 as code };
|
|
4101
4120
|
}
|
|
4102
4121
|
declare class InvalidFilepathError extends BaseError {
|
|
4103
4122
|
/**
|
|
@@ -4111,8 +4130,8 @@ declare class InvalidFilepathError extends BaseError {
|
|
|
4111
4130
|
};
|
|
4112
4131
|
}
|
|
4113
4132
|
declare namespace InvalidFilepathError {
|
|
4114
|
-
let
|
|
4115
|
-
export {
|
|
4133
|
+
let code_12: "InvalidFilepathError";
|
|
4134
|
+
export { code_12 as code };
|
|
4116
4135
|
}
|
|
4117
4136
|
declare class InvalidOidError extends BaseError {
|
|
4118
4137
|
/**
|
|
@@ -4126,8 +4145,8 @@ declare class InvalidOidError extends BaseError {
|
|
|
4126
4145
|
};
|
|
4127
4146
|
}
|
|
4128
4147
|
declare namespace InvalidOidError {
|
|
4129
|
-
let
|
|
4130
|
-
export {
|
|
4148
|
+
let code_13: "InvalidOidError";
|
|
4149
|
+
export { code_13 as code };
|
|
4131
4150
|
}
|
|
4132
4151
|
declare class InvalidRefNameError extends BaseError {
|
|
4133
4152
|
/**
|
|
@@ -4144,8 +4163,8 @@ declare class InvalidRefNameError extends BaseError {
|
|
|
4144
4163
|
};
|
|
4145
4164
|
}
|
|
4146
4165
|
declare namespace InvalidRefNameError {
|
|
4147
|
-
let
|
|
4148
|
-
export {
|
|
4166
|
+
let code_14: "InvalidRefNameError";
|
|
4167
|
+
export { code_14 as code };
|
|
4149
4168
|
}
|
|
4150
4169
|
declare class MaxDepthError extends BaseError {
|
|
4151
4170
|
/**
|
|
@@ -4159,8 +4178,8 @@ declare class MaxDepthError extends BaseError {
|
|
|
4159
4178
|
};
|
|
4160
4179
|
}
|
|
4161
4180
|
declare namespace MaxDepthError {
|
|
4162
|
-
let
|
|
4163
|
-
export {
|
|
4181
|
+
let code_15: "MaxDepthError";
|
|
4182
|
+
export { code_15 as code };
|
|
4164
4183
|
}
|
|
4165
4184
|
declare class MergeNotSupportedError extends BaseError {
|
|
4166
4185
|
constructor();
|
|
@@ -4169,8 +4188,8 @@ declare class MergeNotSupportedError extends BaseError {
|
|
|
4169
4188
|
data: {};
|
|
4170
4189
|
}
|
|
4171
4190
|
declare namespace MergeNotSupportedError {
|
|
4172
|
-
let
|
|
4173
|
-
export {
|
|
4191
|
+
let code_16: "MergeNotSupportedError";
|
|
4192
|
+
export { code_16 as code };
|
|
4174
4193
|
}
|
|
4175
4194
|
declare class MergeConflictError extends BaseError {
|
|
4176
4195
|
/**
|
|
@@ -4190,8 +4209,8 @@ declare class MergeConflictError extends BaseError {
|
|
|
4190
4209
|
};
|
|
4191
4210
|
}
|
|
4192
4211
|
declare namespace MergeConflictError {
|
|
4193
|
-
let
|
|
4194
|
-
export {
|
|
4212
|
+
let code_17: "MergeConflictError";
|
|
4213
|
+
export { code_17 as code };
|
|
4195
4214
|
}
|
|
4196
4215
|
declare class MissingNameError extends BaseError {
|
|
4197
4216
|
/**
|
|
@@ -4205,8 +4224,8 @@ declare class MissingNameError extends BaseError {
|
|
|
4205
4224
|
};
|
|
4206
4225
|
}
|
|
4207
4226
|
declare namespace MissingNameError {
|
|
4208
|
-
let
|
|
4209
|
-
export {
|
|
4227
|
+
let code_18: "MissingNameError";
|
|
4228
|
+
export { code_18 as code };
|
|
4210
4229
|
}
|
|
4211
4230
|
declare class MissingParameterError extends BaseError {
|
|
4212
4231
|
/**
|
|
@@ -4220,8 +4239,8 @@ declare class MissingParameterError extends BaseError {
|
|
|
4220
4239
|
};
|
|
4221
4240
|
}
|
|
4222
4241
|
declare namespace MissingParameterError {
|
|
4223
|
-
let
|
|
4224
|
-
export {
|
|
4242
|
+
let code_19: "MissingParameterError";
|
|
4243
|
+
export { code_19 as code };
|
|
4225
4244
|
}
|
|
4226
4245
|
declare class MultipleGitError extends BaseError {
|
|
4227
4246
|
/**
|
|
@@ -4237,8 +4256,8 @@ declare class MultipleGitError extends BaseError {
|
|
|
4237
4256
|
errors: Error[];
|
|
4238
4257
|
}
|
|
4239
4258
|
declare namespace MultipleGitError {
|
|
4240
|
-
let
|
|
4241
|
-
export {
|
|
4259
|
+
let code_20: "MultipleGitError";
|
|
4260
|
+
export { code_20 as code };
|
|
4242
4261
|
}
|
|
4243
4262
|
declare class NoRefspecError extends BaseError {
|
|
4244
4263
|
/**
|
|
@@ -4252,8 +4271,8 @@ declare class NoRefspecError extends BaseError {
|
|
|
4252
4271
|
};
|
|
4253
4272
|
}
|
|
4254
4273
|
declare namespace NoRefspecError {
|
|
4255
|
-
let
|
|
4256
|
-
export {
|
|
4274
|
+
let code_21: "NoRefspecError";
|
|
4275
|
+
export { code_21 as code };
|
|
4257
4276
|
}
|
|
4258
4277
|
declare class NotFoundError extends BaseError {
|
|
4259
4278
|
/**
|
|
@@ -4267,8 +4286,8 @@ declare class NotFoundError extends BaseError {
|
|
|
4267
4286
|
};
|
|
4268
4287
|
}
|
|
4269
4288
|
declare namespace NotFoundError {
|
|
4270
|
-
let
|
|
4271
|
-
export {
|
|
4289
|
+
let code_22: "NotFoundError";
|
|
4290
|
+
export { code_22 as code };
|
|
4272
4291
|
}
|
|
4273
4292
|
declare class ObjectTypeError extends BaseError {
|
|
4274
4293
|
/**
|
|
@@ -4288,8 +4307,8 @@ declare class ObjectTypeError extends BaseError {
|
|
|
4288
4307
|
};
|
|
4289
4308
|
}
|
|
4290
4309
|
declare namespace ObjectTypeError {
|
|
4291
|
-
let
|
|
4292
|
-
export {
|
|
4310
|
+
let code_23: "ObjectTypeError";
|
|
4311
|
+
export { code_23 as code };
|
|
4293
4312
|
}
|
|
4294
4313
|
declare class ParseError extends BaseError {
|
|
4295
4314
|
/**
|
|
@@ -4305,8 +4324,8 @@ declare class ParseError extends BaseError {
|
|
|
4305
4324
|
};
|
|
4306
4325
|
}
|
|
4307
4326
|
declare namespace ParseError {
|
|
4308
|
-
let
|
|
4309
|
-
export {
|
|
4327
|
+
let code_24: "ParseError";
|
|
4328
|
+
export { code_24 as code };
|
|
4310
4329
|
}
|
|
4311
4330
|
declare class PushRejectedError extends BaseError {
|
|
4312
4331
|
/**
|
|
@@ -4320,8 +4339,8 @@ declare class PushRejectedError extends BaseError {
|
|
|
4320
4339
|
};
|
|
4321
4340
|
}
|
|
4322
4341
|
declare namespace PushRejectedError {
|
|
4323
|
-
let
|
|
4324
|
-
export {
|
|
4342
|
+
let code_25: "PushRejectedError";
|
|
4343
|
+
export { code_25 as code };
|
|
4325
4344
|
}
|
|
4326
4345
|
declare class RemoteCapabilityError extends BaseError {
|
|
4327
4346
|
/**
|
|
@@ -4337,8 +4356,8 @@ declare class RemoteCapabilityError extends BaseError {
|
|
|
4337
4356
|
};
|
|
4338
4357
|
}
|
|
4339
4358
|
declare namespace RemoteCapabilityError {
|
|
4340
|
-
let
|
|
4341
|
-
export {
|
|
4359
|
+
let code_26: "RemoteCapabilityError";
|
|
4360
|
+
export { code_26 as code };
|
|
4342
4361
|
}
|
|
4343
4362
|
declare class SmartHttpError extends BaseError {
|
|
4344
4363
|
/**
|
|
@@ -4354,8 +4373,8 @@ declare class SmartHttpError extends BaseError {
|
|
|
4354
4373
|
};
|
|
4355
4374
|
}
|
|
4356
4375
|
declare namespace SmartHttpError {
|
|
4357
|
-
let
|
|
4358
|
-
export {
|
|
4376
|
+
let code_27: "SmartHttpError";
|
|
4377
|
+
export { code_27 as code };
|
|
4359
4378
|
}
|
|
4360
4379
|
declare class UnknownTransportError extends BaseError {
|
|
4361
4380
|
/**
|
|
@@ -4373,8 +4392,8 @@ declare class UnknownTransportError extends BaseError {
|
|
|
4373
4392
|
};
|
|
4374
4393
|
}
|
|
4375
4394
|
declare namespace UnknownTransportError {
|
|
4376
|
-
let
|
|
4377
|
-
export {
|
|
4395
|
+
let code_28: "UnknownTransportError";
|
|
4396
|
+
export { code_28 as code };
|
|
4378
4397
|
}
|
|
4379
4398
|
declare class UnsafeFilepathError extends BaseError {
|
|
4380
4399
|
/**
|
|
@@ -4388,8 +4407,8 @@ declare class UnsafeFilepathError extends BaseError {
|
|
|
4388
4407
|
};
|
|
4389
4408
|
}
|
|
4390
4409
|
declare namespace UnsafeFilepathError {
|
|
4391
|
-
let
|
|
4392
|
-
export {
|
|
4410
|
+
let code_29: "UnsafeFilepathError";
|
|
4411
|
+
export { code_29 as code };
|
|
4393
4412
|
}
|
|
4394
4413
|
declare class UrlParseError extends BaseError {
|
|
4395
4414
|
/**
|
|
@@ -4403,8 +4422,8 @@ declare class UrlParseError extends BaseError {
|
|
|
4403
4422
|
};
|
|
4404
4423
|
}
|
|
4405
4424
|
declare namespace UrlParseError {
|
|
4406
|
-
let
|
|
4407
|
-
export {
|
|
4425
|
+
let code_30: "UrlParseError";
|
|
4426
|
+
export { code_30 as code };
|
|
4408
4427
|
}
|
|
4409
4428
|
declare class UserCanceledError extends BaseError {
|
|
4410
4429
|
constructor();
|
|
@@ -4413,8 +4432,8 @@ declare class UserCanceledError extends BaseError {
|
|
|
4413
4432
|
data: {};
|
|
4414
4433
|
}
|
|
4415
4434
|
declare namespace UserCanceledError {
|
|
4416
|
-
let
|
|
4417
|
-
export {
|
|
4435
|
+
let code_31: "UserCanceledError";
|
|
4436
|
+
export { code_31 as code };
|
|
4418
4437
|
}
|
|
4419
4438
|
declare class UnmergedPathsError extends BaseError {
|
|
4420
4439
|
/**
|
|
@@ -4428,8 +4447,8 @@ declare class UnmergedPathsError extends BaseError {
|
|
|
4428
4447
|
};
|
|
4429
4448
|
}
|
|
4430
4449
|
declare namespace UnmergedPathsError {
|
|
4431
|
-
let
|
|
4432
|
-
export {
|
|
4450
|
+
let code_32: "UnmergedPathsError";
|
|
4451
|
+
export { code_32 as code };
|
|
4433
4452
|
}
|
|
4434
4453
|
declare class IndexResetError extends BaseError {
|
|
4435
4454
|
/**
|
|
@@ -4443,8 +4462,8 @@ declare class IndexResetError extends BaseError {
|
|
|
4443
4462
|
};
|
|
4444
4463
|
}
|
|
4445
4464
|
declare namespace IndexResetError {
|
|
4446
|
-
let
|
|
4447
|
-
export {
|
|
4465
|
+
let code_33: "IndexResetError";
|
|
4466
|
+
export { code_33 as code };
|
|
4448
4467
|
}
|
|
4449
4468
|
declare class NoCommitError extends BaseError {
|
|
4450
4469
|
/**
|
|
@@ -4458,8 +4477,8 @@ declare class NoCommitError extends BaseError {
|
|
|
4458
4477
|
};
|
|
4459
4478
|
}
|
|
4460
4479
|
declare namespace NoCommitError {
|
|
4461
|
-
let
|
|
4462
|
-
export {
|
|
4480
|
+
let code_34: "NoCommitError";
|
|
4481
|
+
export { code_34 as code };
|
|
4463
4482
|
}
|
|
4464
4483
|
/**
|
|
4465
4484
|
* @typedef {Object} GitProgressEvent
|
|
@@ -4507,6 +4526,7 @@ declare namespace NoCommitError {
|
|
|
4507
4526
|
* @property {string} message Commit message
|
|
4508
4527
|
* @property {string} tree SHA-1 object id of corresponding file tree
|
|
4509
4528
|
* @property {string[]} parent an array of zero or more SHA-1 object ids
|
|
4529
|
+
* @property {Array.<Array.<string|null>>} [changes] Changed files as `[newOid, oldOid, filepath]`; present when `log` is called with `includeChanges: true`.
|
|
4510
4530
|
* @property {Object} author
|
|
4511
4531
|
* @property {string} author.name The author's name
|
|
4512
4532
|
* @property {string} author.email The author's email
|