@versu/cli 0.6.5 → 0.6.7

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.
Files changed (2) hide show
  1. package/README.md +65 -14
  2. package/package.json +3 -4
package/README.md CHANGED
@@ -92,7 +92,6 @@ Calculate and apply semantic version changes.
92
92
  | `--no-push-changes` | Don't commit and push changes | - |
93
93
  | `--generate-changelog` | Generate or update changelog files for changed modules | `true` |
94
94
  | `--no-generate-changelog` | Don't generate changelogs | - |
95
- | `--output-file <value>` | Write calculated versions to a file in JSON format | - |
96
95
 
97
96
  > 📖 **Detailed Pre-release Documentation**: See [@versu/core PRERELEASE.md](../core/PRERELEASE.md) for comprehensive examples and use cases.
98
97
 
@@ -177,28 +176,72 @@ VERSU CLI uses the same configuration system as the core library. Configuration
177
176
 
178
177
  ```json
179
178
  {
180
- "defaultBump": "patch",
181
- "commitTypes": {
182
- "feat": "minor",
183
- "fix": "patch",
184
- "perf": "patch",
185
- "refactor": "patch",
186
- "docs": "ignore",
187
- "test": "ignore",
188
- "chore": "ignore"
179
+ "versionRules": {
180
+ "defaultBump": "patch",
181
+ "commitTypeBumps": {
182
+ "feat": "minor",
183
+ "fix": "patch",
184
+ "perf": "patch",
185
+ "refactor": "patch",
186
+ "docs": "ignore",
187
+ "test": "ignore",
188
+ "chore": "ignore"
189
+ },
190
+ "dependencyBumps": {
191
+ "major": "major",
192
+ "minor": "minor",
193
+ "patch": "patch"
194
+ }
189
195
  },
190
- "dependencyRules": {
191
- "onMajorOfDependency": "minor",
192
- "onMinorOfDependency": "patch",
193
- "onPatchOfDependency": "none"
196
+ "changelog": {
197
+ "root": {
198
+ "context": {
199
+ "prependPlaceholder": "<!-- CHANGELOG -->"
200
+ }
201
+ },
202
+ "module": {
203
+ "context": {
204
+ "prependPlaceholder": "<!-- CHANGELOG -->"
205
+ }
206
+ }
194
207
  }
195
208
  }
196
209
  ```
197
210
 
198
211
  For more configuration examples, see the [core package documentation](../core).
199
212
 
213
+ **Advanced Changelog Configuration:**
214
+
215
+ VERSU supports [conventional-changelog-writer](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer) options for customizing changelog generation. For advanced customization with functions (transforms, sorting, templates), use JavaScript configuration files:
216
+
217
+ ```javascript
218
+ // versu.config.js
219
+ module.exports = {
220
+ versionRules: {
221
+ // ... version rules
222
+ },
223
+ changelog: {
224
+ module: {
225
+ options: {
226
+ groupBy: 'type',
227
+ commitsGroupsSort: (a, b) => {
228
+ const order = { feat: 1, fix: 2, perf: 3 };
229
+ return (order[a.title] || 99) - (order[b.title] || 99);
230
+ },
231
+ transform: (commit, context) => {
232
+ // Custom commit transformation
233
+ return commit;
234
+ }
235
+ }
236
+ }
237
+ }
238
+ };
239
+ ```
240
+
200
241
  ## Gradle Project Support
201
242
 
243
+ Gradle support is provided by the **[@versu/plugin-gradle](../plugin-gradle)** package.
244
+
202
245
  The CLI supports Gradle projects with:
203
246
 
204
247
  - **Multi-module projects** via `settings.gradle(.kts)`
@@ -269,6 +312,11 @@ Breaking changes trigger **major** version bumps:
269
312
  - name: Install VERSU CLI
270
313
  run: npm install -g @versu/cli
271
314
 
315
+ - name: Install Adapter
316
+ run: |
317
+ # install required adapters
318
+ npm install -g @versu/plugin-gradle
319
+
272
320
  - name: Version modules
273
321
  run: versu --adapter gradle
274
322
  ```
@@ -279,6 +327,7 @@ Breaking changes trigger **major** version bumps:
279
327
  version:
280
328
  script:
281
329
  - npm install -g @versu/cli
330
+ - npm install -g @versu/plugin-gradle
282
331
  - versu --adapter gradle
283
332
  ```
284
333
 
@@ -288,6 +337,7 @@ version:
288
337
  stage('Version') {
289
338
  steps {
290
339
  sh 'npm install -g @versu/cli'
340
+ sh 'npm install -g @versu/plugin-gradle'
291
341
  sh 'versu --adapter gradle'
292
342
  }
293
343
  }
@@ -380,6 +430,7 @@ npm publish --workspace packages/cli --access public
380
430
 
381
431
  - **[@versu/core](../core)** - Core library for custom integrations
382
432
  - **[@versu/action](../action)** - GitHub Actions integration
433
+ - **[@versu/plugin-gradle](../plugin-gradle)** - Gradle adapter plugin
383
434
 
384
435
  ## License
385
436
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versu/cli",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "description": "VERSU (CLI)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -38,9 +38,8 @@
38
38
  "types": "dist/index.d.ts",
39
39
  "dependencies": {
40
40
  "@oclif/core": "^4.8.0",
41
- "@versu/core": "^0.6.5",
42
- "oclif": "^4.14.0",
43
- "semver": "^7.7.4"
41
+ "@versu/core": "^0.6.7",
42
+ "oclif": "^4.14.0"
44
43
  },
45
44
  "devDependencies": {
46
45
  "@oclif/dev-cli": "^1.26.10",