Skip to main content

versionUtils

Index

Enumerations

Decision

Decision:

DECLINE

DECLINE: decline

MAJOR

MAJOR: major

MINOR

MINOR: minor

PATCH

PATCH: patch

PRERELEASE

PRERELEASE: prerelease

UNDECIDED

UNDECIDED: undecided

Type Aliases

IncrementDecision

IncrementDecision: Exclude<Decision, Decision.UNDECIDED | Decision.DECLINE>

Releases

Releases: Map<Workspace, string>

VersionFile

VersionFile: { changedFiles: Set<PortablePath>; changedWorkspaces: Set<Workspace>; project: Project; releaseRoots: Set<Workspace>; releases: Releases; saveAll: () => Promise<void> } & ({ baseHash: string; baseTitle: string; root: PortablePath } | { baseHash: null; baseTitle: null; root: null })

Functions

applyPrerelease

  • applyPrerelease(version: string, __namedParameters: { current: string; prerelease: string }): string
  • Parameters

    • version: string
    • __namedParameters: { current: string; prerelease: string }

    Returns string

applyReleases

  • applyReleases(project: Project, newVersions: Map<Workspace, string>, __namedParameters: { report: Report }): void
  • Parameters

    Returns void

applyStrategy

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

    • version: null | string
    • strategy: string

    Returns string

clearVersionFiles

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

    Returns Promise<void>

getUndecidedDependentWorkspaces

  • getUndecidedDependentWorkspaces(versionFile: Pick<VersionFile, project | releases>, __namedParameters?: { include?: Set<Workspace> }): Workspace[][]

getUndecidedWorkspaces

openVersionFile

requireMoreDecisions

  • requireMoreDecisions(versionFile: VersionFile): boolean

resolveVersionFiles

  • resolveVersionFiles(project: Project, __namedParameters?: { prerelease?: null | string }): Promise<Map<Workspace, string>>
  • Parameters

    • project: Project
    • __namedParameters: { prerelease?: null | string } = {}

    Returns Promise<Map<Workspace, string>>

suggestStrategy

  • suggestStrategy(from: string, to: string): null | MAJOR | MINOR | PATCH | PRERELEASE
  • Parameters

    • from: string
    • to: string

    Returns null | MAJOR | MINOR | PATCH | PRERELEASE

updateVersionFiles

validateReleaseDecision

  • validateReleaseDecision(decision: unknown): string
  • Parameters

    • decision: unknown

    Returns string