settings for versioning manager

interface VersioningOptions {
    beforeReleaseCommit?: (
        workspace: WorkspacePackage[],
    ) => MaybePromise<void>;
    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

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'