fork-version 4.1.4 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Fork Version
2
2
 
3
+ ## [4.1.8](https://github.com/eglavin/fork-version/compare/v4.1.7...v4.1.8) (2026-04-05)
4
+
5
+
6
+ ### Docs
7
+
8
+ * update readme with details on commit parser options ([9a8ba6d](https://github.com/eglavin/fork-version/commit/9a8ba6de3dcccfdb1ae62d12792ffc39122342cd))
9
+
10
+
11
+ ### Refactor
12
+
13
+ * add detected git host name to schema ([9728a1e](https://github.com/eglavin/fork-version/commit/9728a1efb813436adef0358310ce24469e36f311))
14
+ * extract detect git host to allow expanding options ([b330727](https://github.com/eglavin/fork-version/commit/b330727d4f9d5dfafae5796c20ff57834e56de49))
15
+ * improve git host detection ([d231e6c](https://github.com/eglavin/fork-version/commit/d231e6ca1bf389869602577f843fbf996e3587e3))
16
+ * set commit parser options from detected git host ([840584f](https://github.com/eglavin/fork-version/commit/840584fefc94868457cf3c77979a795133219d64))
17
+
18
+
19
+ ## [4.1.7](https://github.com/eglavin/fork-version/compare/v4.1.6...v4.1.7) (2026-03-08)
20
+
21
+
22
+ ### Refactor
23
+
24
+ * improve inspect command ([0b78aab](https://github.com/eglavin/fork-version/commit/0b78aab5dd9be49ffccba173fdb99e13eac52fbd))
25
+
26
+
27
+ ## [4.1.6](https://github.com/eglavin/fork-version/compare/v4.1.5...v4.1.6) (2026-03-08)
28
+
29
+
30
+ ### Refactor
31
+
32
+ * remove duplicate get tags function ([ec2962a](https://github.com/eglavin/fork-version/commit/ec2962a99f0da0335079ef6fa677f3023325cdcf))
33
+
34
+
35
+ ## [4.1.5](https://github.com/eglavin/fork-version/compare/v4.1.4...v4.1.5) (2026-03-08)
36
+
37
+
38
+ ### Refactor
39
+
40
+ * remove typescript member visibility modifiers in favour of private fields ([c2e0749](https://github.com/eglavin/fork-version/commit/c2e07494bb2af69f04c0ecfc13eb342705c904aa))
41
+
42
+
3
43
  ## [4.1.4](https://github.com/eglavin/fork-version/compare/v4.1.3...v4.1.4) (2026-03-08)
4
44
 
5
45
 
package/README.md CHANGED
@@ -94,8 +94,9 @@ Fork-Version has a number of command modes which will make the program behave di
94
94
  | Command | Description |
95
95
  | ------------------- | ---------------------------------------------------------------------- |
96
96
  | `main` | Bumps the version, update files, generate changelog, commits, and tag. |
97
- | `inspect-version` | Prints the current version and exit. |
98
- | `inspect-tag` | Prints the current git tag and exit. |
97
+ | `inspect` | Print the current version and git tag, then exit. |
98
+ | `inspect-version` | Print the current version then exit. |
99
+ | `inspect-tag` | Print the current git tag then exit. |
99
100
  | `validate-config` | Validates the configuration and exit. |
100
101
 
101
102
  ### Exit Codes
@@ -121,8 +122,9 @@ Usage:
121
122
 
122
123
  Commands:
123
124
  main Bumps the version, update files, generate changelog, commit, and tag. [Default when no command is provided]
124
- inspect-version Prints the current version and exits.
125
- inspect-tag Prints the current git tag and exits.
125
+ inspect Print the current version and git tag, then exits.
126
+ inspect-version Print the current version then exits.
127
+ inspect-tag Print the current git tag then exits.
126
128
  validate-config Validates the configuration and exits.
127
129
 
128
130
  General Options:
@@ -154,6 +156,7 @@ Flags:
154
156
  --git-tag-fallback If unable to find a version in the given files, fallback and attempt to use the latest git tag. [Default: true]
155
157
  --sign If true, git will sign the commit with the systems GPG key.
156
158
  --verify If true, git will run user defined git hooks before committing.
159
+ --as-json Output the result as JSON.
157
160
 
158
161
  To negate a flag you can prefix it with "no-", for example "--no-git-tag-fallback" will not fallback to the latest git tag.
159
162
 
@@ -311,12 +314,14 @@ Alternatively you can define your config using a key in your `package.json` file
311
314
  | gitTagFallback | boolean | true | If unable to find a version in the given files, fallback and attempt to use the latest git tag |
312
315
  | sign | boolean | false | Sign the commit with the systems GPG key |
313
316
  | verify | boolean | false | Run user defined git hooks before committing |
317
+ | asJson | boolean | false | Print inspected output as a parsable json string |
314
318
  | skipBump | boolean | false | Skip the bump step |
315
319
  | skipChangelog | boolean | false | Skip the changelog step |
316
320
  | skipCommit | boolean | false | Skip the commit step |
317
321
  | skipTag | boolean | false | Skip the tag step |
318
322
  | [changelogPresetConfig](#configchangelogpresetconfig) | object | {} | Override defaults from the "conventional-changelog-conventionalcommits" preset configuration |
319
323
  | releaseMessageSuffix | string | - | Add a suffix to the end of the release message |
324
+ | [commitParserOptions](#configcommitparseroptions) | object | {} | Options to pass to commits parser |
320
325
 
321
326
  ##### config.files
322
327
 
@@ -427,6 +432,35 @@ Adds a suffix to the end of the release message, useful to add a `[skip ci]` mes
427
432
  - [GitHub Actions - Skipping workflow runs](https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs)
428
433
  - [Azure Devops - Skipping CI for individual pushes](https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#skipping-ci-for-individual-pushes)
429
434
 
435
+ ##### config.commitParserOptions
436
+
437
+ The commit parser options allow you to configure the regex patterns used to parse commits. This is useful if your team has a specific commit message format that doesn't match the default conventional commit format.
438
+
439
+ | Property | Type | Description |
440
+ | :--------------------- | :------------- | :------------------------------------------------ |
441
+ | subjectPattern | Regex | Pattern to match commit subjects |
442
+ | mergePattern | Regex | Pattern to match merge commits |
443
+ | revertPattern | Regex | Pattern to match revert commits |
444
+ | commentPattern | Regex | Pattern to match commented out lines |
445
+ | mentionPattern | Regex | Pattern to match mentions |
446
+ | referenceActions | Array\<string> | List of action labels to match reference sections |
447
+ | referenceActionPattern | Regex | Pattern to match reference sections |
448
+ | issuePrefixes | Array\<string> | List of issue prefixes to match issue ids |
449
+ | issuePattern | Regex | Pattern to match issue references |
450
+ | noteKeywords | Array\<string> | List of keywords to match note titles |
451
+ | notePattern | Regex | Pattern to match note sections |
452
+
453
+ [View the commit parser options to see the default patterns used.](./src/commit-parser/options.ts)
454
+
455
+ If you are using one of the following Git hosts, Fork-Version will automatically use the correct commit parser options for that host:
456
+
457
+ - GitHub
458
+ - GitLab
459
+ - BitBucket
460
+ - Azure DevOps
461
+
462
+ [View the `detect-git-host` function to see how Fork-Version detects the git host.](./src/detect-git-host/detect-git-host.ts)
463
+
430
464
  ### Supported File Types
431
465
 
432
466
  - [Json Package](#json-package)