Skip to content

Canary mode ignores independent version mode — uses root package version for all packages #51

@blowsie

Description

@blowsie

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions