@sequencemedia/hooks 1.0.299 → 1.0.301
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/.editorconfig +1 -1
- package/hooks.d.ts +22 -0
- package/package.json +1 -1
- package/src/post-commit.mjs +4 -1
package/.editorconfig
CHANGED
package/hooks.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare module '@sequencemedia/hooks' {
|
|
2
|
+
export function postCommit(): string
|
|
3
|
+
export const common = {
|
|
4
|
+
OPTIONS: {
|
|
5
|
+
maxBuffer: number
|
|
6
|
+
},
|
|
7
|
+
BRANCH: string,
|
|
8
|
+
PACKAGE_VERSION_CHANGES: RegExp,
|
|
9
|
+
HAS_STAGED_CHANGES: RegExp,
|
|
10
|
+
NOT_STAGED_CHANGES: RegExp,
|
|
11
|
+
trim (): string {},
|
|
12
|
+
use (): Promise<void> {},
|
|
13
|
+
getGitRemoteShowOriginHeadBranch (): Promise<void> {},
|
|
14
|
+
hasGitDiffHeadPackageVersionChanges (): Promise<void> {},
|
|
15
|
+
notGitDiffHeadPackageVersionChanges (): Promise<void> {},
|
|
16
|
+
hasStagedChanges (): Promise<void> {},
|
|
17
|
+
notStagedChanges (): Promise<void> {},
|
|
18
|
+
addPackageVersionChanges (): Promise<void> {},
|
|
19
|
+
patchPackageVersion (): Promise<void> {},
|
|
20
|
+
gitTag (a:string, m?:string): Promise<void>
|
|
21
|
+
}
|
|
22
|
+
}
|
package/package.json
CHANGED
package/src/post-commit.mjs
CHANGED
|
@@ -21,7 +21,10 @@ export default async function postCommit () {
|
|
|
21
21
|
if (await hasGitDiffHeadPackageVersionChanges(await getGitRemoteShowOriginHeadBranch())) return
|
|
22
22
|
|
|
23
23
|
await patchPackageVersion()
|
|
24
|
-
} catch ({
|
|
24
|
+
} catch ({
|
|
25
|
+
code = 'NONE',
|
|
26
|
+
message = 'No error message defined'
|
|
27
|
+
}) {
|
|
25
28
|
error({ code, message })
|
|
26
29
|
}
|
|
27
30
|
}
|