package-versioner 0.6.4 → 0.7.1

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <img src="https://img.shields.io/npm/v/package-versioner" /></a>
6
6
  <a href="https://www.npmjs.com/package/package-versioner" alt="NPM Downloads">
7
7
  <img src="https://img.shields.io/npm/dw/package-versioner" /></a>
8
-
8
+ <br/><br/>
9
9
  A lightweight yet powerful CLI tool for automated semantic versioning based on Git history and conventional commits. Supports both single package projects and monorepos with flexible versioning strategies.
10
10
 
11
11
  ## Features
@@ -18,6 +18,8 @@ A lightweight yet powerful CLI tool for automated semantic versioning based on G
18
18
  - Customizable through a `version.config.json` file or CLI options
19
19
  - Automatically updates `package.json` or `Cargo.toml` version
20
20
  - Creates appropriate Git tags for releases
21
+ - Automatically generates and maintains changelogs in Keep a Changelog or Angular format
22
+ - Integrates commit messages, breaking changes, and issue references into well-structured changelogs
21
23
  - CI/CD friendly with JSON output support
22
24
 
23
25
  ## Supporting JavaScript and Rust Projects
@@ -98,15 +100,16 @@ Customize behavior by creating a `version.config.json` file in your project root
98
100
  "versionPrefix": "v",
99
101
  "tagTemplate": "${prefix}${version}",
100
102
  "packageTagTemplate": "${packageName}@${prefix}${version}",
101
- "commitMessage": "chore(release): ${version}",
102
- "monorepo": {
103
- "synced": true,
104
- "skip": [
105
- "docs",
106
- "e2e"
107
- ],
108
- "packagePath": "packages"
109
- },
103
+ "commitMessage": "chore: release ${packageName}@${version} [skip ci]",
104
+ "updateChangelog": true,
105
+ "changelogFormat": "keep-a-changelog",
106
+ "synced": true,
107
+ "skip": [
108
+ "docs",
109
+ "e2e"
110
+ ],
111
+ "packages": ["packages/*"],
112
+ "mainPackage": "primary-package",
110
113
  "cargo": {
111
114
  "enabled": true,
112
115
  "paths": ["src/", "crates/"]
@@ -114,13 +117,28 @@ Customize behavior by creating a `version.config.json` file in your project root
114
117
  }
115
118
  ```
116
119
 
117
- **Notes:**
118
- - Options like `synced`, `packages`, and `updateInternalDependencies` enable monorepo-specific behaviours.
119
- - The `tagTemplate` and `packageTagTemplate` allow you to customize how Git tags are formatted for releases.
120
- - The `commitMessage` template can include CI skip tokens like `[skip ci]` if you want to prevent CI runs after version commits (e.g., `"commitMessage": "chore(release): ${version} [skip ci]"`). See [CI/CD Integration](./docs/CI_CD_INTEGRATION.md) for more details.
121
- - The `cargo` options can help when working with Rust projects:
122
- - `enabled` (default: `true`): Set to `false` to disable Cargo.toml version handling
123
- - `paths` (optional): Specify directories to search for Cargo.toml files
120
+ ### Configuration Options
121
+
122
+ #### General Options (All Projects)
123
+ - `preset`: Conventional commits preset to use for version calculation (default: "angular")
124
+ - `versionPrefix`: Prefix for version numbers in tags (default: "v")
125
+ - `tagTemplate`: Template for Git tags (default: "${prefix}${version}")
126
+ - `commitMessage`: Template for commit messages (default: "chore(release): ${version}")
127
+ - `updateChangelog`: Whether to automatically update changelogs (default: true)
128
+ - `changelogFormat`: Format for changelogs - "keep-a-changelog" or "angular" (default: "keep-a-changelog")
129
+ - `cargo`: Options for Rust projects:
130
+ - `enabled`: Whether to handle Cargo.toml files (default: true)
131
+ - `paths`: Directories to search for Cargo.toml files (optional)
132
+
133
+ #### Monorepo-Specific Options
134
+ - `synced`: Whether all packages should be versioned together (default: true)
135
+ - `skip`: Array of package names to exclude from versioning
136
+ - `packages`: Glob patterns for package discovery (e.g., ["packages/*"])
137
+ - `mainPackage`: Package name whose commit history should drive version determination
138
+ - `packageTagTemplate`: Template for package-specific Git tags (default: "${packageName}@${prefix}${version}")
139
+ - `updateInternalDependencies`: How to update internal dependencies ("patch", "minor", "major", or "inherit")
140
+
141
+ For more details on CI/CD integration and advanced usage, see [CI/CD Integration](./docs/CI_CD_INTEGRATION.md).
124
142
 
125
143
  ## How Versioning Works
126
144
 
@@ -129,12 +147,13 @@ Customize behavior by creating a `version.config.json` file in your project root
129
147
  1. **Conventional Commits:** Analyzes commit messages (like `feat:`, `fix:`, `BREAKING CHANGE:`) since the last tag.
130
148
  2. **Branch Pattern:** Determines the bump based on the current or recently merged branch name matching predefined patterns.
131
149
 
132
- For a detailed explanation of these concepts and monorepo modes (Synced vs. Async), see [Versioning Strategies and Concepts](./docs/VERSIONING_STRATEGIES.md).
150
+ For a detailed explanation of these concepts and monorepo modes (Synced vs. Async), see [Versioning Strategies and Concepts](./docs/versioning.md).
133
151
 
134
152
  ## Documentation
135
153
 
136
- - [Versioning Strategies and Concepts](./docs/VERSIONING_STRATEGIES.md) - Detailed explanation of versioning approaches
137
- - [CI/CD Integration](./docs/CI_CD_INTEGRATION.md) - Guide for integrating with CI/CD pipelines
154
+ - [Versioning Strategies and Concepts](./docs/versioning.md) - Detailed explanation of versioning approaches
155
+ - [CI/CD Integration](./docs/ci_cd_integration.md) - Guide for integrating with CI/CD pipelines
156
+ - [Changelog Generation](./docs/changelogs.md) - How changelogs are automatically generated and maintained
138
157
 
139
158
  For more details on available CLI options, run:
140
159
 
@@ -148,4 +167,4 @@ This project was originally forked from and inspired by [`jucian0/turbo-version`
148
167
 
149
168
  ## License
150
169
 
151
- MIT
170
+ MIT