Options
All
  • Public
  • Public/Protected
  • All
Menu

Package plugin-stage

@yarnpkg/plugin-stage

This plugin adds support for the yarn stage command.

Install

yarn plugin import stage

Type aliases

Consensus

Consensus: object

Type declaration

  • useComponent: boolean
  • useThirdPerson: boolean
  • useUpperCase: boolean

FileAction

FileAction: object

Type declaration

Variables

Const ALL_DRIVERS

ALL_DRIVERS: object[] = [GitDriver,MercurialDriver,]

Const COMMIT_DEPTH

COMMIT_DEPTH: 11 = 11

Const MESSAGE_MARKER

MESSAGE_MARKER: "Commit generated via `yarn stage`" = `Commit generated via \`yarn stage\``

Const VERBS

VERBS: Map<ActionType, string> = new Map([// Package actions[ActionType.CREATE, `create`],[ActionType.DELETE, `delete`],// File actions[ActionType.ADD, `add`],[ActionType.REMOVE, `remove`],[ActionType.MODIFY, `update`],])

Functions

checkConsensus

  • checkConsensus(lines: Array<string>, regex: RegExp): boolean

expandDirectory

  • expandDirectory(initialCwd: PortablePath): (string & object)[]

findConsensus

  • findConsensus(lines: Array<string>): Consensus

findDriver

findVcsRoot

  • findVcsRoot(cwd: PortablePath, __namedParameters: object): Promise<null | string & object>

genCommitMessage

genCommitMessage

  • genCommitMessage(cwd: PortablePath, changes: Array<stageUtils.FileAction>): Promise<string>

getCommitPrefix

  • getCommitPrefix(consensus: Consensus): "" | "chore(yarn): "

getLastCommitHash

  • getLastCommitHash(cwd: PortablePath): Promise<null | string>

isYarnFile

  • isYarnFile(path: PortablePath, __namedParameters: object): boolean

resolveToVcs

  • Given two directories, this function will return the location of the second one in the first one after properly resolving symlinks (kind of like a realpath, except that we only resolve the last component of the original path).

    If the second directory isn't in the first one, this function returns null.

    If the second directory isn't in the first one, this function returns null.

    Parameters

    Returns (string & object)[]

Object literals

Const Driver

Driver: object

filterChanges

  • filterChanges(cwd: string, paths: Set<string>, filenames: Set<string>): Promise<never[]>

findRoot

  • findRoot(cwd: PortablePath): Promise<null | string & object>

genCommitMessage

  • genCommitMessage(cwd: PortablePath, changeList: Array<stageUtils.FileAction>): Promise<string>

makeCommit

  • makeCommit(cwd: PortablePath, changeList: Array<stageUtils.FileAction>, commitMessage: string): Promise<void>

makeReset

  • makeReset(cwd: PortablePath, changeList: Array<stageUtils.FileAction>): Promise<void>

makeUpdate

  • makeUpdate(cwd: string, changeList: Array<stageUtils.FileAction>): Promise<void>

Const Driver

Driver: object

filterChanges

findRoot

  • findRoot(cwd: PortablePath): Promise<null | string & object>

genCommitMessage

  • genCommitMessage(cwd: PortablePath, changeList: Array<stageUtils.FileAction>): Promise<string>

makeCommit

  • makeCommit(cwd: PortablePath, changeList: Array<stageUtils.FileAction>, commitMessage: string): Promise<void>

makeReset

  • makeReset(cwd: PortablePath, changeList: Array<stageUtils.FileAction>): Promise<void>

Const plugin

plugin: object

commands

commands: StageCommand[] = [stage,]

Generated using TypeDoc