@storm-software/git-tools 2.89.25 → 2.89.29
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 +1 -1
- package/bin/{chunk-FJHQPSYU.js → chunk-F5UAXEVI.js} +25 -25
- package/bin/{chunk-WIDIIDDQ.cjs → chunk-NTA62AN7.cjs} +25 -25
- package/bin/git.cjs +116 -130
- package/bin/git.js +65 -79
- package/bin/post-checkout.cjs +9 -9
- package/bin/post-checkout.js +1 -1
- package/bin/post-commit.cjs +9 -9
- package/bin/post-commit.js +1 -1
- package/bin/post-merge.cjs +9 -9
- package/bin/post-merge.js +1 -1
- package/bin/pre-commit.cjs +9 -9
- package/bin/pre-commit.js +1 -1
- package/bin/pre-install.cjs +9 -9
- package/bin/pre-install.js +1 -1
- package/bin/pre-push.cjs +13 -13
- package/bin/pre-push.js +1 -1
- package/bin/prepare.cjs +7 -7
- package/bin/prepare.js +1 -1
- package/bin/version-warning.cjs +5 -5
- package/bin/version-warning.js +1 -1
- package/dist/lefthook/config.yml +4 -8
- package/dist/lint-staged/config.cjs +43 -43
- package/package.json +1 -1
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
const isWin = process.platform === "win32";
|
|
2
2
|
|
|
3
|
-
const escape = input => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
const escape = (input) => {
|
|
4
|
+
return input
|
|
5
|
+
.map(function (s) {
|
|
6
|
+
if (s && typeof s === "object") {
|
|
7
|
+
return s.op.replace(/(.)/g, "\\$1");
|
|
8
|
+
}
|
|
9
|
+
if (/["\s]/.test(s) && !/'/.test(s)) {
|
|
10
|
+
return "'" + s.replace(/(['\\])/g, "\\$1") + "'";
|
|
11
|
+
}
|
|
12
|
+
if (/["'\s]/.test(s)) {
|
|
13
|
+
return '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"';
|
|
14
|
+
}
|
|
15
|
+
return String(s).replace(
|
|
16
|
+
/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,
|
|
17
|
+
"$1\\$2",
|
|
18
|
+
);
|
|
19
|
+
})
|
|
20
|
+
.join(" ")
|
|
21
|
+
.replace(/\\@/g, "@");
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
module.exports = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
"**/*.*": (fileNames) => {
|
|
26
|
+
const escapedFileNames = fileNames
|
|
27
|
+
.map((filename) => (isWin ? filename : escape(filename)))
|
|
28
|
+
.join(" ");
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
"**/*.{js,jsx,ts,tsx,json,css,scss,md,mdx,yml,yaml,graphql,html,prisma,acid,acidic}":
|
|
33
|
-
fileNames => {
|
|
34
|
-
const escapedFileNames = fileNames
|
|
35
|
-
.map(filename => (isWin ? filename : escape(filename)))
|
|
36
|
-
.join(" ");
|
|
37
|
-
|
|
38
|
-
return [
|
|
39
|
-
"pnpm lint",
|
|
40
|
-
`prettier --with-node-modules --ignore-path @storm-software/git-tools/prettier/.prettierignore_staged --write ${escapedFileNames}`,
|
|
41
|
-
"pnpm nx format:write --uncommitted",
|
|
42
|
-
`git add ${escapedFileNames}`
|
|
43
|
-
];
|
|
30
|
+
return ["pnpm build", `git add ${escapedFileNames}`];
|
|
44
31
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
"**/*.{js,jsx,ts,tsx,json,css,scss,md,mdx,yml,yaml,graphql,html,prisma,acid,acidic}":
|
|
33
|
+
(fileNames) => {
|
|
34
|
+
const escapedFileNames = fileNames
|
|
35
|
+
.map((filename) => (isWin ? filename : escape(filename)))
|
|
36
|
+
.join(" ");
|
|
37
|
+
|
|
38
|
+
return [
|
|
39
|
+
"pnpm lint",
|
|
40
|
+
`prettier --with-node-modules --ignore-path @storm-software/git-tools/prettier/.prettierignore_staged --write ${escapedFileNames}`,
|
|
41
|
+
"pnpm nx format:write --uncommitted",
|
|
42
|
+
`git add ${escapedFileNames}`,
|
|
43
|
+
];
|
|
44
|
+
},
|
|
45
|
+
"**/README.md": (fileNames) => {
|
|
46
|
+
const escapedFileNames = fileNames
|
|
47
|
+
.map((filename) => (isWin ? filename : escape(filename)))
|
|
48
|
+
.join(" ");
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
return ["pnpm readme-gen", `git add ${escapedFileNames}`];
|
|
51
|
+
},
|
|
52
52
|
};
|