Options
All
  • Public
  • Public/Protected
  • All
Menu

Package plugin-essentials

@yarnpkg/plugin-essentials

This plugin adds support for various commands deemed essential to a package manager (yarn add, yarn remove, ...).

Install

This plugin is included by default in Yarn.

Type aliases

ClipanionDefinition

ClipanionDefinition: ReturnType<Cli["definitions"]>[number]

ExtendedDefinition

ExtendedDefinition: ClipanionDefinition & object

FetchReleasesOptions

FetchReleasesOptions: object

Type declaration

  • includePrereleases: boolean

PrepareSpec

PrepareSpec: object

Type declaration

  • branch: string
  • context: CommandContext
  • force: boolean
  • repository: string

Suggestion

Suggestion: object

Type declaration

TreeNode

TreeNode: object

Type declaration

Variables

Const MERGE_CONFLICT_ANCESTOR

MERGE_CONFLICT_ANCESTOR: "|||||||" = `|||||||`

Const MERGE_CONFLICT_END

MERGE_CONFLICT_END: ">>>>>>>" = `>>>>>>>`

Const MERGE_CONFLICT_SEP

MERGE_CONFLICT_SEP: "=======" = `=======`

Const MERGE_CONFLICT_START

MERGE_CONFLICT_START: "<<<<<<<" = `<<<<<<<`

Const PR_REGEXP

PR_REGEXP: RegExp = /^[0-9]+$/

Const REMOTE_REGISTRY

REMOTE_REGISTRY: "https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml" = `https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml`

Const SIMPLE_SEMVER

SIMPLE_SEMVER: RegExp = /^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/

Const pluginCommands

pluginCommands: Map<string, string[][]> = new Map([[`constraints`, [[`constraints`, `query`],[`constraints`, `source`],[`constraints`],]],[`interactive-tools`, [[`search`],[`upgrade-interactive`],]],[`stage`, [[`stage`],]],[`version`, [[`version`, `apply`],[`version`, `check`],[`version`],]],[`workspace-tools`, [[`workspaces`, `focus`],[`workspaces`, `foreach`],]],])

Functions

Const BUILD_WORKFLOW

  • BUILD_WORKFLOW(__namedParameters: object, target: PortablePath): string[][]

Const BUILD_WORKFLOW

  • BUILD_WORKFLOW(__namedParameters: object, target: PortablePath): string[][]

Const CLONE_WORKFLOW

  • CLONE_WORKFLOW(__namedParameters: object, target: PortablePath): string[][]

Const UPDATE_WORKFLOW

  • UPDATE_WORKFLOW(__namedParameters: object): string[][]

applyModifier

autofixMergeConflicts

  • autofixMergeConflicts(configuration: Configuration, immutable: boolean): Promise<boolean>

convertMapsToObjects

  • convertMapsToObjects(arg: unknown): unknown

extractDescriptorFromPath

extractRangeModifier

  • extractRangeModifier(range: string, __namedParameters: object): string

fetchDescriptorFrom

  • fetchDescriptorFrom(ident: Ident, range: string, __namedParameters: object): Promise<null | Descriptor>

findProjectDescriptors

  • findProjectDescriptors(ident: Ident, __namedParameters: object): Promise<Map<string & object, object>>

getAvailablePlugins

  • getAvailablePlugins(configuration: Configuration): Promise<object>

getBranchRef

  • getBranchRef(branch: string): string

getModifier

getSuggestedDescriptors

  • getSuggestedDescriptors(request: Descriptor, __namedParameters: object): Promise<(object | object)[]>

getVariants

  • getVariants(file: string): string[]

prepareRepo

  • prepareRepo(spec: PrepareSpec, __namedParameters: object): Promise<void>

printTree

  • printTree(stdout: Writable, tree: TreeNode): void

runWorkflow

  • runWorkflow(workflow: Array<Array<string>>, __namedParameters: object): Promise<void>

savePlugin

  • savePlugin(pluginSpec: string, pluginBuffer: Buffer, __namedParameters: object): Promise<void>

setVersion

  • setVersion(configuration: Configuration, bundleVersion: string | null, bundleBuffer: Buffer, __namedParameters: object): Promise<void>

suggestTarget

whyRecursive

  • whyRecursive(project: Project, identHash: IdentHash, __namedParameters: object): object

whySimple

  • whySimple(project: Project, identHash: IdentHash, __namedParameters: object): object

Object literals

Const plugin

plugin: object

commands

commands: (ClipanionCommand | EntryCommand | NodeCommand | RunCommand | WorkspaceCommand)[] = [cleanCache,getConfig,setConfig,setResolutionPolicy,setVersionFromSources,setVersionPolicy,listWorkspaces,clipanionEntry,helpEntry,runEntry,versionEntry,add,bin,config,exec,install,link,node,pluginImportSources,pluginImport,pluginRemove,pluginList,pluginRuntime,rebuild,remove,runIndex,run,up,why,workspace,]

configuration

configuration: object

defaultSemverRangePrefix

defaultSemverRangePrefix: object

default

default: Modifier = suggestUtils.Modifier.CARET

description

description: string = `The default save prefix: '^', '~' or ''`

type

type: STRING = SettingsType.STRING

enableImmutableInstalls

enableImmutableInstalls: object

default

default: boolean = false

description

description: string = `If true, prevents the install command from modifying the lockfile`

type

type: BOOLEAN = SettingsType.BOOLEAN

Generated using TypeDoc