isomorphic-git 1.21.0 → 1.23.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/README.md +12 -1
- package/browser-tests.json +3 -5
- package/index.cjs +736 -492
- package/index.d.ts +64 -0
- package/index.js +736 -493
- package/index.umd.min.d.ts +64 -0
- package/index.umd.min.js +2 -2
- package/index.umd.min.js.map +1 -1
- package/package.json +3 -3
- package/size_report.html +1 -1
package/index.d.ts
CHANGED
|
@@ -648,6 +648,7 @@ declare namespace index {
|
|
|
648
648
|
export { TREE };
|
|
649
649
|
export { WORKDIR };
|
|
650
650
|
export { add };
|
|
651
|
+
export { abortMerge };
|
|
651
652
|
export { addNote };
|
|
652
653
|
export { addRemote };
|
|
653
654
|
export { annotatedTag };
|
|
@@ -742,6 +743,8 @@ export var Errors: Readonly<{
|
|
|
742
743
|
UnsafeFilepathError: typeof UnsafeFilepathError;
|
|
743
744
|
UrlParseError: typeof UrlParseError;
|
|
744
745
|
UserCanceledError: typeof UserCanceledError;
|
|
746
|
+
UnmergedPathsError: typeof UnmergedPathsError;
|
|
747
|
+
IndexResetError: typeof IndexResetError;
|
|
745
748
|
}>;
|
|
746
749
|
/**
|
|
747
750
|
* @returns {Walker}
|
|
@@ -759,6 +762,37 @@ export function TREE({ ref }?: {
|
|
|
759
762
|
* @returns {Walker}
|
|
760
763
|
*/
|
|
761
764
|
export function WORKDIR(): Walker;
|
|
765
|
+
/**
|
|
766
|
+
* Abort a merge in progress.
|
|
767
|
+
*
|
|
768
|
+
* Based on the behavior of git reset --merge, i.e. "Resets the index and updates the files in the working tree that are different between <commit> and HEAD, but keeps those which are different between the index and working tree (i.e. which have changes which have not been added). If a file that is different between <commit> and the index has unstaged changes, reset is aborted."
|
|
769
|
+
*
|
|
770
|
+
* Essentially, abortMerge will reset any files affected by merge conflicts to their last known good version at HEAD.
|
|
771
|
+
* Any unstaged changes are saved and any staged changes are reset as well.
|
|
772
|
+
*
|
|
773
|
+
* NOTE: The behavior of this command differs slightly from canonical git in that an error will be thrown if a file exists in the index and nowhere else.
|
|
774
|
+
* Canonical git will reset the file and continue aborting the merge in this case.
|
|
775
|
+
*
|
|
776
|
+
* **WARNING:** Running git merge with non-trivial uncommitted changes is discouraged: while possible, it may leave you in a state that is hard to back out of in the case of a conflict.
|
|
777
|
+
* If there were uncommitted changes when the merge started (and especially if those changes were further modified after the merge was started), `git.abortMerge` will in some cases be unable to reconstruct the original (pre-merge) changes.
|
|
778
|
+
*
|
|
779
|
+
* @param {object} args
|
|
780
|
+
* @param {FsClient} args.fs - a file system implementation
|
|
781
|
+
* @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path
|
|
782
|
+
* @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
|
|
783
|
+
* @param {string} [args.commit='HEAD'] - commit to reset the index and worktree to, defaults to HEAD
|
|
784
|
+
* @param {object} [args.cache] - a [cache](cache.md) object
|
|
785
|
+
*
|
|
786
|
+
* @returns {Promise<void>} Resolves successfully once the git index has been updated
|
|
787
|
+
*
|
|
788
|
+
*/
|
|
789
|
+
export function abortMerge({ fs: _fs, dir, gitdir, commit, cache, }: {
|
|
790
|
+
fs: CallbackFsClient | PromiseFsClient;
|
|
791
|
+
dir: string;
|
|
792
|
+
gitdir?: string;
|
|
793
|
+
commit?: string;
|
|
794
|
+
cache?: any;
|
|
795
|
+
}): Promise<void>;
|
|
762
796
|
/**
|
|
763
797
|
* Add a file to the git index (aka staging area)
|
|
764
798
|
*
|
|
@@ -4176,6 +4210,36 @@ declare namespace UserCanceledError {
|
|
|
4176
4210
|
const code_28: 'UserCanceledError';
|
|
4177
4211
|
export { code_28 as code };
|
|
4178
4212
|
}
|
|
4213
|
+
declare class UnmergedPathsError extends BaseError {
|
|
4214
|
+
/**
|
|
4215
|
+
* @param {Array<string>} filepaths
|
|
4216
|
+
*/
|
|
4217
|
+
constructor(filepaths: string[]);
|
|
4218
|
+
code: "UnmergedPathsError";
|
|
4219
|
+
name: "UnmergedPathsError";
|
|
4220
|
+
data: {
|
|
4221
|
+
filepaths: string[];
|
|
4222
|
+
};
|
|
4223
|
+
}
|
|
4224
|
+
declare namespace UnmergedPathsError {
|
|
4225
|
+
const code_29: 'UnmergedPathsError';
|
|
4226
|
+
export { code_29 as code };
|
|
4227
|
+
}
|
|
4228
|
+
declare class IndexResetError extends BaseError {
|
|
4229
|
+
/**
|
|
4230
|
+
* @param {Array<string>} filepaths
|
|
4231
|
+
*/
|
|
4232
|
+
constructor(filepath: any);
|
|
4233
|
+
code: "IndexResetError";
|
|
4234
|
+
name: "IndexResetError";
|
|
4235
|
+
data: {
|
|
4236
|
+
filepath: any;
|
|
4237
|
+
};
|
|
4238
|
+
}
|
|
4239
|
+
declare namespace IndexResetError {
|
|
4240
|
+
const code_30: 'IndexResetError';
|
|
4241
|
+
export { code_30 as code };
|
|
4242
|
+
}
|
|
4179
4243
|
/**
|
|
4180
4244
|
* @typedef {Object} GitProgressEvent
|
|
4181
4245
|
* @property {string} phase
|