Skip to content

Monorepo Configuration ​

Reference of the monorepo options - version mode, packages, version groups, ignored and private packages, moved packages. A standalone package needs none of them.

ts
import { defineConfig } from 'relizy'

export default defineConfig({
  monorepo: {
    versionMode: 'selective',
    packages: ['packages/*', 'apps/*'],
    ignored: ['apps/docs'],
  },
})

versionMode ​

  • Type: 'unified' | 'selective' | 'independent'
  • Required unless groups is set (they cannot be set together)

How the packages are versioned: one version for all of them (unified), one version for the packages with commits (selective), or a version per package (independent). See Version Modes.

packages ​

  • Type: string[]
  • Required unless groups is set (they cannot be set together)

Glob patterns, relative to cwd, of the package directories (['packages/*']). A directory is a package when it has a package.json.

groups ​

  • Type: VersionGroup[]
  • Default: none

Sets of packages released together in a single run, each with its own version mode. Replaces versionMode and packages. Every package belongs to one group: a package matched by several groups goes to the group listing its exact path (no glob), any other overlap is an error. At most one group uses the unified or selective mode: it owns the root version and the repository tags. See Version Groups for the behavior and the examples.

FieldTypeEffect
namestring (required)Name in the logs, targeted by --group <name>
titlestring (default: name)Name in the bump confirmation, the social posts, the PR comment and the release summary
versionMode'unified' | 'selective' | 'independent' (required)Version mode of the packages of the group
packagesstring[] (required)Glob patterns of the package directories of the group
ignoredstring[] (default: [])Package directories to ignore in the group, on top of monorepo.ignored
bump{ capZeroMajor?, dependencyTypes?, dependents? }Overrides bump.capZeroMajor, bump.dependencyTypes and bump.dependents
changelog{ rootChangelog?, includeCommitBody? }Overrides changelog.rootChangelog and changelog.includeCommitBody
release{ providerRelease?, social? }providerRelease: false: no provider release for its packages; social: false: left out of the social posts
ai{ providerRelease? }Overrides ai.providerRelease (enabled, onlyStable), e.g. { enabled: false } to limit the AI calls of an independent group
ts
export default defineConfig({
  monorepo: {
    groups: [
      { name: 'main', versionMode: 'selective', packages: ['packages/*'] },
      { name: 'tooling', title: 'Tooling', versionMode: 'independent', packages: ['tooling/*'], changelog: { rootChangelog: false } },
    ],
  },
})

The options without a group field (privatePackages, movedPackages) apply to every group.

ignored ​

  • Type: string[]
  • Default: []

Glob patterns of package directories to leave out, matched as packages. An ignored package is not bumped, has no changelog, is not published, gets no provider release and is not listed in the PR comment.

In unified and selective mode, the root version comes from the commits of the released packages: a commit changing only ignored packages, private packages left out by privatePackages or files outside every package (CI, scripts, the lockfile) does not count. The root changelog lists the commits of the released packages, and the ones changing files outside every package, without bumping. Keep the changes of an ignored package in their own commits: a commit also changing a released package counts, a breaking change included.

privatePackages ​

  • Type: 'ignore' | 'release'
  • Default: 'ignore'
  • CLI: --private-packages <mode> (bump, changelog, release)

What relizy does with the private packages of the workspace ("private": true in their package.json):

  • ignore: they are left out of the release.
  • release: they are released as the other packages (bump, changelog, tag, GitHub/GitLab release, PR comment), but never published to a registry.

A project without workspace packages (a private app with a single package.json) is released, private or not. ignored still applies: an ignored private package stays out. See Private Projects & Apps.

movedPackages ​

  • Type: Record<string, string>
  • Default: {}

Package directories moved or renamed that git does not detect, as old path: new path (relative to cwd, no glob), so the commits made before the move still belong to the package. See Moving & Renaming Packages.