@naturalcycles/dev-lib 20.22.2 → 20.23.0

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.
@@ -6,7 +6,7 @@ export class SummaryReporter {
6
6
  }
7
7
 
8
8
  onTestRunEnd(testModules) {
9
- const { count = 5 } = this.cfg
9
+ const { count = 10 } = this.cfg
10
10
 
11
11
  let stats = []
12
12
 
@@ -27,6 +27,11 @@ export async function runCommitlint() {
27
27
  fs2.requireFileToExist(arg1);
28
28
  const msg = fs2.readText(arg1);
29
29
  console.log({ msg });
30
+ // Skip validation for merge commits (MERGE_HEAD exists during merge)
31
+ if (fs2.pathExists('.git/MERGE_HEAD')) {
32
+ console.log('✓ Merge commit - skipping validation');
33
+ return;
34
+ }
30
35
  const devLibCfg = await readDevLibConfigIfPresent();
31
36
  console.log({ devLibCfg });
32
37
  const { valid, errors } = validateCommitMessage(msg, devLibCfg.commitlint);
@@ -50,6 +55,10 @@ export function validateCommitMessage(input, cfg = {}) {
50
55
  if (!msg) {
51
56
  return { valid: false, errors: ['Commit message is empty'] };
52
57
  }
58
+ // Allow merge commits generated by git
59
+ if (msg.startsWith('Merge ')) {
60
+ return { valid: true, errors: [] };
61
+ }
53
62
  const lines = msg.split('\n');
54
63
  const subjectLine = lines[0];
55
64
  // Step 1: Validate subject line format
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "20.22.2",
4
+ "version": "20.23.0",
5
5
  "dependencies": {
6
6
  "@biomejs/biome": "^2",
7
7
  "@eslint/js": "^9",