package-versioner 0.5.4 → 0.6.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 +20 -2
- package/dist/index.cjs +318 -170
- package/dist/index.js +317 -170
- package/docs/VERSIONING_STRATEGIES.md +30 -1
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -12,13 +12,24 @@ A lightweight yet powerful CLI tool for automated semantic versioning based on G
|
|
|
12
12
|
|
|
13
13
|
- Automatically determines version bumps based on commit history (using conventional commits)
|
|
14
14
|
- Supports both single package projects and monorepos with minimal configuration
|
|
15
|
+
- Support for both npm (package.json) and Rust (Cargo.toml) projects
|
|
15
16
|
- Flexible versioning strategies (e.g., based on commit types, branch patterns)
|
|
16
17
|
- Integrates with conventional commits presets
|
|
17
18
|
- Customizable through a `version.config.json` file or CLI options
|
|
18
|
-
- Automatically updates `package.json` version
|
|
19
|
+
- Automatically updates `package.json` or `Cargo.toml` version
|
|
19
20
|
- Creates appropriate Git tags for releases
|
|
20
21
|
- CI/CD friendly with JSON output support
|
|
21
22
|
|
|
23
|
+
## Supporting JavaScript and Rust Projects
|
|
24
|
+
|
|
25
|
+
`package-versioner` provides version management for both JavaScript/TypeScript (via package.json) and Rust (via Cargo.toml) projects:
|
|
26
|
+
|
|
27
|
+
- **JavaScript/TypeScript**: Automatically detects and updates version in package.json files
|
|
28
|
+
- **Rust**: Detects and updates version in Cargo.toml files using the same versioning strategies
|
|
29
|
+
- **Mixed Projects**: Supports repositories containing both package.json and Cargo.toml files
|
|
30
|
+
|
|
31
|
+
When run, the tool will automatically discover and update the appropriate manifest file based on the project structure.
|
|
32
|
+
|
|
22
33
|
## Usage
|
|
23
34
|
|
|
24
35
|
`package-versioner` is designed to be run directly using your preferred package manager's execution command, without needing global installation.
|
|
@@ -95,6 +106,10 @@ Customize behavior by creating a `version.config.json` file in your project root
|
|
|
95
106
|
"e2e"
|
|
96
107
|
],
|
|
97
108
|
"packagePath": "packages"
|
|
109
|
+
},
|
|
110
|
+
"cargo": {
|
|
111
|
+
"enabled": true,
|
|
112
|
+
"paths": ["src/", "crates/"]
|
|
98
113
|
}
|
|
99
114
|
}
|
|
100
115
|
```
|
|
@@ -103,6 +118,9 @@ Customize behavior by creating a `version.config.json` file in your project root
|
|
|
103
118
|
- Options like `synced`, `packages`, and `updateInternalDependencies` enable monorepo-specific behaviours.
|
|
104
119
|
- The `tagTemplate` and `packageTagTemplate` allow you to customize how Git tags are formatted for releases.
|
|
105
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
|
|
106
124
|
|
|
107
125
|
## How Versioning Works
|
|
108
126
|
|
|
@@ -130,4 +148,4 @@ This project was originally forked from and inspired by [`jucian0/turbo-version`
|
|
|
130
148
|
|
|
131
149
|
## License
|
|
132
150
|
|
|
133
|
-
MIT
|
|
151
|
+
MIT
|