Open yjaaidi opened 3 years ago
Considering the following issues:
A single virtual project named "workspace" with a global configuration should allow more control. In the future, if we need it for some reason, we can even run a semver
cli and feed it with a semver.json
configuration.
The new configuration could look something like this.
{
"name": "workspace",
"root": ".",
"architect": {
"version": {
"builder": "@jscutlery/semver:version",
"options": {
"configs": [
{
"name": "rx-state",
"type": "independent",
// path is optional for independent versioning
// as we can just pick the projectRoot in workspace.json
// "path": "packages/rx-state", // we need this for git log & changelog path & root package.json
},
{
"name": "cdk",
"type": "group",
"path": "packages/cdk",
"packages": [
"packages/cdk/operators",
"packages/cdk/helpers", // or even a wildcard "packages/cdk/*"
]
}
]
}
}
}
}
Later, this could evolve into something like:
{
...
"configs": [
"packages/*/semver.json"
]
}
in order to move semver.json configs inside projects and stop the workspace.json clutter.
The main drawback is that we can't use nx options like --affected
etc... to run semver for independent projects... but that's not really important as semver
is idempotent and won't bump if no changes occurred since last bump.
Is this still a planned feature?
This is a follow-up to the following discussion https://github.com/jscutlery/semver/discussions/98.
Given a repo with 3 packages a, b & c, one should be able to sync versions for a & b but still keep independent versioning for c; meaning that changing a would have to bump b as well.
The solution we agreed to is to use the project structure for grouping (using folders).
Example:
2021-04-29 update
vMAJOR.MINOR.PATCH
group-name-MAJOR.MINOR.PATCH
cc. @LayZeeDK, @NachoVazquez, @santoshyadavdev, and @SerkanSipahi.