Options
All
  • Public
  • Public/Protected
  • All
Menu

Package plugin-version

@yarnpkg/plugin-version

This plugin adds support for the new release workflow.

Install

yarn plugin import version

Type aliases

Releases

Releases: Map<Workspace, Exclude<Decision, UNDECIDED>>

Releases

Releases: Map<Workspace, Exclude<Decision, UNDECIDED>>

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 acceptedStrategies

acceptedStrategies: Set<UNDECIDED | DECLINE | MAJOR | MINOR | PATCH | PRERELEASE> = new Set(Object.values(versionUtils.Decision).filter(decision => {return decision !== versionUtils.Decision.UNDECIDED;}))

Functions

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>

fetchBase

  • fetchBase(root: PortablePath, __namedParameters: object): Promise<object>

fetchChangedFiles

  • fetchChangedFiles(root: PortablePath, __namedParameters: object): Promise<(string & object)[]>

fetchRoot

  • fetchRoot(initialCwd: PortablePath): Promise<null | string & object>

getUndecidedDependentWorkspaces

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

getUndecidedWorkspaces

openVersionFile

requireMoreDecisions

  • requireMoreDecisions(versionFile: VersionFile): boolean

resolveVersionFiles

  • resolveVersionFiles(project: Project): Promise<Map<any, any>>

suggestStrategy

updateVersionFiles

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

Object literals

Const plugin

plugin: object

commands

commands: (VersionApplyCommand | VersionApplyCommand | VersionCommand)[] = [versionApply,versionCheck,version,]

configuration

configuration: object

changesetBaseRefs

changesetBaseRefs: object

default

default: string[] = [`master`, `origin/master`, `upstream/master`]

description

description: string = `The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.`

isArray

isArray: true = true

isNullable

isNullable: false = false

type

type: STRING = SettingsType.STRING

changesetIgnorePatterns

changesetIgnorePatterns: object

default

default: never[] = []

description

description: string = `Array of glob patterns; files matching them will be ignored when fetching the changed files`

isArray

isArray: true = true

type

type: STRING = SettingsType.STRING

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