fork-version 4.1.7 → 4.1.8

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/index.d.cts CHANGED
@@ -29,7 +29,8 @@ declare const ForkConfigSchema: z.ZodObject<{
29
29
  skipChangelog: z.ZodBoolean;
30
30
  skipCommit: z.ZodBoolean;
31
31
  skipTag: z.ZodBoolean;
32
- changelogPresetConfig: z.ZodObject<{
32
+ detectedGitHost: z.ZodOptional<z.ZodString>;
33
+ changelogPresetConfig: z.ZodOptional<z.ZodObject<{
33
34
  types: z.ZodOptional<z.ZodArray<z.ZodObject<{
34
35
  type: z.ZodString;
35
36
  scope: z.ZodOptional<z.ZodString>;
@@ -42,8 +43,9 @@ declare const ForkConfigSchema: z.ZodObject<{
42
43
  userUrlFormat: z.ZodOptional<z.ZodString>;
43
44
  releaseCommitMessageFormat: z.ZodOptional<z.ZodString>;
44
45
  issuePrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
45
- }, z.core.$strip>;
46
+ }, z.core.$strip>>;
46
47
  releaseMessageSuffix: z.ZodOptional<z.ZodString>;
48
+ commitParserOptions: z.ZodOptional<z.ZodObject<z.core.$ZodLooseShape, z.core.$loose>>;
47
49
  }, z.core.$strip>;
48
50
 
49
51
  declare function getCliArguments(): meow.Result<{
@@ -152,7 +154,72 @@ declare function getCliArguments(): meow.Result<{
152
154
  };
153
155
  }>;
154
156
 
155
- type ForkConfig = z.infer<typeof ForkConfigSchema>;
157
+ interface ParserOptions {
158
+ /**
159
+ * Pattern to match commit subjects
160
+ * - Expected capture groups: `type` `title`
161
+ * - Optional capture groups: `scope`, `breakingChange`
162
+ */
163
+ subjectPattern: RegExp | undefined;
164
+ /**
165
+ * Pattern to match merge commits
166
+ * - Expected capture groups: `id`, `source`
167
+ */
168
+ mergePattern: RegExp | undefined;
169
+ /**
170
+ * Pattern to match revert commits
171
+ * - Expected capture groups: `subject`, `hash`
172
+ */
173
+ revertPattern: RegExp | undefined;
174
+ /**
175
+ * Pattern to match commented out lines which will be trimmed
176
+ */
177
+ commentPattern: RegExp | undefined;
178
+ /**
179
+ * Pattern to match mentions
180
+ * - Expected capture groups: `username`
181
+ */
182
+ mentionPattern: RegExp | undefined;
183
+ /**
184
+ * List of action labels to match reference sections
185
+ * @default
186
+ * ["close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved"]
187
+ */
188
+ referenceActions?: string[];
189
+ /**
190
+ * Pattern to match reference sections
191
+ * - Expected capture groups: `action`, `reference`
192
+ */
193
+ referenceActionPattern: RegExp | undefined;
194
+ /**
195
+ * List of issue prefixes to match issue ids
196
+ * @default
197
+ * ["#"]
198
+ */
199
+ issuePrefixes?: string[];
200
+ /**
201
+ * Pattern to match issue references
202
+ * - Expected capture groups: `repository`, `prefix`, `issue`
203
+ */
204
+ issuePattern: RegExp | undefined;
205
+ /**
206
+ * List of keywords to match note titles
207
+ * @default
208
+ * ["BREAKING CHANGE", "BREAKING-CHANGE"]
209
+ */
210
+ noteKeywords?: string[];
211
+ /**
212
+ * Pattern to match note sections
213
+ * - Expected capture groups: `title`
214
+ * - Optional capture groups: `text`
215
+ */
216
+ notePattern: RegExp | undefined;
217
+ }
218
+ declare function createParserOptions(userOptions?: Partial<ParserOptions>): ParserOptions;
219
+
220
+ type ForkConfig = z.infer<typeof ForkConfigSchema> & {
221
+ commitParserOptions?: Partial<ParserOptions>;
222
+ };
156
223
  type Config = Partial<ForkConfig>;
157
224
  type CLIArguments = ReturnType<typeof getCliArguments>;
158
225
  interface ForkVersionCLIArgs {
@@ -434,49 +501,7 @@ interface CommitsSinceTag {
434
501
  declare function getCommitsSinceTag(config: ForkConfig, logger: Logger, git: Git): Promise<CommitsSinceTag>;
435
502
 
436
503
  declare function main(config: ForkConfig, logger: Logger, fileManager: FileManager, git: Git): Promise<{
437
- config: {
438
- command: "main" | "inspect" | "inspect-version" | "inspect-tag" | "validate-config";
439
- files: string[];
440
- path: string;
441
- changelog: string;
442
- header: string;
443
- tagPrefix: string;
444
- allowMultipleVersions: boolean;
445
- commitAll: boolean;
446
- changelogAll: boolean;
447
- debug: boolean;
448
- dryRun: boolean;
449
- silent: boolean;
450
- gitTagFallback: boolean;
451
- sign: boolean;
452
- verify: boolean;
453
- asJson: boolean;
454
- skipBump: boolean;
455
- skipChangelog: boolean;
456
- skipCommit: boolean;
457
- skipTag: boolean;
458
- changelogPresetConfig: {
459
- types?: {
460
- type: string;
461
- scope?: string | undefined;
462
- section?: string | undefined;
463
- hidden?: boolean | undefined;
464
- }[] | undefined;
465
- commitUrlFormat?: string | undefined;
466
- compareUrlFormat?: string | undefined;
467
- issueUrlFormat?: string | undefined;
468
- userUrlFormat?: string | undefined;
469
- releaseCommitMessageFormat?: string | undefined;
470
- issuePrefixes?: string[] | undefined;
471
- };
472
- inspectVersion?: boolean | undefined;
473
- glob?: string | undefined;
474
- preRelease?: string | boolean | undefined;
475
- currentVersion?: string | undefined;
476
- nextVersion?: string | undefined;
477
- releaseAs?: "major" | "minor" | "patch" | undefined;
478
- releaseMessageSuffix?: string | undefined;
479
- };
504
+ config: ForkConfig;
480
505
  commits: CommitsSinceTag;
481
506
  current: CurrentVersion;
482
507
  next: NextVersion;
@@ -484,69 +509,6 @@ declare function main(config: ForkConfig, logger: Logger, fileManager: FileManag
484
509
 
485
510
  declare function validateConfig(config: ForkConfig): void;
486
511
 
487
- interface ParserOptions {
488
- /**
489
- * Pattern to match commit subjects
490
- * - Expected capture groups: `type` `title`
491
- * - Optional capture groups: `scope`, `breakingChange`
492
- */
493
- subjectPattern: RegExp | undefined;
494
- /**
495
- * Pattern to match merge commits
496
- * - Expected capture groups: `id`, `source`
497
- */
498
- mergePattern: RegExp | undefined;
499
- /**
500
- * Pattern to match revert commits
501
- * - Expected capture groups: `subject`, `hash`
502
- */
503
- revertPattern: RegExp | undefined;
504
- /**
505
- * Pattern to match commented out lines which will be trimmed
506
- */
507
- commentPattern: RegExp | undefined;
508
- /**
509
- * Pattern to match mentions
510
- * - Expected capture groups: `username`
511
- */
512
- mentionPattern: RegExp | undefined;
513
- /**
514
- * List of action labels to match reference sections
515
- * @default
516
- * ["close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved"]
517
- */
518
- referenceActions?: string[];
519
- /**
520
- * Pattern to match reference sections
521
- * - Expected capture groups: `action`, `reference`
522
- */
523
- referenceActionPattern: RegExp | undefined;
524
- /**
525
- * List of issue prefixes to match issue ids
526
- * @default
527
- * ["#"]
528
- */
529
- issuePrefixes?: string[];
530
- /**
531
- * Pattern to match issue references
532
- * - Expected capture groups: `repository`, `prefix`, `issue`
533
- */
534
- issuePattern: RegExp | undefined;
535
- /**
536
- * List of keywords to match note titles
537
- * @default
538
- * ["BREAKING CHANGE", "BREAKING-CHANGE"]
539
- */
540
- noteKeywords?: string[];
541
- /**
542
- * Pattern to match note sections
543
- * - Expected capture groups: `title`
544
- * - Optional capture groups: `text`
545
- */
546
- notePattern: RegExp | undefined;
547
- }
548
- declare function createParserOptions(userOptions?: Partial<ParserOptions>): ParserOptions;
549
-
550
512
  declare class CommitParser {
551
513
  #private;
552
514
  constructor(userOptions?: Partial<ParserOptions>);
package/dist/index.d.ts CHANGED
@@ -29,7 +29,8 @@ declare const ForkConfigSchema: z.ZodObject<{
29
29
  skipChangelog: z.ZodBoolean;
30
30
  skipCommit: z.ZodBoolean;
31
31
  skipTag: z.ZodBoolean;
32
- changelogPresetConfig: z.ZodObject<{
32
+ detectedGitHost: z.ZodOptional<z.ZodString>;
33
+ changelogPresetConfig: z.ZodOptional<z.ZodObject<{
33
34
  types: z.ZodOptional<z.ZodArray<z.ZodObject<{
34
35
  type: z.ZodString;
35
36
  scope: z.ZodOptional<z.ZodString>;
@@ -42,8 +43,9 @@ declare const ForkConfigSchema: z.ZodObject<{
42
43
  userUrlFormat: z.ZodOptional<z.ZodString>;
43
44
  releaseCommitMessageFormat: z.ZodOptional<z.ZodString>;
44
45
  issuePrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
45
- }, z.core.$strip>;
46
+ }, z.core.$strip>>;
46
47
  releaseMessageSuffix: z.ZodOptional<z.ZodString>;
48
+ commitParserOptions: z.ZodOptional<z.ZodObject<z.core.$ZodLooseShape, z.core.$loose>>;
47
49
  }, z.core.$strip>;
48
50
 
49
51
  declare function getCliArguments(): meow.Result<{
@@ -152,7 +154,72 @@ declare function getCliArguments(): meow.Result<{
152
154
  };
153
155
  }>;
154
156
 
155
- type ForkConfig = z.infer<typeof ForkConfigSchema>;
157
+ interface ParserOptions {
158
+ /**
159
+ * Pattern to match commit subjects
160
+ * - Expected capture groups: `type` `title`
161
+ * - Optional capture groups: `scope`, `breakingChange`
162
+ */
163
+ subjectPattern: RegExp | undefined;
164
+ /**
165
+ * Pattern to match merge commits
166
+ * - Expected capture groups: `id`, `source`
167
+ */
168
+ mergePattern: RegExp | undefined;
169
+ /**
170
+ * Pattern to match revert commits
171
+ * - Expected capture groups: `subject`, `hash`
172
+ */
173
+ revertPattern: RegExp | undefined;
174
+ /**
175
+ * Pattern to match commented out lines which will be trimmed
176
+ */
177
+ commentPattern: RegExp | undefined;
178
+ /**
179
+ * Pattern to match mentions
180
+ * - Expected capture groups: `username`
181
+ */
182
+ mentionPattern: RegExp | undefined;
183
+ /**
184
+ * List of action labels to match reference sections
185
+ * @default
186
+ * ["close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved"]
187
+ */
188
+ referenceActions?: string[];
189
+ /**
190
+ * Pattern to match reference sections
191
+ * - Expected capture groups: `action`, `reference`
192
+ */
193
+ referenceActionPattern: RegExp | undefined;
194
+ /**
195
+ * List of issue prefixes to match issue ids
196
+ * @default
197
+ * ["#"]
198
+ */
199
+ issuePrefixes?: string[];
200
+ /**
201
+ * Pattern to match issue references
202
+ * - Expected capture groups: `repository`, `prefix`, `issue`
203
+ */
204
+ issuePattern: RegExp | undefined;
205
+ /**
206
+ * List of keywords to match note titles
207
+ * @default
208
+ * ["BREAKING CHANGE", "BREAKING-CHANGE"]
209
+ */
210
+ noteKeywords?: string[];
211
+ /**
212
+ * Pattern to match note sections
213
+ * - Expected capture groups: `title`
214
+ * - Optional capture groups: `text`
215
+ */
216
+ notePattern: RegExp | undefined;
217
+ }
218
+ declare function createParserOptions(userOptions?: Partial<ParserOptions>): ParserOptions;
219
+
220
+ type ForkConfig = z.infer<typeof ForkConfigSchema> & {
221
+ commitParserOptions?: Partial<ParserOptions>;
222
+ };
156
223
  type Config = Partial<ForkConfig>;
157
224
  type CLIArguments = ReturnType<typeof getCliArguments>;
158
225
  interface ForkVersionCLIArgs {
@@ -434,49 +501,7 @@ interface CommitsSinceTag {
434
501
  declare function getCommitsSinceTag(config: ForkConfig, logger: Logger, git: Git): Promise<CommitsSinceTag>;
435
502
 
436
503
  declare function main(config: ForkConfig, logger: Logger, fileManager: FileManager, git: Git): Promise<{
437
- config: {
438
- command: "main" | "inspect" | "inspect-version" | "inspect-tag" | "validate-config";
439
- files: string[];
440
- path: string;
441
- changelog: string;
442
- header: string;
443
- tagPrefix: string;
444
- allowMultipleVersions: boolean;
445
- commitAll: boolean;
446
- changelogAll: boolean;
447
- debug: boolean;
448
- dryRun: boolean;
449
- silent: boolean;
450
- gitTagFallback: boolean;
451
- sign: boolean;
452
- verify: boolean;
453
- asJson: boolean;
454
- skipBump: boolean;
455
- skipChangelog: boolean;
456
- skipCommit: boolean;
457
- skipTag: boolean;
458
- changelogPresetConfig: {
459
- types?: {
460
- type: string;
461
- scope?: string | undefined;
462
- section?: string | undefined;
463
- hidden?: boolean | undefined;
464
- }[] | undefined;
465
- commitUrlFormat?: string | undefined;
466
- compareUrlFormat?: string | undefined;
467
- issueUrlFormat?: string | undefined;
468
- userUrlFormat?: string | undefined;
469
- releaseCommitMessageFormat?: string | undefined;
470
- issuePrefixes?: string[] | undefined;
471
- };
472
- inspectVersion?: boolean | undefined;
473
- glob?: string | undefined;
474
- preRelease?: string | boolean | undefined;
475
- currentVersion?: string | undefined;
476
- nextVersion?: string | undefined;
477
- releaseAs?: "major" | "minor" | "patch" | undefined;
478
- releaseMessageSuffix?: string | undefined;
479
- };
504
+ config: ForkConfig;
480
505
  commits: CommitsSinceTag;
481
506
  current: CurrentVersion;
482
507
  next: NextVersion;
@@ -484,69 +509,6 @@ declare function main(config: ForkConfig, logger: Logger, fileManager: FileManag
484
509
 
485
510
  declare function validateConfig(config: ForkConfig): void;
486
511
 
487
- interface ParserOptions {
488
- /**
489
- * Pattern to match commit subjects
490
- * - Expected capture groups: `type` `title`
491
- * - Optional capture groups: `scope`, `breakingChange`
492
- */
493
- subjectPattern: RegExp | undefined;
494
- /**
495
- * Pattern to match merge commits
496
- * - Expected capture groups: `id`, `source`
497
- */
498
- mergePattern: RegExp | undefined;
499
- /**
500
- * Pattern to match revert commits
501
- * - Expected capture groups: `subject`, `hash`
502
- */
503
- revertPattern: RegExp | undefined;
504
- /**
505
- * Pattern to match commented out lines which will be trimmed
506
- */
507
- commentPattern: RegExp | undefined;
508
- /**
509
- * Pattern to match mentions
510
- * - Expected capture groups: `username`
511
- */
512
- mentionPattern: RegExp | undefined;
513
- /**
514
- * List of action labels to match reference sections
515
- * @default
516
- * ["close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved"]
517
- */
518
- referenceActions?: string[];
519
- /**
520
- * Pattern to match reference sections
521
- * - Expected capture groups: `action`, `reference`
522
- */
523
- referenceActionPattern: RegExp | undefined;
524
- /**
525
- * List of issue prefixes to match issue ids
526
- * @default
527
- * ["#"]
528
- */
529
- issuePrefixes?: string[];
530
- /**
531
- * Pattern to match issue references
532
- * - Expected capture groups: `repository`, `prefix`, `issue`
533
- */
534
- issuePattern: RegExp | undefined;
535
- /**
536
- * List of keywords to match note titles
537
- * @default
538
- * ["BREAKING CHANGE", "BREAKING-CHANGE"]
539
- */
540
- noteKeywords?: string[];
541
- /**
542
- * Pattern to match note sections
543
- * - Expected capture groups: `title`
544
- * - Optional capture groups: `text`
545
- */
546
- notePattern: RegExp | undefined;
547
- }
548
- declare function createParserOptions(userOptions?: Partial<ParserOptions>): ParserOptions;
549
-
550
512
  declare class CommitParser {
551
513
  #private;
552
514
  constructor(userOptions?: Partial<ParserOptions>);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { CommitParser, FileManager, ForkConfigSchema, Git, Logger, commitChanges, createParserOptions, filterRevertedCommits, getCommitsSinceTag, getCurrentVersion, getNextVersion, getUserConfig, inspect, main, tagChanges, updateChangelog, validateConfig } from './chunk-5CZU5EA7.js';
1
+ export { CommitParser, FileManager, ForkConfigSchema, Git, Logger, commitChanges, createParserOptions, filterRevertedCommits, getCommitsSinceTag, getCurrentVersion, getNextVersion, getUserConfig, inspect, main, tagChanges, updateChangelog, validateConfig } from './chunk-X4NB24VR.js';
2
2
 
3
3
  // src/config/define-config.ts
4
4
  function defineConfig(config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fork-version",
3
- "version": "4.1.7",
3
+ "version": "4.1.8",
4
4
  "license": "MIT",
5
5
  "description": "Fork-Version automates version control tasks such as determining, updating, and committing versions, files, and changelogs, simplifying the process when adhering to the conventional commit standard.",
6
6
  "keywords": [