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]

DedupeAlgorithm

DedupeAlgorithm: function

Type declaration

DedupePromise

DedupePromise: Promise<object | null>

DedupeSpec

DedupeSpec: object

Type declaration

ExtendedDefinition

ExtendedDefinition: ClipanionDefinition & object

FetchReleasesOptions

FetchReleasesOptions: object

Type declaration

  • includePrereleases: boolean

NullableSuggestion

NullableSuggestion: object

Type declaration

  • descriptor: Descriptor | null
  • name: string
  • reason: string

PrepareSpec

PrepareSpec: object

Type declaration

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

Results

Results: object

Type declaration

Suggestion

Suggestion: object

Type declaration

  • descriptor: Descriptor
  • name: string
  • reason: string

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 acceptedStrategies

acceptedStrategies: Set<HIGHEST> = new Set(Object.values(Strategy))

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

dedupe

  • dedupe(__namedParameters: object): Promise<number>

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<Results>

getVariants

  • getVariants(file: string): string[]

makeTemporaryCache

  • makeTemporaryCache<T>(cb: function): Promise<T>

prepareRepo

  • prepareRepo(spec: PrepareSpec, __namedParameters: object): Promise<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 DEDUPE_ALGORITHMS

DEDUPE_ALGORITHMS: object

highest

  • highest(project: Project, patterns: string[], __namedParameters: object): Promise<Promise<null | object>[]>

Const plugin

plugin: object

commands

commands: (ClipanionCommand | EntryCommand | DedupeCommand | NodeCommand | RunCommand | WorkspaceCommand)[] = [cleanCache,getConfig,setConfig,setResolutionPolicy,setVersionFromSources,setVersionPolicy,listWorkspaces,clipanionEntry,helpEntry,runEntry,versionEntry,add,bin,config,dedupe,exec,info,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