bun-git-hooks 0.2.13 → 0.2.14
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/dist/bin/cli.js +5046 -621
- package/dist/bin/git-hooks.d.ts +2 -2
- package/dist/bin/types.d.ts +7 -3
- package/dist/git-hooks.d.ts +2 -2
- package/dist/index.js +4499 -74
- package/dist/types.d.ts +7 -3
- package/package.json +4 -3
package/dist/bin/git-hooks.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare const VALID_GIT_HOOKS: Array<
|
|
|
31
31
|
'p4-pre-submit' |
|
|
32
32
|
'post-index-change'
|
|
33
33
|
>;
|
|
34
|
-
export declare const VALID_OPTIONS: Array<'preserveUnused'>;
|
|
34
|
+
export declare const VALID_OPTIONS: Array<'preserveUnused' | 'verbose' | 'staged-lint'>;
|
|
35
35
|
export declare const PREPEND_SCRIPT: unknown;
|
|
36
36
|
export declare function getGitProjectRoot(directory: string): string | undefined;
|
|
37
37
|
export declare function checkBunGitHooksInDependencies(projectRootPath: string): boolean;
|
|
@@ -42,7 +42,7 @@ declare function matchesGlob(file: string, pattern: string): boolean;
|
|
|
42
42
|
declare function filterFilesByPattern(files: string[], pattern: string): string[];
|
|
43
43
|
declare function runCommandOnStagedFiles(command: string | string[], files: string[], projectRoot: string, verbose): Promise<boolean>;
|
|
44
44
|
declare function processStagedLint(stagedLintConfig: StagedLintConfig, projectRoot: string, verbose): Promise<boolean>;
|
|
45
|
-
declare function _setHook(hook: string, commandOrConfig: string | { stagedLint?: StagedLintConfig }, projectRoot: string): void;
|
|
45
|
+
declare function _setHook(hook: string, commandOrConfig: string | { stagedLint?: StagedLintConfig; 'staged-lint'?: StagedLintConfig }, projectRoot: string): void;
|
|
46
46
|
export declare function removeHooks(projectRoot: string, verbose): void;
|
|
47
47
|
declare function _removeHook(hook: string, projectRoot, verbose): void;
|
|
48
48
|
export declare function runStagedLint(hook: string): Promise<boolean>;
|
package/dist/bin/types.d.ts
CHANGED
|
@@ -5,10 +5,14 @@ export interface StagedLintConfig {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export type GitHooksConfig = {
|
|
8
|
-
[K in typeof VALID_GIT_HOOKS[number]]?: string | {
|
|
8
|
+
[K in typeof VALID_GIT_HOOKS[number]]?: string | {
|
|
9
|
+
'stagedLint'?: StagedLintConfig
|
|
10
|
+
'staged-lint'?: StagedLintConfig
|
|
11
|
+
}
|
|
9
12
|
} & {
|
|
10
|
-
preserveUnused?: boolean | typeof VALID_GIT_HOOKS[number][]
|
|
11
|
-
verbose?: boolean
|
|
13
|
+
'preserveUnused'?: boolean | typeof VALID_GIT_HOOKS[number][]
|
|
14
|
+
'verbose'?: boolean
|
|
15
|
+
'staged-lint'?: StagedLintConfig
|
|
12
16
|
}
|
|
13
17
|
|
|
14
18
|
export interface SetHooksFromConfigOptions {
|
package/dist/git-hooks.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare const VALID_GIT_HOOKS: Array<
|
|
|
31
31
|
'p4-pre-submit' |
|
|
32
32
|
'post-index-change'
|
|
33
33
|
>;
|
|
34
|
-
export declare const VALID_OPTIONS: Array<'preserveUnused'>;
|
|
34
|
+
export declare const VALID_OPTIONS: Array<'preserveUnused' | 'verbose' | 'staged-lint'>;
|
|
35
35
|
export declare const PREPEND_SCRIPT: unknown;
|
|
36
36
|
export declare function getGitProjectRoot(directory: string): string | undefined;
|
|
37
37
|
export declare function checkBunGitHooksInDependencies(projectRootPath: string): boolean;
|
|
@@ -42,7 +42,7 @@ declare function matchesGlob(file: string, pattern: string): boolean;
|
|
|
42
42
|
declare function filterFilesByPattern(files: string[], pattern: string): string[];
|
|
43
43
|
declare function runCommandOnStagedFiles(command: string | string[], files: string[], projectRoot: string, verbose): Promise<boolean>;
|
|
44
44
|
declare function processStagedLint(stagedLintConfig: StagedLintConfig, projectRoot: string, verbose): Promise<boolean>;
|
|
45
|
-
declare function _setHook(hook: string, commandOrConfig: string | { stagedLint?: StagedLintConfig }, projectRoot: string): void;
|
|
45
|
+
declare function _setHook(hook: string, commandOrConfig: string | { stagedLint?: StagedLintConfig; 'staged-lint'?: StagedLintConfig }, projectRoot: string): void;
|
|
46
46
|
export declare function removeHooks(projectRoot: string, verbose): void;
|
|
47
47
|
declare function _removeHook(hook: string, projectRoot, verbose): void;
|
|
48
48
|
export declare function runStagedLint(hook: string): Promise<boolean>;
|