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

Algorithm

Algorithm: function

Type declaration

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

ClipanionDefinition

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

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

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

applyModifier

autofixMergeConflicts

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

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

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

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

values

values: 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