@cluerise/tools 5.3.9 → 5.3.10
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/configs/.prettierignore +3 -1
- package/dist/configs/_gitignore +4 -0
- package/dist/configs/eslint.config.js +2 -0
- package/dist/scripts/create-commit-message/main.js +15 -7
- package/dist/scripts/format-commit-message/main.js +15 -7
- package/dist/scripts/lint/main.js +15 -7
- package/package.json +11 -11
package/dist/configs/_gitignore
CHANGED
|
@@ -363,6 +363,7 @@ export default defineConfig([
|
|
|
363
363
|
// Build
|
|
364
364
|
'**/build/',
|
|
365
365
|
'**/dist/',
|
|
366
|
+
'packages/*/link/',
|
|
366
367
|
|
|
367
368
|
// Cloudflare
|
|
368
369
|
'../.wrangler/',
|
|
@@ -400,6 +401,7 @@ export default defineConfig([
|
|
|
400
401
|
|
|
401
402
|
// I18n
|
|
402
403
|
'**/*.po',
|
|
404
|
+
'packages/**/catalogs/*.ts',
|
|
403
405
|
|
|
404
406
|
// Images
|
|
405
407
|
'**/*.avif',
|
|
@@ -96,22 +96,30 @@ class CommitLinter {
|
|
|
96
96
|
const { status } = ChildProcess.spawnSync("commitlint", args, { stdio: "inherit" });
|
|
97
97
|
return status ?? 0;
|
|
98
98
|
}
|
|
99
|
-
#
|
|
99
|
+
#getRuleValues(ruleName) {
|
|
100
100
|
const rule = this.#config.rules[ruleName];
|
|
101
101
|
if (!rule) {
|
|
102
|
-
return
|
|
102
|
+
return null;
|
|
103
103
|
}
|
|
104
104
|
const [_severity, _condition, values] = rule;
|
|
105
|
+
return values ?? null;
|
|
106
|
+
}
|
|
107
|
+
#isValidType(type) {
|
|
108
|
+
const values = this.#getRuleValues("type-enum");
|
|
105
109
|
if (!values) {
|
|
106
110
|
return true;
|
|
107
111
|
}
|
|
108
|
-
return values.includes(
|
|
109
|
-
}
|
|
110
|
-
#isValidType(type) {
|
|
111
|
-
return this.#isValidEnumValue("type-enum", type);
|
|
112
|
+
return values.includes(type);
|
|
112
113
|
}
|
|
113
114
|
#isValidScope(scope) {
|
|
114
|
-
|
|
115
|
+
const values = this.#getRuleValues("scope-enum");
|
|
116
|
+
if (!values) {
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
if ("scopes" in values) {
|
|
120
|
+
return values.scopes.includes(scope);
|
|
121
|
+
}
|
|
122
|
+
return values.includes(scope);
|
|
115
123
|
}
|
|
116
124
|
/**
|
|
117
125
|
* Parse a semantic branch name into its type and scope.
|
|
@@ -69,22 +69,30 @@ class CommitLinter {
|
|
|
69
69
|
const { status } = ChildProcess.spawnSync("commitlint", args, { stdio: "inherit" });
|
|
70
70
|
return status ?? 0;
|
|
71
71
|
}
|
|
72
|
-
#
|
|
72
|
+
#getRuleValues(ruleName) {
|
|
73
73
|
const rule = this.#config.rules[ruleName];
|
|
74
74
|
if (!rule) {
|
|
75
|
-
return
|
|
75
|
+
return null;
|
|
76
76
|
}
|
|
77
77
|
const [_severity, _condition, values] = rule;
|
|
78
|
+
return values ?? null;
|
|
79
|
+
}
|
|
80
|
+
#isValidType(type) {
|
|
81
|
+
const values = this.#getRuleValues("type-enum");
|
|
78
82
|
if (!values) {
|
|
79
83
|
return true;
|
|
80
84
|
}
|
|
81
|
-
return values.includes(
|
|
82
|
-
}
|
|
83
|
-
#isValidType(type) {
|
|
84
|
-
return this.#isValidEnumValue("type-enum", type);
|
|
85
|
+
return values.includes(type);
|
|
85
86
|
}
|
|
86
87
|
#isValidScope(scope) {
|
|
87
|
-
|
|
88
|
+
const values = this.#getRuleValues("scope-enum");
|
|
89
|
+
if (!values) {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
if ("scopes" in values) {
|
|
93
|
+
return values.scopes.includes(scope);
|
|
94
|
+
}
|
|
95
|
+
return values.includes(scope);
|
|
88
96
|
}
|
|
89
97
|
/**
|
|
90
98
|
* Parse a semantic branch name into its type and scope.
|
|
@@ -152,22 +152,30 @@ class CommitLinter {
|
|
|
152
152
|
const { status } = ChildProcess.spawnSync("commitlint", args, { stdio: "inherit" });
|
|
153
153
|
return status ?? 0;
|
|
154
154
|
}
|
|
155
|
-
#
|
|
155
|
+
#getRuleValues(ruleName) {
|
|
156
156
|
const rule = this.#config.rules[ruleName];
|
|
157
157
|
if (!rule) {
|
|
158
|
-
return
|
|
158
|
+
return null;
|
|
159
159
|
}
|
|
160
160
|
const [_severity, _condition, values] = rule;
|
|
161
|
+
return values ?? null;
|
|
162
|
+
}
|
|
163
|
+
#isValidType(type) {
|
|
164
|
+
const values = this.#getRuleValues("type-enum");
|
|
161
165
|
if (!values) {
|
|
162
166
|
return true;
|
|
163
167
|
}
|
|
164
|
-
return values.includes(
|
|
165
|
-
}
|
|
166
|
-
#isValidType(type) {
|
|
167
|
-
return this.#isValidEnumValue("type-enum", type);
|
|
168
|
+
return values.includes(type);
|
|
168
169
|
}
|
|
169
170
|
#isValidScope(scope) {
|
|
170
|
-
|
|
171
|
+
const values = this.#getRuleValues("scope-enum");
|
|
172
|
+
if (!values) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
if ("scopes" in values) {
|
|
176
|
+
return values.scopes.includes(scope);
|
|
177
|
+
}
|
|
178
|
+
return values.includes(scope);
|
|
171
179
|
}
|
|
172
180
|
/**
|
|
173
181
|
* Parse a semantic branch name into its type and scope.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cluerise/tools",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.10",
|
|
4
4
|
"description": "Tools for maintaining TypeScript projects.",
|
|
5
5
|
"author": "Branislav Holý <brano@holy.am>",
|
|
6
6
|
"repository": "github:cluerise/tools",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"./dist/"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@actions/core": "2.0.
|
|
21
|
-
"@commitlint/cli": "20.
|
|
22
|
-
"@commitlint/config-conventional": "20.
|
|
23
|
-
"@commitlint/load": "20.
|
|
24
|
-
"@commitlint/types": "20.
|
|
20
|
+
"@actions/core": "2.0.2",
|
|
21
|
+
"@commitlint/cli": "20.3.1",
|
|
22
|
+
"@commitlint/config-conventional": "20.3.1",
|
|
23
|
+
"@commitlint/load": "20.3.1",
|
|
24
|
+
"@commitlint/types": "20.3.1",
|
|
25
25
|
"@eslint/js": "9.39.2",
|
|
26
26
|
"@eslint/json": "0.14.0",
|
|
27
27
|
"@eslint/markdown": "7.5.1",
|
|
28
|
-
"@html-eslint/eslint-plugin": "0.52.
|
|
28
|
+
"@html-eslint/eslint-plugin": "0.52.1",
|
|
29
29
|
"@html-eslint/parser": "0.52.0",
|
|
30
|
-
"@typescript-eslint/parser": "8.
|
|
30
|
+
"@typescript-eslint/parser": "8.52.0",
|
|
31
31
|
"conventional-changelog-conventionalcommits": "9.1.0",
|
|
32
32
|
"eslint": "9.39.2",
|
|
33
33
|
"eslint-config-prettier": "10.1.8",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"eslint-plugin-unicorn": "62.0.0",
|
|
39
39
|
"eslint-plugin-yml": "1.19.1",
|
|
40
40
|
"glob": "13.0.0",
|
|
41
|
-
"globals": "
|
|
41
|
+
"globals": "17.0.0",
|
|
42
42
|
"lint-staged": "16.2.7",
|
|
43
43
|
"prettier": "3.7.4",
|
|
44
44
|
"prettier-plugin-sh": "0.18.0",
|
|
45
45
|
"semantic-release": "25.0.2",
|
|
46
46
|
"semver": "7.7.3",
|
|
47
47
|
"smol-toml": "1.6.0",
|
|
48
|
-
"typescript-eslint": "8.
|
|
49
|
-
"zod": "4.
|
|
48
|
+
"typescript-eslint": "8.52.0",
|
|
49
|
+
"zod": "4.3.5"
|
|
50
50
|
}
|
|
51
51
|
}
|