package-versioner 0.8.1 → 0.8.3
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 +10 -4
- package/dist/index.cjs +442 -495
- package/dist/index.js +452 -505
- package/docs/CI_CD_INTEGRATION.md +1 -1
- package/docs/versioning.md +59 -9
- package/package-versioner.schema.json +3 -3
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ npx package-versioner --dry-run --json
|
|
|
74
74
|
|
|
75
75
|
By default, `package-versioner` intelligently handles Git tag reachability to provide the best user experience:
|
|
76
76
|
|
|
77
|
-
- **Default
|
|
77
|
+
- **Default behaviour**: Uses reachable tags when available, but falls back to the latest repository tag if needed (common in feature branches)
|
|
78
78
|
- **Strict mode (`--strict-reachable`)**: Only uses tags reachable from the current commit, following strict Git semantics
|
|
79
79
|
|
|
80
80
|
This is particularly useful when working on feature branches that have diverged from the main branch where newer tags exist. The tool will automatically detect the Git context and provide helpful guidance:
|
|
@@ -151,13 +151,14 @@ Customize behaviour by creating a `version.config.json` file in your project roo
|
|
|
151
151
|
- `updateChangelog`: Whether to automatically update changelogs (default: true)
|
|
152
152
|
- `changelogFormat`: Format for changelogs - "keep-a-changelog" or "angular" (default: "keep-a-changelog")
|
|
153
153
|
- `strictReachable`: Only use reachable tags, no fallback to unreachable tags (default: false)
|
|
154
|
+
- `prereleaseIdentifier`: Identifier for prerelease versions (e.g., "alpha", "beta", "next") used in versions like "1.2.0-alpha.3"
|
|
154
155
|
- `cargo`: Options for Rust projects:
|
|
155
156
|
- `enabled`: Whether to handle Cargo.toml files (default: true)
|
|
156
157
|
- `paths`: Directories to search for Cargo.toml files (optional)
|
|
157
158
|
|
|
158
159
|
#### Monorepo-Specific Options
|
|
159
160
|
- `synced`: Whether all packages should be versioned together (default: true)
|
|
160
|
-
- `skip`: Array of package names to exclude from versioning
|
|
161
|
+
- `skip`: Array of package names or patterns to exclude from versioning. Supports exact names, scope wildcards, path patterns, and global wildcards (e.g., ["@scope/package-a", "@scope/*", "packages/**/*"])
|
|
161
162
|
- `packages`: Array of package names or patterns to target for versioning. Supports exact names, scope wildcards, and global wildcards (e.g., ["@scope/package-a", "@scope/*", "*"])
|
|
162
163
|
- `mainPackage`: Package name whose commit history should drive version determination
|
|
163
164
|
- `packageSpecificTags`: Whether to enable package-specific tagging behaviour (default: false)
|
|
@@ -167,7 +168,7 @@ For more details on CI/CD integration and advanced usage, see [CI/CD Integration
|
|
|
167
168
|
|
|
168
169
|
### Package Targeting
|
|
169
170
|
|
|
170
|
-
The `packages` configuration option
|
|
171
|
+
The `packages` configuration option controls which packages are processed for versioning. It supports several pattern types:
|
|
171
172
|
|
|
172
173
|
#### Exact Package Names
|
|
173
174
|
```json
|
|
@@ -200,7 +201,12 @@ Combine different pattern types:
|
|
|
200
201
|
}
|
|
201
202
|
```
|
|
202
203
|
|
|
203
|
-
**
|
|
204
|
+
**Behaviour:**
|
|
205
|
+
- When `packages` is specified, **only** packages matching those patterns will be processed
|
|
206
|
+
- When `packages` is empty or not specified, **all** workspace packages will be processed
|
|
207
|
+
- The `skip` option can exclude specific packages from the selected set
|
|
208
|
+
|
|
209
|
+
**Note**: Your workspace configuration (pnpm-workspace.yaml, package.json workspaces, etc.) determines which packages are available, but the `packages` option directly controls which ones get versioned.
|
|
204
210
|
|
|
205
211
|
### Package-Specific Tagging
|
|
206
212
|
|