es-git 0.2.0-next.116 → 0.2.0-next.118
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 +78 -0
- package/package.json +11 -11
package/index.d.ts
CHANGED
|
@@ -3997,6 +3997,84 @@ export declare class Repository {
|
|
|
3997
3997
|
* staged deletes, tracked files, etc.
|
|
3998
3998
|
*/
|
|
3999
3999
|
diffTreeToWorkdirWithIndex(oldTree?: Tree | undefined | null, options?: DiffOptions | undefined | null): Diff
|
|
4000
|
+
/**
|
|
4001
|
+
* Add ignore rules for a repository.
|
|
4002
|
+
*
|
|
4003
|
+
* This adds ignore rules to the repository. The rules will be used
|
|
4004
|
+
* in addition to any existing ignore rules (such as .gitignore files).
|
|
4005
|
+
*
|
|
4006
|
+
* @category Repository/Methods
|
|
4007
|
+
* @signature
|
|
4008
|
+
* ```ts
|
|
4009
|
+
* class Repository {
|
|
4010
|
+
* addIgnoreRule(rules: string): boolean;
|
|
4011
|
+
* }
|
|
4012
|
+
* ```
|
|
4013
|
+
*
|
|
4014
|
+
* @param {string} rules - Rules to add, separated by newlines.
|
|
4015
|
+
*
|
|
4016
|
+
* @example
|
|
4017
|
+
* ```ts
|
|
4018
|
+
* import { openRepository } from 'es-git';
|
|
4019
|
+
*
|
|
4020
|
+
* const repo = await openRepository('./path/to/repo');
|
|
4021
|
+
* repo.addIgnoreRule("node_modules/");
|
|
4022
|
+
* ```
|
|
4023
|
+
*/
|
|
4024
|
+
addIgnoreRule(rules: string): void
|
|
4025
|
+
/**
|
|
4026
|
+
* Clear ignore rules that were explicitly added.
|
|
4027
|
+
*
|
|
4028
|
+
* Resets to the default internal ignore rules.
|
|
4029
|
+
* This will not turn off rules in .gitignore files that actually exist in the filesystem.
|
|
4030
|
+
* The default internal ignores ignore ".", ".." and ".git" entries.
|
|
4031
|
+
*
|
|
4032
|
+
* @category Repository/Methods
|
|
4033
|
+
* @signature
|
|
4034
|
+
* ```ts
|
|
4035
|
+
* class Repository {
|
|
4036
|
+
* clearIgnoreRules(): void;
|
|
4037
|
+
* }
|
|
4038
|
+
* ```
|
|
4039
|
+
*
|
|
4040
|
+
* @example
|
|
4041
|
+
* ```ts
|
|
4042
|
+
* import { openRepository } from 'es-git';
|
|
4043
|
+
*
|
|
4044
|
+
* const repo = await openRepository('./path/to/repo');
|
|
4045
|
+
* repo.addIgnoreRule("*.log");
|
|
4046
|
+
* // Later, clear all added rules
|
|
4047
|
+
* repo.clearIgnoreRules();
|
|
4048
|
+
* ```
|
|
4049
|
+
*/
|
|
4050
|
+
clearIgnoreRules(): void
|
|
4051
|
+
/**
|
|
4052
|
+
* Test if the ignore rules apply to a given path.
|
|
4053
|
+
*
|
|
4054
|
+
* This function checks the ignore rules to see if they would apply to the given file.
|
|
4055
|
+
* This indicates if the file would be ignored regardless of whether the file is already in the index or committed to the repository.
|
|
4056
|
+
*
|
|
4057
|
+
* @category Repository/Methods
|
|
4058
|
+
* @signature
|
|
4059
|
+
* ```ts
|
|
4060
|
+
* class Repository {
|
|
4061
|
+
* isPathIgnored(path: string): boolean;
|
|
4062
|
+
* }
|
|
4063
|
+
* ```
|
|
4064
|
+
*
|
|
4065
|
+
* @param {string} path - The path to check.
|
|
4066
|
+
* @returns {boolean} - True if the path is ignored, false otherwise.
|
|
4067
|
+
*
|
|
4068
|
+
* @example
|
|
4069
|
+
* ```ts
|
|
4070
|
+
* import { openRepository } from 'es-git';
|
|
4071
|
+
*
|
|
4072
|
+
* const repo = await openRepository('./path/to/repo');
|
|
4073
|
+
* const isIgnored = repo.isPathIgnored("node_modules/some-package");
|
|
4074
|
+
* console.log(`Path is ${isIgnored ? "ignored" : "not ignored"}`);
|
|
4075
|
+
* ```
|
|
4076
|
+
*/
|
|
4077
|
+
isPathIgnored(path: string): boolean
|
|
4000
4078
|
/**
|
|
4001
4079
|
* Get the Index file for this repository.
|
|
4002
4080
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-git",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.118+6fb9518",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"vitest": "^3.0.5"
|
|
58
58
|
},
|
|
59
59
|
"optionalDependencies": {
|
|
60
|
-
"es-git-darwin-x64": "0.2.0-next.
|
|
61
|
-
"es-git-darwin-arm64": "0.2.0-next.
|
|
62
|
-
"es-git-win32-x64-msvc": "0.2.0-next.
|
|
63
|
-
"es-git-win32-arm64-msvc": "0.2.0-next.
|
|
64
|
-
"es-git-linux-x64-gnu": "0.2.0-next.
|
|
65
|
-
"es-git-linux-x64-musl": "0.2.0-next.
|
|
66
|
-
"es-git-android-arm64": "0.2.0-next.
|
|
67
|
-
"es-git-linux-arm64-gnu": "0.2.0-next.
|
|
68
|
-
"es-git-linux-arm64-musl": "0.2.0-next.
|
|
69
|
-
"es-git-android-arm-eabi": "0.2.0-next.
|
|
60
|
+
"es-git-darwin-x64": "0.2.0-next.118+6fb9518",
|
|
61
|
+
"es-git-darwin-arm64": "0.2.0-next.118+6fb9518",
|
|
62
|
+
"es-git-win32-x64-msvc": "0.2.0-next.118+6fb9518",
|
|
63
|
+
"es-git-win32-arm64-msvc": "0.2.0-next.118+6fb9518",
|
|
64
|
+
"es-git-linux-x64-gnu": "0.2.0-next.118+6fb9518",
|
|
65
|
+
"es-git-linux-x64-musl": "0.2.0-next.118+6fb9518",
|
|
66
|
+
"es-git-android-arm64": "0.2.0-next.118+6fb9518",
|
|
67
|
+
"es-git-linux-arm64-gnu": "0.2.0-next.118+6fb9518",
|
|
68
|
+
"es-git-linux-arm64-musl": "0.2.0-next.118+6fb9518",
|
|
69
|
+
"es-git-android-arm-eabi": "0.2.0-next.118+6fb9518"
|
|
70
70
|
}
|
|
71
71
|
}
|