feat(dependencies): add conventional-commits-parser and update verification script
quality / changes (push) Successful in 8s
quality / commitlint (push) Skipped
quality / docker-check (push) Skipped
quality / openapi (push) Successful in 45s
quality / web (push) Successful in 1m30s
quality / go (push) Successful in 1m7s
quality / bird2 (push) Successful in 16s
CD / quality (push) Successful in 3m59s
CD / publish (push) Failing after 1m2s

- Added `conventional-commits-parser` version 6.4.0 to `package.json` and `pnpm-lock.yaml` for improved commit message parsing.
- Updated the commit verification script to utilize the new parser, enhancing error handling for unparseable commit messages.
- Adjusted CI workflow to run the verification script using `pnpm exec` for consistency in package execution.
This commit is contained in:
Denozordec
2026-08-18 18:13:44 +07:00
parent da301b1a94
commit e0ecabb22f
4 changed files with 16 additions and 4 deletions
+11 -3
View File
@@ -4,7 +4,9 @@
* Exit 0 always — semantic-release still decides release/no-op.
*/
import { execSync } from 'node:child_process';
import parser from 'conventional-commits-parser';
import { CommitParser } from 'conventional-commits-parser';
const parser = new CommitParser();
const RELEASABLE = new Set(['feat', 'fix', 'perf', 'ci', 'refactor']);
@@ -32,8 +34,14 @@ const unparseable = [];
const releasable = [];
for (const { hash, subject } of commits) {
const parsed = parser.sync(subject);
if (!parsed.type) {
let parsed;
try {
parsed = parser.parse(subject);
} catch {
unparseable.push({ hash: hash.slice(0, 7), subject });
continue;
}
if (!parsed?.type) {
unparseable.push({ hash: hash.slice(0, 7), subject });
continue;
}