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

BuildAndSavePluginsSpec

BuildAndSavePluginsSpec: object

Type declaration

DedupeOptions

DedupeOptions: object

Type declaration

ExtendedDefinition

ExtendedDefinition: ClipanionDefinition & object

FetchDescriptorFromOptions

FetchDescriptorFromOptions: object & object | object

NullableSuggestion

NullableSuggestion: object

Type declaration

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

PackageUpdate

PackageUpdate: object

Type declaration

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_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, version: string | null): 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>

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, fetchBuffer: function, __namedParameters: object): Promise<object>

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<object>[]>

Const plugin

plugin: object

commands

commands: (ClipanionCommand | EntryCommand | NodeCommand | RunIndexCommand)[] = [CacheCleanCommand,ConfigGetCommand,ConfigSetCommand,ConfigUnsetCommand,SetResolutionCommand,SetVersionSourcesCommand,SetVersionCommand,WorkspacesListCommand,ClipanionCommand,HelpCommand,EntryCommand,VersionCommand,AddCommand,BinCommand,ConfigCommand,DedupeCommand,ExecCommand,ExplainPeerRequirementsCommand,ExplainCommand,InfoCommand,YarnCommand,LinkCommand,UnlinkCommand,NodeCommand,PluginCheckCommand,PluginImportSourcesCommand,PluginImportCommand,PluginRemoveCommand,PluginListCommand,PluginRuntimeCommand,RebuildCommand,RemoveCommand,RunIndexCommand,RunCommand,UpCommand,WhyCommand,WorkspaceCommand,]

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