isomorphic-git 1.42.7 → 1.43.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 +12 -4
- package/index.d.cts +7 -2
- package/index.d.ts +7 -2
- package/index.js +12 -4
- package/index.umd.min.d.ts +7 -2
- package/index.umd.min.js +1 -1
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -10023,8 +10023,8 @@ function filterCapabilities(server, client) {
|
|
|
10023
10023
|
|
|
10024
10024
|
const pkg = {
|
|
10025
10025
|
name: 'isomorphic-git',
|
|
10026
|
-
version: '1.
|
|
10027
|
-
agent: 'git/isomorphic-git@1.
|
|
10026
|
+
version: '1.43.0',
|
|
10027
|
+
agent: 'git/isomorphic-git@1.43.0',
|
|
10028
10028
|
};
|
|
10029
10029
|
|
|
10030
10030
|
class FIFO {
|
|
@@ -15652,7 +15652,7 @@ async function readTree({
|
|
|
15652
15652
|
* @param {FsClient} args.fs - a file system client
|
|
15653
15653
|
* @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
|
|
15654
15654
|
* @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
|
|
15655
|
-
* @param {string} args.filepath - The path to the file to remove from the index
|
|
15655
|
+
* @param {string|string[]} args.filepath - The path to the file to remove from the index, or an array of paths
|
|
15656
15656
|
* @param {object} [args.cache] - a [cache](cache.md) object
|
|
15657
15657
|
*
|
|
15658
15658
|
* @returns {Promise<void>} Resolves successfully once the git index has been updated
|
|
@@ -15661,6 +15661,11 @@ async function readTree({
|
|
|
15661
15661
|
* await git.remove({ fs, dir: '/tutorial', filepath: 'README.md' })
|
|
15662
15662
|
* console.log('done')
|
|
15663
15663
|
*
|
|
15664
|
+
* @example
|
|
15665
|
+
* // remove several files from the index with a single write of the index
|
|
15666
|
+
* await git.remove({ fs, dir: '/tutorial', filepath: ['README.md', 'docs/old.md'] })
|
|
15667
|
+
* console.log('done')
|
|
15668
|
+
*
|
|
15664
15669
|
*/
|
|
15665
15670
|
async function remove({
|
|
15666
15671
|
fs: _fs,
|
|
@@ -15679,7 +15684,10 @@ async function remove({
|
|
|
15679
15684
|
await GitIndexManager.acquire(
|
|
15680
15685
|
{ fs: fsp, gitdir: updatedGitdir, cache },
|
|
15681
15686
|
async function (index) {
|
|
15682
|
-
|
|
15687
|
+
const filepaths = Array.isArray(filepath) ? filepath : [filepath];
|
|
15688
|
+
for (const currentFilepath of filepaths) {
|
|
15689
|
+
index.delete({ filepath: currentFilepath });
|
|
15690
|
+
}
|
|
15683
15691
|
}
|
|
15684
15692
|
);
|
|
15685
15693
|
} catch (err) {
|
package/index.d.cts
CHANGED
|
@@ -2903,7 +2903,7 @@ export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: {
|
|
|
2903
2903
|
* @param {FsClient} args.fs - a file system client
|
|
2904
2904
|
* @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
|
|
2905
2905
|
* @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
|
|
2906
|
-
* @param {string} args.filepath - The path to the file to remove from the index
|
|
2906
|
+
* @param {string|string[]} args.filepath - The path to the file to remove from the index, or an array of paths
|
|
2907
2907
|
* @param {object} [args.cache] - a [cache](cache.md) object
|
|
2908
2908
|
*
|
|
2909
2909
|
* @returns {Promise<void>} Resolves successfully once the git index has been updated
|
|
@@ -2912,12 +2912,17 @@ export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: {
|
|
|
2912
2912
|
* await git.remove({ fs, dir: '/tutorial', filepath: 'README.md' })
|
|
2913
2913
|
* console.log('done')
|
|
2914
2914
|
*
|
|
2915
|
+
* @example
|
|
2916
|
+
* // remove several files from the index with a single write of the index
|
|
2917
|
+
* await git.remove({ fs, dir: '/tutorial', filepath: ['README.md', 'docs/old.md'] })
|
|
2918
|
+
* console.log('done')
|
|
2919
|
+
*
|
|
2915
2920
|
*/
|
|
2916
2921
|
export function remove({ fs: _fs, dir, gitdir, filepath, cache, }: {
|
|
2917
2922
|
fs: FsClient;
|
|
2918
2923
|
dir?: string | undefined;
|
|
2919
2924
|
gitdir?: string | undefined;
|
|
2920
|
-
filepath: string;
|
|
2925
|
+
filepath: string | string[];
|
|
2921
2926
|
cache?: object;
|
|
2922
2927
|
}): Promise<void>;
|
|
2923
2928
|
/**
|
package/index.d.ts
CHANGED
|
@@ -2902,7 +2902,7 @@ export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: {
|
|
|
2902
2902
|
* @param {FsClient} args.fs - a file system client
|
|
2903
2903
|
* @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
|
|
2904
2904
|
* @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
|
|
2905
|
-
* @param {string} args.filepath - The path to the file to remove from the index
|
|
2905
|
+
* @param {string|string[]} args.filepath - The path to the file to remove from the index, or an array of paths
|
|
2906
2906
|
* @param {object} [args.cache] - a [cache](cache.md) object
|
|
2907
2907
|
*
|
|
2908
2908
|
* @returns {Promise<void>} Resolves successfully once the git index has been updated
|
|
@@ -2911,12 +2911,17 @@ export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: {
|
|
|
2911
2911
|
* await git.remove({ fs, dir: '/tutorial', filepath: 'README.md' })
|
|
2912
2912
|
* console.log('done')
|
|
2913
2913
|
*
|
|
2914
|
+
* @example
|
|
2915
|
+
* // remove several files from the index with a single write of the index
|
|
2916
|
+
* await git.remove({ fs, dir: '/tutorial', filepath: ['README.md', 'docs/old.md'] })
|
|
2917
|
+
* console.log('done')
|
|
2918
|
+
*
|
|
2914
2919
|
*/
|
|
2915
2920
|
export function remove({ fs: _fs, dir, gitdir, filepath, cache, }: {
|
|
2916
2921
|
fs: FsClient;
|
|
2917
2922
|
dir?: string | undefined;
|
|
2918
2923
|
gitdir?: string | undefined;
|
|
2919
|
-
filepath: string;
|
|
2924
|
+
filepath: string | string[];
|
|
2920
2925
|
cache?: object;
|
|
2921
2926
|
}): Promise<void>;
|
|
2922
2927
|
/**
|
package/index.js
CHANGED
|
@@ -10010,8 +10010,8 @@ function filterCapabilities(server, client) {
|
|
|
10010
10010
|
|
|
10011
10011
|
const pkg = {
|
|
10012
10012
|
name: 'isomorphic-git',
|
|
10013
|
-
version: '1.
|
|
10014
|
-
agent: 'git/isomorphic-git@1.
|
|
10013
|
+
version: '1.43.0',
|
|
10014
|
+
agent: 'git/isomorphic-git@1.43.0',
|
|
10015
10015
|
};
|
|
10016
10016
|
|
|
10017
10017
|
class FIFO {
|
|
@@ -15639,7 +15639,7 @@ async function readTree({
|
|
|
15639
15639
|
* @param {FsClient} args.fs - a file system client
|
|
15640
15640
|
* @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
|
|
15641
15641
|
* @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
|
|
15642
|
-
* @param {string} args.filepath - The path to the file to remove from the index
|
|
15642
|
+
* @param {string|string[]} args.filepath - The path to the file to remove from the index, or an array of paths
|
|
15643
15643
|
* @param {object} [args.cache] - a [cache](cache.md) object
|
|
15644
15644
|
*
|
|
15645
15645
|
* @returns {Promise<void>} Resolves successfully once the git index has been updated
|
|
@@ -15648,6 +15648,11 @@ async function readTree({
|
|
|
15648
15648
|
* await git.remove({ fs, dir: '/tutorial', filepath: 'README.md' })
|
|
15649
15649
|
* console.log('done')
|
|
15650
15650
|
*
|
|
15651
|
+
* @example
|
|
15652
|
+
* // remove several files from the index with a single write of the index
|
|
15653
|
+
* await git.remove({ fs, dir: '/tutorial', filepath: ['README.md', 'docs/old.md'] })
|
|
15654
|
+
* console.log('done')
|
|
15655
|
+
*
|
|
15651
15656
|
*/
|
|
15652
15657
|
async function remove({
|
|
15653
15658
|
fs: _fs,
|
|
@@ -15666,7 +15671,10 @@ async function remove({
|
|
|
15666
15671
|
await GitIndexManager.acquire(
|
|
15667
15672
|
{ fs: fsp, gitdir: updatedGitdir, cache },
|
|
15668
15673
|
async function (index) {
|
|
15669
|
-
|
|
15674
|
+
const filepaths = Array.isArray(filepath) ? filepath : [filepath];
|
|
15675
|
+
for (const currentFilepath of filepaths) {
|
|
15676
|
+
index.delete({ filepath: currentFilepath });
|
|
15677
|
+
}
|
|
15670
15678
|
}
|
|
15671
15679
|
);
|
|
15672
15680
|
} catch (err) {
|
package/index.umd.min.d.ts
CHANGED
|
@@ -2902,7 +2902,7 @@ export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: {
|
|
|
2902
2902
|
* @param {FsClient} args.fs - a file system client
|
|
2903
2903
|
* @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
|
|
2904
2904
|
* @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
|
|
2905
|
-
* @param {string} args.filepath - The path to the file to remove from the index
|
|
2905
|
+
* @param {string|string[]} args.filepath - The path to the file to remove from the index, or an array of paths
|
|
2906
2906
|
* @param {object} [args.cache] - a [cache](cache.md) object
|
|
2907
2907
|
*
|
|
2908
2908
|
* @returns {Promise<void>} Resolves successfully once the git index has been updated
|
|
@@ -2911,12 +2911,17 @@ export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: {
|
|
|
2911
2911
|
* await git.remove({ fs, dir: '/tutorial', filepath: 'README.md' })
|
|
2912
2912
|
* console.log('done')
|
|
2913
2913
|
*
|
|
2914
|
+
* @example
|
|
2915
|
+
* // remove several files from the index with a single write of the index
|
|
2916
|
+
* await git.remove({ fs, dir: '/tutorial', filepath: ['README.md', 'docs/old.md'] })
|
|
2917
|
+
* console.log('done')
|
|
2918
|
+
*
|
|
2914
2919
|
*/
|
|
2915
2920
|
export function remove({ fs: _fs, dir, gitdir, filepath, cache, }: {
|
|
2916
2921
|
fs: FsClient;
|
|
2917
2922
|
dir?: string | undefined;
|
|
2918
2923
|
gitdir?: string | undefined;
|
|
2919
|
-
filepath: string;
|
|
2924
|
+
filepath: string | string[];
|
|
2920
2925
|
cache?: object;
|
|
2921
2926
|
}): Promise<void>;
|
|
2922
2927
|
/**
|