Options
All
  • Public
  • Public/Protected
  • All
Menu

Package plugin-version

@yarnpkg/plugin-version

This plugin adds support for the new release workflow.

Install

This plugin is included by default starting from Yarn 4.

Type aliases

IncrementDecision

IncrementDecision: Exclude<Decision, UNDECIDED | DECLINE>

Releases

Releases: Map<Workspace, string>

VersionFile

VersionFile: object & object | object

Variables

Const SUPPORTED_UPGRADE_REGEXP

SUPPORTED_UPGRADE_REGEXP: RegExp = /^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/

Const placeholders

placeholders: Map<string, object> = new Map([[`%n`, {extract: parts => {if (parts.length >= 1) {return [parts[0], parts.slice(1)];} else {return null;}},generate: (previous = 0) => {return `${previous + 1}`;},}],])

Functions

applyPrerelease

  • applyPrerelease(version: string, __namedParameters: object): string

applyReleases

  • applyReleases(project: Project, newVersions: Map<Workspace, string>, __namedParameters: object): void

applyStrategy

  • applyStrategy(version: string | null, strategy: string): string

clearVersionFiles

  • clearVersionFiles(project: Project): Promise<void>

getUndecidedDependentWorkspaces

  • getUndecidedDependentWorkspaces(versionFile: Pick<VersionFile, "project" | "releases">, __namedParameters?: object): Workspace[][]

getUndecidedWorkspaces

openVersionFile

requireMoreDecisions

  • requireMoreDecisions(versionFile: VersionFile): boolean

resolveVersionFiles

  • resolveVersionFiles(project: Project, __namedParameters?: object): Promise<Map<Workspace, string>>

suggestStrategy

updateVersionFiles

  • updateVersionFiles(project: Project, workspaces: Array<Workspace>): Promise<void>

validateReleaseDecision

  • validateReleaseDecision(decision: unknown): string

Object literals

Const plugin

plugin: object

commands

commands: (VersionApplyCommand | VersionCheckCommand | VersionCommand)[] = [VersionApplyCommand,VersionCheckCommand,VersionCommand,]

configuration

configuration: object

deferredVersionFolder

deferredVersionFolder: object

default

default: string = `./.yarn/versions`

description

description: string = `Folder where are stored the versioning files`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

preferDeferredVersions

preferDeferredVersions: object

default

default: boolean = false

description

description: string = `If true, running \`yarn version\` will assume the \`--deferred\` flag unless \`--immediate\` is set`

type

type: BOOLEAN = SettingsType.BOOLEAN

Generated using TypeDoc