Description
When using versionMode: 'independent' in a monorepo, canary mode (relizy release --canary) computes a single version from the root package.json and applies it to all packages, ignoring each package's actual version.
Expected behavior
Canary versions should be based on each package's individual version, matching how bumpIndependentMode works. For example:
@my-org/ui@9.1.0 → @my-org/ui@9.1.1-rc.<sha>.0
@my-org/config@1.2.0 → @my-org/config@1.2.1-rc.<sha>.0
Actual behavior
All packages get the same canary version derived from the root package.json version:
@my-org/ui@9.1.0 → @my-org/ui@1.0.1-rc.<sha>.0
@my-org/config@1.2.0 → @my-org/config@1.0.1-rc.<sha>.0
Root cause
In bumpCanaryMode (relizy source), line ~3831:
const currentVersion = rootPackageBase.version;
This always reads from the root package.json, then applies the single computed canary version to all packages (line ~3864-3867):
const packagesWithCanaryVersion = packages.map((pkg) => ({
...pkg,
newVersion: canaryVersion
}));
Compare with bumpIndependentMode which correctly resolves tags and versions per-package.
Config
export default defineConfig({
monorepo: {
versionMode: 'independent',
packages: ['packages/*'],
},
})
Environment
- relizy v1.2.0
- pnpm workspace monorepo
- CI: GitHub Actions
Description
When using
versionMode: 'independent'in a monorepo, canary mode (relizy release --canary) computes a single version from the rootpackage.jsonand applies it to all packages, ignoring each package's actual version.Expected behavior
Canary versions should be based on each package's individual version, matching how
bumpIndependentModeworks. For example:@my-org/ui@9.1.0→@my-org/ui@9.1.1-rc.<sha>.0@my-org/config@1.2.0→@my-org/config@1.2.1-rc.<sha>.0Actual behavior
All packages get the same canary version derived from the root
package.jsonversion:@my-org/ui@9.1.0→@my-org/ui@1.0.1-rc.<sha>.0@my-org/config@1.2.0→@my-org/config@1.0.1-rc.<sha>.0Root cause
In
bumpCanaryMode(relizy source), line ~3831:This always reads from the root
package.json, then applies the single computed canary version to all packages (line ~3864-3867):Compare with
bumpIndependentModewhich correctly resolves tags and versions per-package.Config
Environment