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
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:
@@ -52,7 +52,7 @@ jobs:
|
||||
- name: Install release tooling
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Verify releasable commit messages
|
||||
run: node scripts/commit/verify-release-commits.mjs
|
||||
run: pnpm exec node scripts/commit/verify-release-commits.mjs
|
||||
- name: Semantic release
|
||||
run: pnpm exec semantic-release
|
||||
env:
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"@semantic-release/commit-analyzer": "^13.0.1",
|
||||
"@semantic-release/exec": "^7.0.0",
|
||||
"@semantic-release/release-notes-generator": "^14.0.3",
|
||||
"conventional-commits-parser": "^6.4.0",
|
||||
"semantic-release": "^25.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+3
@@ -32,6 +32,9 @@ importers:
|
||||
'@semantic-release/release-notes-generator':
|
||||
specifier: ^14.0.3
|
||||
version: 14.1.1(semantic-release@25.0.5(typescript@5.9.3))
|
||||
conventional-commits-parser:
|
||||
specifier: ^6.4.0
|
||||
version: 6.4.0
|
||||
semantic-release:
|
||||
specifier: ^25.0.2
|
||||
version: 25.0.5(typescript@5.9.3)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user