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.

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

Algorithm

Algorithm: function

Type declaration

    • (project: Project, patterns: Array<string>, opts: object): Promise<Array<Promise<object | null>>>

BuildAndSavePluginsSpec

BuildAndSavePluginsSpec: object

Type declaration

DedupeOptions

DedupeOptions: object

Type declaration

ExtendedDefinition

ExtendedDefinition: ClipanionDefinition & object

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

Tags

Tags: object

Type declaration

  • latest: Record<string, string>
  • tags: Array<string>

Variables

Const ERROR_CODE_DOC_REGEXP

ERROR_CODE_DOC_REGEXP: RegExp = /## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs

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 WORKSPACE_PROTOCOL

WORKSPACE_PROTOCOL: "workspace:" = `workspace:`

Const acceptedStrategies

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

Functions

applyModifier

autofixMergeConflicts

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

buildAndSavePlugin

  • buildAndSavePlugin(pluginSpec: string, __namedParameters: object, __namedParameters: object): Promise<void>

Const buildWorkflow

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

Const buildWorkflow

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

Const cloneWorkflow

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

dedupe

  • dedupe(project: Project, __namedParameters: object): Promise<number>

explainPeerRequirements

  • explainPeerRequirements(peerRequirementsHash: string, project: Project, opts: object): Promise<0 | 1>

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

getCodeName

  • getCodeName(code: string): string

getErrorCodeDetails

  • getErrorCodeDetails(configuration: Configuration): Promise<Map<string, string>>

getModifier

getSuggestedDescriptors

  • getSuggestedDescriptors(request: Descriptor, __namedParameters: object): Promise<Results>

getVariants

  • getVariants(file: string): string[]

makeTemporaryCache

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

makeWorkspaceDescriptor

prepareRepo

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

resolveRange

  • resolveRange(configuration: Configuration, request: string): Promise<string>

resolveTag

  • resolveTag(configuration: Configuration, request: "stable" | "canary"): Promise<string>

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>

suggestTargetList

toWorkspaceModifier

updatePlugins

Const updateWorkflow

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

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 | NodeCommand | RunCommand)[] = [cleanCache,getConfig,setConfig,unsetConfig,setResolutionPolicy,setVersionFromSources,setVersionPolicy,listWorkspaces,clipanionEntry,helpEntry,runEntry,versionEntry,add,bin,config,dedupe,exec,explainPeerRequirements,explain,info,install,link,unlink,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

values

values: string[] = [`^`, `~`, ``]

enableImmutableInstalls

enableImmutableInstalls: object

default

default: boolean = isCI

description

description: string = `If true (the default on CI), prevents the install command from modifying the lockfile`

type

type: BOOLEAN = SettingsType.BOOLEAN

preferReuse

preferReuse: object

default

default: boolean = false

description

description: string = `If true, \`yarn add\` will attempt to reuse the most common dependency range in other workspaces.`

type

type: BOOLEAN = SettingsType.BOOLEAN

Generated using TypeDoc