settings for versioning manager

interface VersioningOptions {
    beforeReleaseCommit?: (
        workspace: WorkspacePackage[],
    ) => MaybePromise<void>;
    bumpWithDependants?: boolean | "only-minor";
    changelog?: ChangelogGeneratorParams;
    exclude?: null | string[];
    include?: null | string[];
    shouldInclude?: (file: ProjectChangedFile) => MaybePromise<boolean>;
    taggingSchema?: "date" | "semver";
}

Properties

beforeReleaseCommit?: (workspace: WorkspacePackage[]) => MaybePromise<void>

hook that is called after the versions were bumped and pushed to registries, but before the release commit is created and pushed to git.

can be used to add something to the release commit

bumpWithDependants?: boolean | "only-minor"

whether to also bump dependant packages when bumping a package, even if this is a semver-compatible bump.

example:

  • A depends on package B, and B depends on package C
  • A gets patch bump (e.g. v1.2.3 -> v1.2.4)
  • when false or 'only-minor', B and C єlwill not be bumped
  • when true, B and C will be bumped to the same version as A (i.e. v1.2.4)

only-minor will make fuman ignore patch bumps and only bump dependants when minor version is bumped.

note that dependants are always bumped on a major bump.

false
exclude?: null | string[]

globs of files changes to which to black-list (relative to package root)

['**/*.test.ts', '**/*.md']

include?: null | string[]

globs of files changes to which to white-list (relative to package root)

all
shouldInclude?: (file: ProjectChangedFile) => MaybePromise<boolean>

custom predicate for inclusion of files (will be called in addition to the globs, defaults to checking if the file is in tsconfig.json)

taggingSchema?: "date" | "semver"

schema to use when tagging commits

  • semver: semver-compatible schema (e.g. v1.2.3), based on the max. version of the workspace
  • date: date-based schema (e.g. v2023.01.01), based on the date of the release

unless your monorepo has standalone packages, you should probably use semver schema. date schema is primarily useful for repos where different packages have separate release cycles, to avoid conflicts when bumping versions.

note: this is only used for the release command, when tagging commits. this does not affect the versioning of the packages themselves, they always use semver.

'semver'