{"id":22361156,"url":"https://github.com/eglavin/fork-version","last_synced_at":"2026-04-26T22:00:29.442Z","repository":{"id":196736739,"uuid":"693323206","full_name":"eglavin/fork-version","owner":"eglavin","description":"fork-version automates version control tasks: determining, updating, and committing versions, files, and changelogs, simplifying the process when using conventional commits.","archived":false,"fork":false,"pushed_at":"2026-04-12T01:39:49.000Z","size":973,"stargazers_count":2,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-12T03:30:25.494Z","etag":null,"topics":["changelog","conventional-changelog","conventional-commits","git","metadata","semantic","semver","tag","version"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/fork-version","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eglavin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-18T19:50:52.000Z","updated_at":"2026-04-12T01:39:55.000Z","dependencies_parsed_at":"2024-02-10T01:27:20.650Z","dependency_job_id":"64508550-36f3-4797-b590-361638a72994","html_url":"https://github.com/eglavin/fork-version","commit_stats":null,"previous_names":["eglavin/standard-fork","eglavin/fork-version"],"tags_count":123,"template":false,"template_full_name":null,"purl":"pkg:github/eglavin/fork-version","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eglavin%2Ffork-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eglavin%2Ffork-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eglavin%2Ffork-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eglavin%2Ffork-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eglavin","download_url":"https://codeload.github.com/eglavin/fork-version/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eglavin%2Ffork-version/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32310804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["changelog","conventional-changelog","conventional-commits","git","metadata","semantic","semver","tag","version"],"created_at":"2024-12-04T16:27:11.235Z","updated_at":"2026-04-26T22:00:29.394Z","avatar_url":"https://github.com/eglavin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fork-Version\n\n[![NPM Version](https://img.shields.io/npm/v/fork-version)](https://www.npmjs.com/package/fork-version)\n[![JSR](https://jsr.io/badges/@eglavin/fork-version)](https://jsr.io/@eglavin/fork-version)\n[![Version Package](https://github.com/eglavin/fork-version/actions/workflows/version.yml/badge.svg)](https://github.com/eglavin/fork-version/actions/workflows/version.yml)\n[![Publish Package](https://github.com/eglavin/fork-version/actions/workflows/release.yml/badge.svg)](https://github.com/eglavin/fork-version/actions/workflows/release.yml)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/fork-version-logo.svg\" alt=\"Fork Version Icon\" width=\"200px\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nFork-Version automates version control tasks such as determining, updating, and committing versions, files, and changelogs, simplifying the versioning process when adhering to the \u003ca href=\"https://www.conventionalcommits.org\"\u003econventional commit\u003c/a\u003e standard.\n\u003c/p\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eThis project is essentially a complete re-write of \u003ca href=https://github.com/conventional-changelog/standard-version\u003estandard-version\u003c/a\u003e following on from its deprecation in May 2022.\u003c/summary\u003e\nAlthough there are many alternatives such as \u003ca href=https://github.com/googleapis/release-please\u003erelease-please\u003c/a\u003e. This project aims to continue focusing on just the versioning and changelog generation aspect of the process for use in other Git hosts outside of Github.\n\u003c/details\u003e\n\n## What Does Fork-Version Do?\n\nBy following the [conventional commit](https://www.conventionalcommits.org) standard Fork-Version can automate the following tasks for you:\n\n1. Determine the current and next version\n1. Update the version in the selected files [(View the supported files)](#supported-file-types)\n1. Update your changelog\n1. Commit the changed files\n1. Create a tag for the new version\n\nFork-Version won't attempt to push changes to git or to a package manager, this allows you to decide how you publish your changes.\n\n## Using Fork-Version\n\nPrimarily designed to be used with `npx`, Fork-Version can also be installed globally or directly to the node package you're working on. The only software prerequisites you need are [git](https://git-scm.com) and [node](https://nodejs.org).\n\nFork-Version can be configured either through a config file or by passing options to the tool when ran, see the [Configuration File](#configuration-file) and [Command Line Options](#command-line-options) sections below for details on the supported options.\n\n\u003e [!NOTE]\n\u003e Command line options get merged with config file options, any options that are declared through the cli will override options that are also in the config file (Except for the list of [files](#configfiles) which get merged).\n\n### Using `npx` (Recommended)\n\nTo use Fork-Version without installation you can use `npx`:\n\n```sh\nnpx fork-version\n```\n\n`npx` is a package runner which allows you to execute npm packages without installation, this can be useful when working on projects outside of the Node ecosystem.\n\n\u003e [!NOTE]\n\u003e By default `npx` will use the latest release, if you want to use a specific version you can add a version tag to the end of the name.\n\u003e\n\u003e Example: `npx fork-version@1.7.0`\n\u003e\n\u003e The version tag needs to match against one of the [published versions on npm](https://www.npmjs.com/package/fork-version?activeTab=versions).\n\nAlternatively you can use other npm compatible javascript runtime's:\n\n| Runner | Command                    |\n| ------ | -------------------------- |\n| bun    | `bunx fork-version`        |\n| deno   | `deno -A npm:fork-version` |\n\n### Install Locally\n\nTo install the package locally to your project you can use one of the following commands:\n\n| Package Manager | Install Command                       |\n| --------------- | ------------------------------------- |\n| npm             | `npm install fork-version --save-dev` |\n| yarn            | `yarn add fork-version --dev`         |\n| pnpm            | `pnpm add fork-version --save-dev`    |\n| bun             | `bun install fork-version --dev`      |\n\nYou can then add the following entry to your package.json scripts section and use it like any other script you already use in your project.\n\n```json\n// package.json\n{\n  \"scripts\": {\n    \"release\": \"fork-version\"\n  }\n}\n```\n\nFor example if you use npm you can now use `npm run release` to run Fork-Version.\n\n### Commands\n\nFork-Version has a number of command modes which will make the program behave differently. The default \"command\" is the `main` mode, this mode will be used when no other command is defined.\n\n| Command             | Description                                                            |\n| ------------------- | ---------------------------------------------------------------------- |\n| `main`              | Bumps the version, update files, generate changelog, commits, and tag. |\n| `inspect`           | Print the current version and git tag, then exit.                       |\n| `inspect-version`   | Print the current version then exit.                                   |\n| `inspect-tag`       | Print the current git tag then exit.                                   |\n| `validate-config`   | Validates the configuration and exit.                                  |\n\n### Exit Codes\n\nWhen ran as a cli tool Fork-Version will exit with one of the following exit codes:\n\n| Exit Code | Description                  |\n| --------- | ---------------------------- |\n| 0         | Success                      |\n| 1         | General Error                |\n| 2         | Unknown Command              |\n| 3         | Config File Validation Error |\n\n### Command Line Options\n\nThe following help text can be viewed by running the following command: `npx fork-version --help`\n\n\u003c!-- START COMMAND LINE OPTIONS --\u003e\n\n```text\nUsage:\n  $ fork-version [command?] [options?]\n\nCommands:\n  main                             Bumps the version, update files, generate changelog, commit, and tag. [Default when no command is provided]\n  inspect                          Print the current version and git tag, then exits.\n  inspect-version                  Print the current version then exits.\n  inspect-tag                      Print the current git tag then exits.\n  validate-config                  Validates the configuration and exits.\n\nGeneral Options:\n  --version                        Show the current version of Fork-Version and exit.\n  --help                           Show this help message and exit.\n\nLocation Options:\n  --file, -F                       List of the files to be updated. [Default: [\"bower.json\", \"deno.json\", \"deno.jsonc\", \"jsr.json\", \"jsr.jsonc\", \"manifest.json\", \"npm-shrinkwrap.json\", \"package-lock.json\", \"package.json\"]]\n  --glob, -G                       Glob pattern to match files to be updated.\n  --path, -P                       The path Fork-Version will run from. [Default: process.cwd()]\n\nOptions:\n  --changelog                      Name of the changelog file. [Default: \"CHANGELOG.md\"]\n  --header                         The header text for the changelog.\n  --tag-prefix                     Specify a prefix for the created tag. [Default: \"v\"]\n  --pre-release                    Mark this release as a pre-release.\n  --pre-release-tag                Mark this release with a tagged pre-release. [Example: \"alpha\", \"beta\", \"rc\"]\n  --current-version                If set, Fork-Version will use this version instead of trying to determine one.\n  --next-version                   If set, Fork-Version will attempt to update to this version, instead of incrementing using \"conventional-commit\".\n  --release-as                     Release as increments the version by the specified level. [Choices: \"major\", \"minor\", \"patch\"]\n\nFlags:\n  --allow-multiple-versions        Don't throw an error if multiple versions are found in the given files. [Default: true]\n  --commit-all                     Commit all changes, not just files updated by Fork-Version.\n  --changelog-all                  If this flag is set, all default commit types will be added to the changelog.\n  --debug                          Output debug information.\n  --dry-run                        No output will be written to disk or committed.\n  --silent                         Run without logging to the terminal.\n  --git-tag-fallback               If unable to find a version in the given files, fallback and attempt to use the latest git tag. [Default: true]\n  --sign                           If true, git will sign the commit with the systems GPG key.\n  --verify                         If true, git will run user defined git hooks before committing.\n  --as-json                        Output the result as JSON.\n\n  To negate a flag you can prefix it with \"no-\", for example \"--no-git-tag-fallback\" will not fallback to the latest git tag.\n\nSkip Steps:\n  --skip-bump                      Skip the version bump step.\n  --skip-changelog                 Skip updating the changelog.\n  --skip-commit                    Skip committing the changes.\n  --skip-tag                       Skip tagging the commit.\n\nConventional Changelog Overrides:\n  --commit-url-format              Override the default commit URL format.\n  --compare-url-format             Override the default compare URL format.\n  --issue-url-format               Override the default issue URL format.\n  --user-url-format                Override the default user URL format.\n  --release-commit-message-format  Override the default release commit message format.\n  --release-message-suffix         Add a suffix to the end of the release message.\n\nExit Codes:\n  0: Success\n  1: General Error\n  2: Unknown Command\n  3: Config File Validation Error\n\nExamples:\n  $ fork-version\n    Run fork-version in the current directory with default options.\n\n  $ fork-version --path ./packages/my-package\n    Run fork-version in the \"./packages/my-package\" directory.\n\n  $ fork-version --file package.json --file MyApi.csproj\n    Run fork-version and update the \"package.json\" and \"MyApi.csproj\" files.\n\n  $ fork-version --glob \"*/package.json\"\n    Run fork-version and update all \"package.json\" files in subdirectories.\n\n  $ fork-version inspect-version\n    Prints the current version and exits.\n```\n\n\u003c!-- END COMMAND LINE OPTIONS --\u003e\n\n### Configuration File\n\nYou can configure Fork-Version using one of the following files:\n\n- [A javascript file](#javascript-config):\n  - fork.config.ts\n  - fork.config.js\n  - fork.config.cjs\n  - fork.config.mjs\n- [A json file](#json-config):\n  - fork.config.json\n  - package.json \u003e\u003e Key Name: \"fork-version\"\n\n#### Javascript Config\n\nConfiguring using a javascript file is the most flexible option. You can use any javascript file type you prefer including typescript. Both commonjs and esm exports styles are supported. The `defineConfig` function in the following snippet is optional, using it will give you intellisense information in your code editor of choice.\n\n```js\n// fork.config.ts\nimport { defineConfig } from 'fork-version';\n\nexport default defineConfig({\n  header: `# My Changelog`,\n  files: [\"package.json\", \"package-lock.json\"],\n});\n```\n\nAlternatively you can use typescript type annotations in a typescript file:\n\n```ts\n// fork.config.ts\nimport type { Config } from 'fork-version';\n\nconst config: Config = {\n  header: `# My Changelog`,\n  files: [\"package.json\", \"package-lock.json\"],\n};\n\nexport default config;\n```\n\nOr jsdocs in a javascript file:\n\n```js\n// fork.config.js\n/** @type {import(\"fork-version\").Config} */\nexport default {\n  header: `# My Changelog`,\n  files: [\"package.json\", \"package-lock.json\"],\n};\n```\n\nOr just raw dog it without type information. ಠ_ಠ\n\n#### Json Config\n\nAnother way you can configure Fork-Version is by using a json file called `fork.config.json`. This is a good option if you're using Fork-Version on a non javascript project, or without installation.\n\nIf you still want intellisense information you can use the following schema in your json file, otherwise `$schema` is an optional key.\n\n```json\n// fork.config.json\n{\n  \"$schema\": \"https://raw.githubusercontent.com/eglavin/fork-version/main/schema/latest.json\",\n  \"header\": \"# My Changelog\",\n  \"files\": [\n    \"package.json\",\n    \"package-lock.json\"\n  ]\n}\n```\n\nInternally we're using [zod-to-json-schema](https://github.com/StefanTerdell/zod-to-json-schema) to generate the schema. Checkout the [schema folder](./schema/latest.json) to see the current state.\n\nAlternatively you can define your config using a key in your `package.json` file called `fork-version`:\n\n```json\n// package.json\n{\n  \"name\": \"my-js-project\",\n  \"version\": \"1.2.3\",\n  \"fork-version\": {\n    \"header\": \"# My Changelog\",\n    \"files\": [\n      \"package.json\",\n      \"package-lock.json\"\n    ]\n  }\n}\n```\n\n#### Config Properties\n\n| Property                                              | Type                 | Default                 | Description                                                                                                         |\n| :---------------------------------------------------- | :------------------- | :---------------------- | :------------------------------------------------------------------------------------------------------------------ |\n| command                                               | string               | `main`                  | The command to run. Can be one of: main, inspect-version, inspect-tag, validate-config. Defaults to main.           |\n| [files](#configfiles)                                 | Array\\\u003cstring\u003e       | `[\"package.json\", ...]` | List of the files to be updated                                                                                     |\n| [customFileManagers](#custom-file-updaters)           | Array\\\u003cIFileManager\u003e | -                       | Support for user provided custom file managers                                                                      |\n| [glob](#configglob)                                   | string               | -                       | Glob pattern to match files to be updated                                                                           |\n| path                                                  | string               | `process.cwd()`         | The path Fork-Version will run from                                                                                 |\n| changelog                                             | string               | `CHANGELOG.md`          | Name of the changelog file                                                                                          |\n| header                                                | string               | `# Changelog...`        | The header text for the changelog                                                                                   |\n| [tagPrefix](#configtagprefix)                         | string               | `v`                     | Prefix for the created tag                                                                                          |\n| [preRelease](#configprerelease)                       | string / boolean     | -                       | Make a pre-release with optional label if given value is a string                                                   |\n| currentVersion                                        | string               | -                       | Use this version instead of trying to determine one                                                                 |\n| nextVersion                                           | string               | -                       | Attempt to update to this version, instead of incrementing using \"conventional-commit\"                              |\n| [releaseAs](#configreleaseas)                         | string               | -                       | Release as increments the version by the specified level. Overrides the default behaviour of \"conventional-commit\". |\n| allowMultipleVersions                                 | boolean              | true                    | Don't throw an error if multiple versions are found in the given files.                                             |\n| commitAll                                             | boolean              | false                   | Commit all changes, not just files updated by Fork-Version                                                          |\n| changelogAll                                          | boolean              | false                   | If this flag is set, all default commit types will be added to the changelog, not just `feat` and `fix`.            |\n| debug                                                 | boolean              | false                   | Output debug information                                                                                            |\n| dryRun                                                | boolean              | false                   | No output will be written to disk or committed                                                                      |\n| silent                                                | boolean              | false                   | Run without logging to the terminal                                                                                 |\n| gitTagFallback                                        | boolean              | true                    | If unable to find a version in the given files, fallback and attempt to use the latest git tag                      |\n| sign                                                  | boolean              | false                   | Sign the commit with the systems GPG key                                                                            |\n| verify                                                | boolean              | false                   | Run user defined git hooks before committing                                                                        |\n| asJson                                                | boolean              | false                   | Print inspected output as a parsable json string                                                                    |\n| skipBump                                              | boolean              | false                   | Skip the bump step                                                                                                  |\n| skipChangelog                                         | boolean              | false                   | Skip the changelog step                                                                                             |\n| skipCommit                                            | boolean              | false                   | Skip the commit step                                                                                                |\n| skipTag                                               | boolean              | false                   | Skip the tag step                                                                                                   |\n| [changelogPresetConfig](#configchangelogpresetconfig) | object               | {}                      | Override defaults from the \"conventional-changelog-conventionalcommits\" preset configuration                        |\n| releaseMessageSuffix                                  | string               | -                       | Add a suffix to the end of the release message                                                                      |\n| [commitParserOptions](#configcommitparseroptions)     | object               | {}                      | Options to pass to commits parser                                                                                   |\n\n##### config.files\n\nBy default Fork-Version will attempt to read versions from and update these files, if you define your own list it will override the default list instead of merging.\n\n- \"package.json\"\n- \"package-lock.json\"\n- \"npm-shrinkwrap.json\"\n- \"jsr.json\"\n- \"jsr.jsonc\"\n- \"deno.json\"\n- \"deno.jsonc\"\n- \"manifest.json\"\n- \"bower.json\"\n\nSee the [Supported File Types](#supported-file-types) section below to see the currently supported file types and the [Custom File Updater's](#custom-file-updaters) section below to see how to support other file types.\n\n##### config.glob\n\nAn alternative to [config.files](#configfiles), a glob allows you to search for files using wildcard characters.\n\nFor example if you have the following folder structure:\n\n```text\nAPI/\n- MyAPI.csproj\nLibrary/\n- MyLibrary.csproj\nWeb/\n- package.json\n```\n\nRunning `npx fork-version -G \"{*/*.csproj,*/package.json}\"` will update both csproj files and the package.json file.\n\nInternally Fork-Version uses [isaacs glob](https://github.com/isaacs/node-glob) to match files. Read more about the pattern syntax [here](https://github.com/isaacs/node-glob/tree/v10.3.12?tab=readme-ov-file#glob-primer).\n\n\u003e [!WARNING]\n\u003e Ensure you wrap your glob pattern in quotes to prevent shell expansion.\n\n##### config.tagPrefix\n\nAllows you to control the prefix for the created tag. This is useful if your using a mono-repo in which you version multiple projects separately or simply want to use a different prefix for your tags.\n\n| Example Value            | Tag Created                   |\n|:-------------------------|:------------------------------|\n| \"v\" (Default)            | `v1.2.3`                      |\n| \"\"                       | `1.2.3`                       |\n| \"version/\"               | `version/1.2.3`               |\n| \"@eglavin/fork-version-\" | `@eglavin/fork-version-1.2.3` |\n\n##### config.preRelease\n\nMarking a release as a pre-release allows you to define a change as a patch to a specific version. This allows you to mark a fix for a version or an alpha build for example.\n\n| Example Value | Version Created |\n|:--------------|:----------------|\n| `true`        | `1.2.3-0`       |\n| `alpha`       | `1.2.3-alpha.0` |\n\nFork-Version uses [meow](https://github.com/sindresorhus/meow) to parse cli arguments which is unable to take a single argument and parse it as either a string and or a boolean. So to do the above through the cli interface you'll need to use two different arguments:\n\n| Example CLI Usage                      | Version Created |\n|:---------------------------------------|:----------------|\n| `fork-version --pre-release`           | `1.2.3-0`       |\n| `fork-version --pre-release-tag alpha` | `1.2.3-alpha.0` |\n\n##### config.releaseAs\n\nAllows you to override the default versioning behaviour of Fork-Version and increment by the specified level. For example if the current version is `1.2.3` and you run Fork-Version with one of the following arguments, the version will be incremented as shown below.\n\n| Example Value | Version Created |\n|:--------------|:----------------|\n| `major`       | 2.0.0           |\n| `minor`       | 1.3.0           |\n| `patch`       | 1.2.4           |\n\n##### config.changelogPresetConfig\n\nFork-Version uses the [conventional changelog config spec](https://github.com/conventional-changelog/conventional-changelog-config-spec). The following is an excerpt of the configurable options.\n\n| Property                                   | Type           | Default                                                                      | Description                                                             |\n|:-------------------------------------------|:---------------|:-----------------------------------------------------------------------------|:------------------------------------------------------------------------|\n| [types](#configchangelogpresetconfigtypes) | Array\\\u003cType\u003e   | {}                                                                           | List of explicitly supported commit message types                       |\n| commitUrlFormat                            | string         | `{{host}}/{{owner}}/{{repository}}/commit/{{hash}}`                          | A URL representing a specific commit at a hash                          |\n| compareUrlFormat                           | string         | `{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}` | A URL representing the comparison between two git SHAs                  |\n| issueUrlFormat                             | string         | `{{host}}/{{owner}}/{{repository}}/issues/{{id}}`                            | A URL representing the issue format                                     |\n| userUrlFormat                              | string         | `{{host}}/{{user}}`                                                          | A URL representing a user's profile                                     |\n| releaseCommitMessageFormat                 | string         | `chore(release): {{currentTag}}`                                             | A string to be used to format the auto-generated release commit message |\n| issuePrefixes                              | Array\\\u003cstring\u003e | `[\"#\"]`                                                                      | List of prefixes used to detect references to issues                    |\n\n###### config.changelogPresetConfig.types\n\nBy default only `feat` and `fix` commits are added to your changelog, you can configure extra sections to show by modifying this section.\n\nCheckout the `fork.config.js` file [here](./fork.config.js) to see an example of modifying the types.\n\n| Property | Type    | Description                                                              |\n|:---------|:--------|:-------------------------------------------------------------------------|\n| type     | string  | The type of commit message. \"feat\", \"fix\", \"chore\", etc..                |\n| scope    | string  | The scope of the commit message.                                         |\n| section  | string  | The name of the section in the `CHANGELOG` the commit should show up in. |\n| hidden   | boolean | Should show in the generated changelog message?                          |\n\n##### config.releaseMessageSuffix\n\nAdds a suffix to the end of the release message, useful to add a `[skip ci]` message to the end of the created commit.\n\n- [GitHub Actions - Skipping workflow runs](https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs)\n- [Azure Devops - Skipping CI for individual pushes](https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops\u0026tabs=yaml#skipping-ci-for-individual-pushes)\n\n##### config.commitParserOptions\n\nThe 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.\n\n| Property               | Type           | Description                                       |\n| :--------------------- | :------------- | :------------------------------------------------ |\n| subjectPattern         | Regex          | Pattern to match commit subjects                  |\n| mergePattern           | Regex          | Pattern to match merge commits                    |\n| revertPattern          | Regex          | Pattern to match revert commits                   |\n| commentPattern         | Regex          | Pattern to match commented out lines              |\n| mentionPattern         | Regex          | Pattern to match mentions                         |\n| referenceActions       | Array\\\u003cstring\u003e | List of action labels to match reference sections |\n| referenceActionPattern | Regex          | Pattern to match reference sections               |\n| issuePrefixes          | Array\\\u003cstring\u003e | List of issue prefixes to match issue ids         |\n| issuePattern           | Regex          | Pattern to match issue references                 |\n| noteKeywords           | Array\\\u003cstring\u003e | List of keywords to match note titles             |\n| notePattern            | Regex          | Pattern to match note sections                    |\n\n[View the commit parser options to see the default patterns used.](./src/commit-parser/options.ts)\n\nIf you are using one of the following Git hosts, Fork-Version will automatically use the correct commit parser options for that host:\n\n- GitHub\n- GitLab\n- BitBucket\n- Azure DevOps\n\n[View the `detect-git-host` function to see how Fork-Version detects the git host.](./src/detect-git-host/detect-git-host.ts)\n\n### Supported File Types\n\n- [Json Package](#json-package)\n- [Yaml Package](#yaml-package)\n- [Plain Text](#plain-text)\n- [MS Build](#ms-build)\n- [ARM Bicep](#arm-bicep)\n- [Install Shield ISM](#install-shield-ism)\n- [Custom File Updater's](#custom-file-updaters)\n\n\u003e [!Note]\n\u003e If your version strings include build metadata like one of the following examples:\n\u003e\n\u003e - 1.2.3+49a3f2b\n\u003e - 1.2.3-0+49a3f2b\n\u003e - 1.2.3-alpha.0+49a3f2b\n\u003e\n\u003e this metadata will be retained without modification.\n\n#### Json Package\n\nA json package is a json file which contains a version property, such as a npm package.json file.\n\n```json\n{\n  \"name\": \"my-project\",\n  \"version\": \"1.2.3\",\n  \"private\": false,\n}\n```\n\n#### Yaml Package\n\nA yaml package is a yaml file which contains a version property, such as a dart pubspec.yaml file.\n\n```yaml\nname: wordionary\ndescription: \"My project\"\npublish_to: 'none'\nversion: 1.2.3\n```\n\n#### Plain Text\n\nA plain text file is a file which contains just the version as the content. Files that end with `version.txt` will be treated as a plain text version file.\n\n```text\n1.2.3\n```\n\n#### MS Build\n\nA MS build project is an xml file with with a `Version` property under the `Project \u003e PropertyGroup` node group.\n\n```xml\n\u003cProject Sdk=\"Microsoft.NET.Sdk\"\u003e\n  \u003cPropertyGroup\u003e\n    \u003cVersion\u003e1.2.3\u003c/Version\u003e\n  \u003c/PropertyGroup\u003e\n\u003c/Project\u003e\n```\n\nFork-Version currently supports reading and updating the following file extensions: `.csproj` `.dbproj` `.esproj` `.fsproj` `.props` `.vbproj` `.vcxproj`\n\n#### ARM Bicep\n\nAn ARM bicep file with metadata and variable called contentVersion.\n\n```bicep\nmetadata contentVersion = '1.2.3.4'\nvar contentVersion string = '1.2.3.4'\n```\n\n#### Install Shield ISM\n\nAn Install Shield `*.ism` file can be either binary or an xml file. Fork-Version only supports the xml version.\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?\u003e\n\u003c?xml-stylesheet type=\"text/xsl\" href=\"is.xsl\" ?\u003e\n\u003c!DOCTYPE msi [...]\u003e\n\u003cmsi version=\"2.0\" xmlns:dt=\"urn:schemas-microsoft-com:datatypes\"\u003e\n\n  \u003ctable name=\"Property\"\u003e\n    \u003crow\u003e\u003ctd\u003eProductVersion\u003c/td\u003e\u003ctd\u003e1.2.3\u003c/td\u003e\u003ctd/\u003e\u003c/row\u003e\n  \u003c/table\u003e\n\n\u003c/msi\u003e\n```\n\n#### Custom File Updater's\n\n***Released in version 5.1.0***\n\nIf you have a file type that isn't supported by default, you can create a custom file manager to read and write the updated version to that file.\n\nTo do this you will need to create a class or an object that implements the `IFileManager` interface and add an instance of that class or object to the `customFileManagers` array in your config.\n\nThe following example show a custom file manager for a json file with the name of `test.json` with the following structure:\n\nExample `test.json` file:\n\n```json\n{\n  \"package\": {\n    \"version\": \"1.2.3\"\n  }\n}\n```\n\nExample Custom File Manager implementation:\n\n- [Using a class to define a file manager](./examples/custom-file-manager/fork.config.ts)\n- [Using the defineFileManager function](./examples/custom-file-manager/fork.config.defineFileManager.ts)\n\n```ts\n// fork.config.ts\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { defineConfig, MissingPropertyException, type FileState, type IFileManager } from \"fork-version\";\n\nclass CustomFileManager implements IFileManager {\n  async read(filePath: string): Promise\u003cFileState | undefined\u003e {\n    const fileContent = await readFile(filePath, \"utf-8\");\n    if (fileContent) {\n      const parsedContent = JSON.parse(fileContent);\n      if (\"package\" in parsedContent \u0026\u0026 \"version\" in parsedContent.package) {\n        return {\n          path: filePath,\n          version: parsedContent.package.version,\n        };\n      }\n    }\n    throw new MissingPropertyException(\"My Custom File\", \"package.version\");\n  }\n\n  async write(fileState: FileState, newVersion: string): Promise\u003cvoid\u003e {\n    const fileContent = await readFile(fileState.path, \"utf-8\");\n    if (fileContent) {\n      const parsedContent = JSON.parse(fileContent);\n      if (\"package\" in parsedContent \u0026\u0026 \"version\" in parsedContent.package) {\n        parsedContent.package.version = newVersion;\n        const updatedContent = JSON.stringify(parsedContent, null, 2);\n        await writeFile(fileState.path, updatedContent, \"utf-8\");\n      }\n    }\n  }\n\n  isSupportedFile(fileName: string) {\n    return fileName === \"test.json\";\n  }\n}\n\nexport default defineConfig({\n  customFileManagers: [new CustomFileManager()],\n});\n```\n\n\u003e [See `IFileManager` interface to see the required methods and properties for a custom file manager.](./src/files/file-manager.ts)\n\n### Code Usage\n\n\u003e [!WARNING]\n\u003e Code usage is not recommended as the public api is not stable and may change between versions.\n\u003e\n\u003e In the future the api may be stabilized and documented but this is not a focus at this time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feglavin%2Ffork-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feglavin%2Ffork-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feglavin%2Ffork-version/lists"}