gitverse-release 3.3.1 → 3.4.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.
package/dist/types.d.ts CHANGED
@@ -412,6 +412,15 @@ export interface RetryConfig {
412
412
  * Типы операций для retry
413
413
  */
414
414
  export type RetryOperation = "push" | "createRelease";
415
+ /**
416
+ * Допустимые значения для регистра subject
417
+ */
418
+ export type SubjectCaseValue = "lower-case" | "upper-case" | "camel-case" | "kebab-case" | "pascal-case" | "sentence-case" | "snake-case" | "start-case";
419
+ /**
420
+ * Уровень правила commitlint
421
+ * 0 = disabled, 1 = warning, 2 = error
422
+ */
423
+ export type CommitlintRuleLevel = 0 | 1 | 2;
415
424
  /**
416
425
  * Конфигурация для генерации commitlint конфига
417
426
  */
@@ -441,6 +450,41 @@ export interface CommitlintGeneratorConfig {
441
450
  * @default 100
442
451
  */
443
452
  headerMaxLength: number;
453
+ /**
454
+ * Минимальная длина header
455
+ * @default null (disabled)
456
+ */
457
+ headerMinLength: number | null;
458
+ /**
459
+ * Регистр subject
460
+ * @default null (disabled - не ограничивать)
461
+ */
462
+ subjectCase: SubjectCaseValue | null;
463
+ /**
464
+ * Запретить точку в конце subject
465
+ * @default false
466
+ */
467
+ subjectFullStop: boolean;
468
+ /**
469
+ * Максимальная длина строки body
470
+ * @default null (disabled)
471
+ */
472
+ bodyMaxLineLength: number | null;
473
+ /**
474
+ * Максимальная длина строки footer
475
+ * @default null (disabled)
476
+ */
477
+ footerMaxLineLength: number | null;
478
+ /**
479
+ * Правила которые будут warning (level 1) вместо error (level 2)
480
+ * @default ["header-max-length"]
481
+ */
482
+ warningRules: string[];
483
+ /**
484
+ * Строгий режим - все правила error, subject-case: lower-case
485
+ * @default false
486
+ */
487
+ strictMode: boolean;
444
488
  /**
445
489
  * Добавлять комментарии в сгенерированный файл
446
490
  * @default true
@@ -481,6 +525,41 @@ export interface GenerateCommitlintOptions {
481
525
  * @default 100
482
526
  */
483
527
  headerMaxLength?: number;
528
+ /**
529
+ * Минимальная длина header
530
+ * @default null (disabled)
531
+ */
532
+ headerMinLength?: number | null;
533
+ /**
534
+ * Регистр subject
535
+ * @default null (disabled - не ограничивать)
536
+ */
537
+ subjectCase?: SubjectCaseValue | null;
538
+ /**
539
+ * Запретить точку в конце subject
540
+ * @default false
541
+ */
542
+ subjectFullStop?: boolean;
543
+ /**
544
+ * Максимальная длина строки body
545
+ * @default null (disabled)
546
+ */
547
+ bodyMaxLineLength?: number | null;
548
+ /**
549
+ * Максимальная длина строки footer
550
+ * @default null (disabled)
551
+ */
552
+ footerMaxLineLength?: number | null;
553
+ /**
554
+ * Правила которые будут warning (level 1) вместо error (level 2)
555
+ * @default ["header-max-length"]
556
+ */
557
+ warningRules?: string[];
558
+ /**
559
+ * Строгий режим - все правила error, subject-case: lower-case
560
+ * @default false
561
+ */
562
+ strictMode?: boolean;
484
563
  /**
485
564
  * Добавлять комментарии в сгенерированный файл
486
565
  * @default true
@@ -15,6 +15,13 @@ export declare function groupCommitsByType(commits: ConventionalCommit[]): Recor
15
15
  * Фильтрует коммиты по scope
16
16
  */
17
17
  export declare function filterCommitsByScope(commits: ConventionalCommit[], scope: string): ConventionalCommit[];
18
+ /**
19
+ * Фильтрует коммиты для пакета с учётом режима monorepo
20
+ *
21
+ * В monorepo режиме: включает коммиты со scope пакета + коммиты без scope (общие)
22
+ * В single-package режиме: включает все коммиты (scope используется для категоризации, не для выбора пакета)
23
+ */
24
+ export declare function filterCommitsForPackage(commits: ConventionalCommit[], packageName: string, isMonorepo: boolean): ConventionalCommit[];
18
25
  /**
19
26
  * Проверяет, есть ли breaking changes
20
27
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitverse-release",
3
- "version": "3.3.1",
3
+ "version": "3.4.0",
4
4
  "description": "Conventional Commits release automation tool for GitVerse",
5
5
  "keywords": [
6
6
  "gitverse",
@@ -47,7 +47,7 @@
47
47
  "typecheck": "tsc --noEmit"
48
48
  },
49
49
  "dependencies": {
50
- "gitverse-api-sdk": "4.0.1"
50
+ "gitverse-api-sdk": "4.0.2"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/bun": "1.3.0",
package/schema.json CHANGED
@@ -46,20 +46,37 @@
46
46
  },
47
47
  "commitlint": {
48
48
  "default": {
49
+ "bodyMaxLineLength": null,
49
50
  "comments": true,
51
+ "footerMaxLineLength": null,
50
52
  "format": "ts",
51
53
  "headerMaxLength": 100,
54
+ "headerMinLength": null,
52
55
  "output": "commitlint.config.ts",
53
56
  "scopeRequired": false,
54
- "scopes": ["deps", "ci", "docs"]
57
+ "scopes": ["deps", "ci", "docs"],
58
+ "strictMode": false,
59
+ "subjectCase": null,
60
+ "subjectFullStop": false,
61
+ "warningRules": ["header-max-length"]
55
62
  },
56
63
  "description": "Commitlint config generation settings",
57
64
  "properties": {
65
+ "bodyMaxLineLength": {
66
+ "default": null,
67
+ "description": "Maximum line length for commit body. Set to null to disable",
68
+ "type": ["number", "null"]
69
+ },
58
70
  "comments": {
59
71
  "default": true,
60
72
  "description": "Include explanatory comments in generated config",
61
73
  "type": "boolean"
62
74
  },
75
+ "footerMaxLineLength": {
76
+ "default": null,
77
+ "description": "Maximum line length for commit footer. Set to null to disable",
78
+ "type": ["number", "null"]
79
+ },
63
80
  "format": {
64
81
  "default": "ts",
65
82
  "description": "Output format for commitlint config",
@@ -71,6 +88,11 @@
71
88
  "description": "Maximum commit header length",
72
89
  "type": "number"
73
90
  },
91
+ "headerMinLength": {
92
+ "default": null,
93
+ "description": "Minimum commit header length. Set to null to disable",
94
+ "type": ["number", "null"]
95
+ },
74
96
  "output": {
75
97
  "default": "commitlint.config.ts",
76
98
  "description": "Output path for generated commitlint config",
@@ -88,6 +110,40 @@
88
110
  "type": "string"
89
111
  },
90
112
  "type": "array"
113
+ },
114
+ "strictMode": {
115
+ "default": false,
116
+ "description": "Enable strict mode: all rules become errors, subject-case enforced as lower-case, body/footer line lengths enforced",
117
+ "type": "boolean"
118
+ },
119
+ "subjectCase": {
120
+ "default": null,
121
+ "description": "Required case for commit subject. Set to null to allow any case",
122
+ "enum": [
123
+ "lower-case",
124
+ "upper-case",
125
+ "camel-case",
126
+ "kebab-case",
127
+ "pascal-case",
128
+ "sentence-case",
129
+ "snake-case",
130
+ "start-case",
131
+ null
132
+ ],
133
+ "type": ["string", "null"]
134
+ },
135
+ "subjectFullStop": {
136
+ "default": false,
137
+ "description": "Forbid full stop (period) at the end of subject",
138
+ "type": "boolean"
139
+ },
140
+ "warningRules": {
141
+ "default": ["header-max-length"],
142
+ "description": "Rules that should be warnings (level 1) instead of errors (level 2). Ignored when strictMode is enabled",
143
+ "items": {
144
+ "type": "string"
145
+ },
146
+ "type": "array"
91
147
  }
92
148
  },
93
149
  "type": "object"