Options
All
  • Public
  • Public/Protected
  • All
Menu

Package yarnpkg-core

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AllDependencies

AllDependencies: "dependencies" | "devDependencies" | "peerDependencies"

AllTransforms

AllTransforms: typeof transforms

BaseSettingsDefinition

BaseSettingsDefinition<T>: object & object | object

Type parameters

Body

Body: null | string | Buffer | object

BuildDirective

BuildDirective: []

CommandContext

CommandContext: object

Type declaration

ConfigurationDefinitionMap

ConfigurationDefinitionMap<V>: object

Type parameters

  • V

Type declaration

DefinitionForType

DefinitionForType<T>: T extends Array<infer U> ? object : object

Type parameters

  • T

DefinitionForTypeHelper

DefinitionForTypeHelper<T>: T extends Map<string, infer U> ? object & object & object & object | object & object & object & object : T extends ToMapValue<infer U> ? object & object & object & object | object & object & object & object : SimpleDefinitionForType<T>

Type parameters

  • T

DescriptorHash

DescriptorHash: string & object

Unique hash of a package descriptor. Used as key in various places so that two descriptors can be quickly compared.

ExecutePackageAccessibleBinaryOptions

ExecutePackageAccessibleBinaryOptions: object

Type declaration

  • cwd: PortablePath
  • Optional nodeArgs?: Array<string>
  • project: Project
  • stderr: Writable
  • stdin: Readable | null
  • stdout: Writable

ExecutePackageScriptOptions

ExecutePackageScriptOptions: object

Type declaration

  • Optional cwd?: PortablePath | undefined
  • project: Project
  • stderr: Writable
  • stdin: Readable | null
  • stdout: Writable

ExecuteWorkspaceAccessibleBinaryOptions

ExecuteWorkspaceAccessibleBinaryOptions: object

Type declaration

  • cwd: PortablePath
  • stderr: Writable
  • stdin: Readable | null
  • stdout: Writable

ExecuteWorkspaceLifecycleScriptOptions

ExecuteWorkspaceLifecycleScriptOptions: object

Type declaration

ExecuteWorkspaceScriptOptions

ExecuteWorkspaceScriptOptions: object

Type declaration

  • Optional cwd?: PortablePath | undefined
  • stderr: Writable
  • stdin: Readable | null
  • stdout: Writable

ExecvpOptions

ExecvpOptions: object

Type declaration

  • cwd: PortablePath
  • Optional encoding?: undefined | string
  • Optional env?: undefined | object
  • Optional strict?: undefined | false | true

FetchFromCacheOptions

FetchFromCacheOptions: object

Type declaration

FetchOptions

FetchOptions: MinimalFetchOptions & object

FetchResult

FetchResult: object

Type declaration

  • Optional checksum?: undefined | string

    The checksum for the fetch result.

  • Optional discardFromLookup?: undefined | false | true

    If true, the package location won't be considered for package lookups (so for example with can use this flag to indicate that the link: protocol should be resolvable, but should never be used to detect the package that owns a path).

  • Optional localPath?: PortablePath | null

    The "true" place where we can find the sources. We use that in order to compute the file: and link: relative paths.

  • packageFs: FakeFS<PortablePath>
  • prefixPath: PortablePath

    The path where the package can be found within the packageFs. This is typically the "node_modules//` path.

  • Optional releaseFs?: undefined | function

    If set, this function will be called once the fetch result isn't needed anymore. Typically used to release the ZipFS memory.

FinalizeInstallData

FinalizeInstallData: object

Type declaration

  • Optional customData?: any

    A set of data that are preserved from one install to the next. Linkers are allowed to cache whatever they want (including ES-native data structures like Map and Set) as long as they remember to follow basic rules:

    • They have to be prepared for no custom data to be passed at all; Yarn is allowed to clear the cache at will.

    • They have to cache only things that are unlikely to change. For instance caching the packages' scripts field is fine, but caching their dependencies isn't (first because dependencies are provided by the core itself, so caching wouldn't make sense, but also because users may change the dependencies of any package via the resolutions field).

    And of course, they have to manage their own migration.

    • They have to be prepared for no custom data to be passed at all; Yarn is allowed to clear the cache at will.

    • They have to cache only things that are unlikely to change. For instance caching the packages' scripts field is fine, but caching their dependencies isn't (first because dependencies are provided by the core itself, so caching wouldn't make sense, but also because users may change the dependencies of any package via the resolutions field).

    And of course, they have to manage their own migration.

  • Optional records?: Array<FinalizeInstallStatus>

    A list of extra package instances that may have been installed on the disk. While we usually recommend to avoid this feature (one package should only be installed once in a project, virtual dependencies excluded), it may be required to duplicate installs in some cases - for instance to replicate the hoisting that would happen with the node-modules linking strategy.

FinalizeInstallStatus

FinalizeInstallStatus: object

Type declaration

FindProjectOptions

FindProjectOptions: object

Type declaration

  • Optional lookup?: ProjectLookup
  • Optional strict?: undefined | false | true
  • Optional usePath?: undefined | false | true
  • Optional useRc?: undefined | false | true

FormatType

FormatType: Type

GetPackageAccessibleBinariesOptions

GetPackageAccessibleBinariesOptions: object

Type declaration

HardDependencies

HardDependencies: "dependencies" | "devDependencies"

HasPackageScriptOption

HasPackageScriptOption: object

Type declaration

Hooks

Hooks: object

Type declaration

  • Optional afterAllInstalled?: undefined | function
  • Optional globalHashGeneration?: undefined | function
  • Optional populateYarnPaths?: undefined | function
  • Optional reduceDependency?: undefined | function
  • Optional registerPackageExtensions?: undefined | function
  • Optional setupScriptEnvironment?: undefined | function
  • Optional validateProject?: undefined | function
  • Optional validateWorkspace?: undefined | function
  • Optional wrapScriptExecution?: undefined | function

IdentHash

IdentHash: string & object

Unique hash of a package descriptor. Used as key in various places so that two descriptors can be quickly compared.

InstallOptions

InstallOptions: object

Type declaration

  • cache: Cache

    Instance of the cache that the project will use when packages have to be fetched. Some fetches may occur even during the resolution, for example when resolving git packages.

  • Optional fetcher?: Fetcher

    An optional override for the default fetching pipeline. This is for overrides only - if you need to add resolvers, prefer adding them through regular plugins instead.

  • Optional immutable?: undefined | false | true

    If true, Yarn will check that the lockfile won't change after the resolution step. Additionally, after the link step, Yarn will retrieve the list of files in immutablePatterns and check that they didn't get modified either.

  • Optional lockfileOnly?: undefined | false | true

    If true, Yarn will exclusively use the lockfile metadata. Setting this flag will cause it to ignore any change in the manifests, and to abort if any dependency isn't present in the lockfile.

  • Optional persistProject?: undefined | false | true

    If true (the default), Yarn will update the workspace manifests once the install has completed.

  • report: Report

    Provide a report instance that'll be use to store the information emitted during the install process.

  • Optional resolver?: Resolver

    An optional override for the default resolution pipeline. This is for overrides only - if you need to add resolvers, prefer adding them through regular plugins instead.

  • Optional skipBuild?: undefined | false | true

    If true, Yarn will skip the build step during the install. Contrary to setting the enableScripts setting to false, setting this won't cause the generated artifacts to change.

InstallState

InstallState: Pick<Project, typeof INSTALL_STATE_FIELDS[keyof typeof INSTALL_STATE_FIELDS][number]>

InstallStatus

InstallStatus: object

Type declaration

LightReportOptions

LightReportOptions: object

Type declaration

  • configuration: Configuration
  • stdout: Writable
  • Optional suggestInstall?: undefined | false | true

LinkOptions

LinkOptions: MinimalLinkOptions & object

LocatorHash

LocatorHash: string & object

Unique hash of a package locator. Used as key in various places so that two locators can be quickly compared.

MapConfigurationValue

MapConfigurationValue<T>: ToMapValue<T>
deprecated

Use miscUtils.ToMapValue

Type parameters

  • T: object

MapSettingsDefinition

MapSettingsDefinition: BaseSettingsDefinition<MAP> & object

MapValue

MapValue<T>: T extends Map<any, infer V> ? V : never

Type parameters

  • T

MapValueToObjectValue

MapValueToObjectValue<T>:

Type parameters

  • T

MinimalFetchOptions

MinimalFetchOptions: object

Type declaration

MinimalLinkOptions

MinimalLinkOptions: object

Type declaration

MinimalResolveOptions

MinimalResolveOptions: object

Type declaration

Options

Options: object

Type declaration

  • configuration: Configuration
  • Optional headers?: undefined | object
  • Optional json?: undefined | false | true
    deprecated

    use jsonRequest and jsonResponse instead

  • Optional jsonRequest?: undefined | false | true
  • Optional jsonResponse?: undefined | false | true
  • Optional method?: Method

PackageExtension

PackageExtension: object | object | object & object

PackageExtensionData

PackageExtensionData: miscUtils.MapValueToObjectValue<miscUtils.MapValue<ConfigurationValueMap["packageExtensions"]>>

ParseRangeOptions

ParseRangeOptions: object

Type declaration

  • Optional parseSelector?: undefined | false | true

    Whether to parse the selector as a query string

  • Optional requireBindings?: undefined | false | true

    Throw an error if bindings are missing

  • Optional requireProtocol?: boolean | string

    Throw an error if the protocol is missing or is not the specified one

  • Optional requireSource?: undefined | false | true

    Throw an error if the source is missing

ParseRangeReturnType

ParseRangeReturnType<Opts>: object & object & object & object

Type parameters

PeerRequirement

PeerRequirement: object

Type declaration

PipevpOptions

PipevpOptions: object

Type declaration

  • cwd: PortablePath
  • Optional end?: EndStrategy
  • Optional env?: undefined | object
  • stderr: Writable
  • stdin: Readable | null
  • stdout: Writable
  • Optional strict?: undefined | false | true

Plugin

Plugin<PluginHooks>: object

Type parameters

  • PluginHooks

Type declaration

PluginConfiguration

PluginConfiguration: object

Type declaration

  • modules: Map<string, any>
  • plugins: Set<string>

ProcessEnvironment

ProcessEnvironment: object

Type declaration

  • [key: string]: string

ProgressDefinition

ProgressDefinition: object

Type declaration

  • progress: number
  • Optional title?: undefined | string

RegistryBlock

RegistryBlock: object

Type declaration

  • Optional enumerators?: undefined | object
  • Optional hits?: undefined | object
  • Optional values?: undefined | object

RegistryFile

RegistryFile: object

Type declaration

  • Optional blocks?: undefined | object
  • Optional lastUpdate?: undefined | number

ResolveOptions

ResolveOptions: MinimalResolveOptions & object

RestoreInstallStateOpts

RestoreInstallStateOpts: object

Type declaration

SettingTransforms

SettingTransforms: object

Type declaration

  • getNativePaths: boolean
  • hideSecrets: boolean

SettingsDefinition

SettingsDefinitionNoDefault

SettingsDefinitionNoDefault: MapSettingsDefinition | ShapeSettingsDefinition | Omit<SimpleSettingsDefinition, "default">

ShapeSettingsDefinition

ShapeSettingsDefinition: BaseSettingsDefinition<SHAPE> & object

SimpleDefinitionForType

SimpleDefinitionForType<T>: SimpleSettingsDefinition & object

Type parameters

  • T

SimpleSettingsDefinition

SimpleSettingsDefinition: BaseSettingsDefinition<Exclude<SettingsType, SHAPE | MAP>> & object

Source

Source<T>: T extends keyof AllTransforms ? Parameters<AllTransforms[T]["json"]>[0] | null : string | null

Type parameters

  • T

Specs

Specs: Array<[]>

StreamReportOptions

StreamReportOptions: object

Type declaration

  • configuration: Configuration
  • Optional forgettableBufferSize?: undefined | number
  • Optional forgettableNames?: Set<MessageName | null>
  • Optional includeFooter?: undefined | false | true
  • Optional includeInfos?: undefined | false | true
  • Optional includeLogs?: undefined | false | true
  • Optional includeWarnings?: undefined | false | true
  • Optional json?: undefined | false | true
  • stdout: Writable

TimerOptions

TimerOptions: object

Type declaration

  • Optional skipIfEmpty?: undefined | false | true

TreeMap

TreeMap: object

Type declaration

TreeNode

TreeNode: object

Type declaration

  • Optional children?: Array<TreeNode> | TreeMap
  • Optional label?: undefined | string
  • Optional value?: formatUtils.Tuple

TreeifyNode

TreeifyNode: object

Type declaration

Tuple

Tuple<T>: keyof []

Type parameters

Variables

Const BASE_FORGETTABLE_BUFFER_SIZE

BASE_FORGETTABLE_BUFFER_SIZE: 5 = 5

Const BASE_FORGETTABLE_NAMES

BASE_FORGETTABLE_NAMES: Set<null | UNNAMED | EXCEPTION | MISSING_PEER_DEPENDENCY | CYCLIC_DEPENDENCIES | DISABLED_BUILD_SCRIPTS | BUILD_DISABLED | SOFT_LINK_BUILD | MUST_BUILD | MUST_REBUILD | BUILD_FAILED | RESOLVER_NOT_FOUND | FETCHER_NOT_FOUND | LINKER_NOT_FOUND | FETCH_NOT_CACHED | YARN_IMPORT_FAILED | REMOTE_INVALID | REMOTE_NOT_FOUND | RESOLUTION_PACK | CACHE_CHECKSUM_MISMATCH | UNUSED_CACHE_ENTRY | MISSING_LOCKFILE_ENTRY | WORKSPACE_NOT_FOUND | TOO_MANY_MATCHING_WORKSPACES | CONSTRAINTS_MISSING_DEPENDENCY | CONSTRAINTS_INCOMPATIBLE_DEPENDENCY | CONSTRAINTS_EXTRANEOUS_DEPENDENCY | CONSTRAINTS_INVALID_DEPENDENCY | CANT_SUGGEST_RESOLUTIONS | FROZEN_LOCKFILE_EXCEPTION | CROSS_DRIVE_VIRTUAL_LOCAL | FETCH_FAILED | DANGEROUS_NODE_MODULES | NODE_GYP_INJECTED | AUTHENTICATION_NOT_FOUND | INVALID_CONFIGURATION_KEY | NETWORK_ERROR | LIFECYCLE_SCRIPT | CONSTRAINTS_MISSING_FIELD | CONSTRAINTS_INCOMPATIBLE_FIELD | CONSTRAINTS_EXTRANEOUS_FIELD | CONSTRAINTS_INVALID_FIELD | AUTHENTICATION_INVALID | PROLOG_UNKNOWN_ERROR | PROLOG_SYNTAX_ERROR | PROLOG_EXISTENCE_ERROR | STACK_OVERFLOW_RESOLUTION | AUTOMERGE_FAILED_TO_PARSE | AUTOMERGE_IMMUTABLE | AUTOMERGE_SUCCESS | AUTOMERGE_REQUIRED | DEPRECATED_CLI_SETTINGS | PLUGIN_NAME_NOT_FOUND | INVALID_PLUGIN_REFERENCE | CONSTRAINTS_AMBIGUITY | CACHE_OUTSIDE_PROJECT | IMMUTABLE_INSTALL | IMMUTABLE_CACHE | INVALID_MANIFEST | PACKAGE_PREPARATION_FAILED | INVALID_RANGE_PEER_DEPENDENCY | INCOMPATIBLE_PEER_DEPENDENCY | DEPRECATED_PACKAGE | INCOMPATIBLE_OS | INCOMPATIBLE_CPU | FROZEN_ARTIFACT_EXCEPTION | TELEMETRY_NOTICE | PATCH_HUNK_FAILED | INVALID_CONFIGURATION_VALUE | UNUSED_PACKAGE_EXTENSION | REDUNDANT_PACKAGE_EXTENSION> = new Set<MessageName | null>([MessageName.FETCH_NOT_CACHED, MessageName.UNUSED_CACHE_ENTRY])

Const CACHE_VERSION

CACHE_VERSION: 7 = 7

Const DEFAULT_LOCK_FILENAME

DEFAULT_LOCK_FILENAME: string & object = `yarn.lock` as Filename

Const DEFAULT_RC_FILENAME

DEFAULT_RC_FILENAME: string & object = `.yarnrc.yml` as Filename

Const ENVIRONMENT_PREFIX

ENVIRONMENT_PREFIX: "yarn_" = `yarn_`

Const FETCHER_CONCURRENCY

FETCHER_CONCURRENCY: 32 = 32

Const FormatType

FormatType: Type = formatUtils.Type

Const GROUP

GROUP: null | object = process.env.GITHUB_ACTIONS? {start: (what: string) => `::group::${what}\n`, end: (what: string) => `::endgroup::\n`}: process.env.TRAVIS? {start: (what: string) => `travis_fold:start:${what}\n`, end: (what: string) => `travis_fold:end:${what}\n`}: process.env.GITLAB_CI? {start: (what: string) => `section_start:${Math.floor(Date.now() / 1000)}:${what.toLowerCase().replace(/\W+/g, `_`)}\r\x1b[0K${what}\n`, end: (what: string) => `section_end:${Math.floor(Date.now() / 1000)}:${what.toLowerCase().replace(/\W+/g, `_`)}\r\x1b[0K`}: null

Const IGNORED_ENV_VARIABLES

IGNORED_ENV_VARIABLES: Set<string> = new Set([// "binFolder" is the magic location where the parent process stored the// current binaries; not an actual configuration settings`binFolder`,// "version" is set by Docker:// https://github.com/nodejs/docker-node/blob/5a6a5e91999358c5b04fddd6c22a9a4eb0bf3fbf/10/alpine/Dockerfile#L51`version`,// "flags" is set by Netlify; they use it to specify the flags to send to the// CLI when running the automatic `yarn install``flags`,// "gpg" and "profile" are used by the install.sh script:// https://classic.yarnpkg.com/install.sh`profile`,`gpg`,// "ignoreNode" is used to disable the Node version check`ignoreNode`,// "wrapOutput" was a variable used to indicate nested "yarn run" processes// back in Yarn 1.`wrapOutput`,])

Const IMPORTED_PATTERNS

IMPORTED_PATTERNS: Array<[]> = [// These ones come from Git urls[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/, (version, $0, $1, $2) => `${$1}#commit=${$2}`],// These ones come from the GitHub HTTP endpoints[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/, (version, $0, $1 = ``, $2, $3) => `https://${$1}github.com/${$2}.git#commit=${$3}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/, (version, $0, $1 = ``, $2, $3) => `https://${$1}github.com/${$2}.git#commit=${$3}`],// These ones come from the npm registry// Note: /download/ is used by custom registries like Taobao[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@[^/]+\/)?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/, version => `npm:${version}`],// The GitHub package registry uses a different style of URLs[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)$/, version => `npm:${version}`],// FontAwesome too; what is it with these registries that made them think using a different url pattern was a good idea?[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/, version => `npm:${version}`],// These ones come from the old Yarn offline mirror - we assume they came from npm[/^[^/]+\.tgz#[0-9a-f]+$/, version => `npm:${version}`],]

Const INSTALL_STATE_VERSION

INSTALL_STATE_VERSION: 1 = 1

Const LOCKFILE_VERSION

LOCKFILE_VERSION: 4 = 4

Const MAX_PREPARE_CONCURRENCY

MAX_PREPARE_CONCURRENCY: 2 = 2

Given a folder, prepares this project for use. Runs yarn install then yarn build if a package.json is found.

Const MULTIPLE_KEYS_REGEXP

MULTIPLE_KEYS_REGEXP: RegExp = / *, */g

Const PROGRESS_FRAMES

PROGRESS_FRAMES: string[] = [`⠋`, `⠙`, `⠹`, `⠸`, `⠼`, `⠴`, `⠦`, `⠧`, `⠇`, `⠏`]

Const PROGRESS_INTERVAL

PROGRESS_INTERVAL: 80 = 80

Const PROGRESS_STYLES

PROGRESS_STYLES: object = makeRecord({patrick: {date: [17, 3],chars: [`🍀`, `🌱`],size: 40,},simba: {date: [19, 7],chars: [`🦁`, `🌴`],size: 40,},jack: {date: [31, 10],chars: [`🎃`, `🦇`],size: 40,},hogsfather: {date: [31, 12],chars: [`🎉`, `🎄`],size: 40,},default: {chars: [`=`, `-`],size: 80,},})

Type declaration

  • [key: string]: T

Const SECRET

SECRET: "********" = `********`

Const SPECS

SPECS: Specs = [// Those three are different from includePrerelease[`^5.0.0`, `5.0.0-beta.13`, true],[`^1.0.0`, `1.0.0-rc1`, true],[`2.x`, `3.0.0-pre.0`, false],// From the semver test-suite...[[`2.x`, `2.0.0-pre.0`, true],[`2.x`, `2.1.0-pre.0`, true],[`1.1.x`, `1.1.0-a`, true],[`1.1.x`, `1.1.1-a`, true],[`*`, `1.0.0-rc1`, true],[`^1.0.0-0`, `1.0.1-rc1`, true],// https://github.com/yarnpkg/berry/pull/1748#discussion_r475268862// [`^1.0.0-rc2`, `1.0.1-rc1`, true],[`^1.0.0`, `1.0.1-rc1`, true],[`^1.0.0`, `1.1.0-rc1`, true],[`1 - 2`, `2.0.0-pre`, true],[`1 - 2`, `1.0.0-pre`, true],[`1.0 - 2`, `1.0.0-pre`, true],[`=0.7.x`, `0.7.0-asdf`, true],[`>=0.7.x`, `0.7.0-asdf`, true],[`<=0.7.x`, `0.7.0-asdf`, true],[`>=1.0.0 <=1.1.0`, `1.1.0-pre`, true],] as Specs,[`^1.0.0`, `2.0.0-rc1`, false],[`^1.2.3-rc2`, `2.0.0`, false],// These are important: false positives with fixed ranges[`1.0.0-alpha.37`, `1.0.0-alpha.39`, false],[`1.0.0-rc2`, `1.0.0-rc4`, false],[`1.0.0-rc4`, `1.0.0-rc2`, false],[`1.0.0-beta.1`, `1.0.0-beta.2`, false],]

Const TAG_REGEXP

TAG_REGEXP: RegExp = /^(?!v)[a-z0-9-.]+$/i

Const TRAILING_SLASH_REGEXP

TRAILING_SLASH_REGEXP: RegExp = /\/$/

Const VIRTUAL_ABBREVIATE

VIRTUAL_ABBREVIATE: 5 = 5

Const VIRTUAL_PROTOCOL

VIRTUAL_PROTOCOL: "virtual:" = `virtual:`

Const YARN_VERSION

YARN_VERSION: string | null

Const YarnVersion

YarnVersion: null | string = typeof YARN_VERSION !== `undefined`? YARN_VERSION: null

__non_webpack_require__

__non_webpack_require__: any

Const cache

cache: Map<string, Buffer | Promise<Buffer>> = new Map<string, Promise<Buffer> | Buffer>()

Const certCache

certCache: Map<string & object, Buffer | Promise<Buffer>> = new Map<PortablePath, Promise<Buffer> | Buffer>()

Const chalkInstance

chalkInstance: Chalk = new chalk.Instance(chalkOptions)

Const chalkOptions

chalkOptions: object = process.env.GITHUB_ACTIONS? {level: 2}: chalk.supportsColor? {level: chalk.supportsColor.level}: {level: 0}

Type declaration

  • level: number

Const colors

colors: Map<Type, null | (string | number)[]> = new Map([[Type.NO_HINT, null],[Type.NULL, [`#a853b5`, 129]],[Type.SCOPE, [`#d75f00`, 166]],[Type.NAME, [`#d7875f`, 173]],[Type.RANGE, [`#00afaf`, 37]],[Type.REFERENCE, [`#87afff`, 111]],[Type.NUMBER, [`#ffd700`, 220]],[Type.PATH, [`#d75fd7`, 170]],[Type.URL, [`#d75fd7`, 170]],[Type.ADDED, [`#5faf00`, 70]],[Type.REMOVED, [`#d70000`, 160]],[Type.CODE, [`#87afff`, 111]],[Type.SIZE, [`#ffd700`, 220]],])

Const defaultStyle

defaultStyle: string = (supportsEmojis && Object.keys(PROGRESS_STYLES).find(name => {const style = PROGRESS_STYLES[name];if (style.date && (style.date[0] !== now.getDate() || style.date[1] !== now.getMonth() + 1))return false;return true;})) || `default`

Const globalHttpAgent

globalHttpAgent: Agent = new HttpAgent({keepAlive: true})

Const globalHttpsAgent

globalHttpsAgent: Agent = new HttpsAgent({keepAlive: true})

Const gunzip

gunzip: function = promisify(zlib.gunzip)

Type declaration

    • (arg1: T1): Promise<TResult>
    • Parameters

      • arg1: T1

      Returns Promise<TResult>

Const gunzip

gunzip: function = promisify(zlib.gunzip)

Type declaration

    • (arg1: T1): Promise<TResult>
    • Parameters

      • arg1: T1

      Returns Promise<TResult>

Const gzip

gzip: function = promisify(zlib.gzip)

Type declaration

    • (arg1: T1): Promise<TResult>
    • Parameters

      • arg1: T1

      Returns Promise<TResult>

Const mapAndFilterSkip

mapAndFilterSkip: unique symbol = Symbol()

Const mapAndFindSkip

mapAndFindSkip: unique symbol = Symbol()

Const now

now: Date = new Date()

Const prepareLimit

prepareLimit: Limit = pLimit(MAX_PREPARE_CONCURRENCY)

Const rangesCache

rangesCache: Map<string, null | Range> = new Map<string, semver.Range | null>()

Let sigintRefCount

sigintRefCount: number = 0

Const signalToCodeMap

signalToCodeMap: Map<null | "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" | "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" | "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" | "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO", number> = new Map<NodeJS.Signals | null, number>([[`SIGINT`, 2], // ctrl-c[`SIGQUIT`, 3], // ctrl-\[`SIGKILL`, 9], // hard kill[`SIGTERM`, 15], // default signal for kill])

Const supportsColor

supportsColor: boolean = chalkOptions.level !== 0

Const supportsEmojis

supportsEmojis: boolean = [`iTerm.app`, `Apple_Terminal`].includes(process.env.TERM_PROGRAM!) || !!process.env.WT_SESSION

Const supportsHyperlinks

supportsHyperlinks: boolean = supportsColor && !process.env.GITHUB_ACTIONS

Functions

addLogFilterSupport

  • addLogFilterSupport(report: Report, __namedParameters: object): void

applyColor

  • applyColor(configuration: Configuration, value: string, formatType: Type | string): string

applyStyle

applyVirtualResolutionMutations

  • applyVirtualResolutionMutations(__namedParameters: object): void
  • This function is worth some documentation. It takes a set of packages, traverses them all, and generates virtual packages for each package that lists peer dependencies.

    We also take advantage of the tree traversal to detect which packages are actually used and which have disappeared, and to know which packages truly have an optional build (since a package may be optional in one part of the tree but not another).

    We also take advantage of the tree traversal to detect which packages are actually used and which have disappeared, and to know which packages truly have an optional build (since a package may be optional in one part of the tree but not another).

    Parameters

    • __namedParameters: object
      • accessibleLocators: Set<string & object>
      • allDescriptors: Map<string & object, Descriptor>
      • allPackages: Map<string & object, Package>
      • allResolutions: Map<string & object, string & object>
      • optionalBuilds: Set<string & object>
      • peerRequirements: Map<string, object>
      • project: Project
      • report: null | Report
      • tolerateMissingPackages: boolean
      • volatileDescriptors: Set<string & object>

    Returns void

areDescriptorsEqual

areIdentsEqual

areLocatorsEqual

areVirtualPackagesEquivalent

assertNever

  • assertNever(arg: never): never

bindDescriptor

  • Some descriptors only make sense when bound with some internal state. For instance that would be the case for the file: ranges, which require to be bound to their parent packages in order to resolve relative paths from the right location.

    This function will apply the specified parameters onto the requested descriptor, but only if it didn't get bound before (important to handle the case where we replace a descriptor by another, since when that happens the replacement has probably been already bound).

    This function will apply the specified parameters onto the requested descriptor, but only if it didn't get bound before (important to handle the case where we replace a descriptor by another, since when that happens the replacement has probably been already bound).

    Parameters

    • descriptor: Descriptor

      The original descriptor

    • params: object

      The parameters to encode in the range

      • [key: string]: string

    Returns Descriptor

bindLocator

  • Some locators only make sense when bound with some internal state. For instance that would be the case for the file: references, which require to be bound to their parent packages in order to resolve relative paths from the right location.

    This function will apply the specified parameters onto the requested locator, but only if it didn't get bound before (important to handle the case where we replace a locator by another, since when that happens the replacement has probably been already bound).

    This function will apply the specified parameters onto the requested locator, but only if it didn't get bound before (important to handle the case where we replace a locator by another, since when that happens the replacement has probably been already bound).

    Parameters

    • locator: Locator

      The original locator

    • params: object

      The parameters to encode in the reference

      • [key: string]: string

    Returns Locator

bufferStream

  • bufferStream(stream: Readable): Promise<Buffer>

buildIgnorePattern

  • buildIgnorePattern(ignorePatterns: Array<string>): null | string
  • Combines an Array of glob patterns into a regular expression.

    Parameters

    • ignorePatterns: Array<string>

      An array of glob patterns

    Returns null | string

    A string representing a regular expression or null if no glob patterns are provided

builtinModules

  • builtinModules(): Set<string>

checksumFile

checksumPattern

  • checksumPattern(pattern: string, __namedParameters: object): Promise<string>

convertDescriptorToLocator

  • Turns a descriptor into a locator.

    Note that this process may be unsafe, as descriptors may reference multiple packages, putting them at odd with locators' expected semantic. Only makes sense when used with single-resolution protocols, for instance file:.

    Note that this process may be unsafe, as descriptors may reference multiple packages, putting them at odd with locators' expected semantic. Only makes sense when used with single-resolution protocols, for instance file:.

    Parameters

    • descriptor: Descriptor

      The descriptor to convert into a locator.

    Returns Locator

convertLocatorToDescriptor

  • Turns a locator into a descriptor.

    This should be safe to do regardless of the locator, since all locator references are expected to be valid descriptor ranges.

    This should be safe to do regardless of the locator, since all locator references are expected to be valid descriptor ranges.

    Parameters

    • locator: Locator

      The locator to convert into a descriptor.

    Returns Descriptor

convertMapsToIndexableObjects

convertPackageToLocator

  • Turns a package structure into a simple locator. You won't often need to call this function since packages are already valid locators by virtue of structural inheritance.

    This function is only useful if you absolutely need to remove the non-locator fields from a structure before storing it somewhere.

    This function is only useful if you absolutely need to remove the non-locator fields from a structure before storing it somewhere.

    Parameters

    • pkg: Package

      The package to convert into a locator.

    Returns Locator

convertToIdent

  • Turns a compatible source to an ident. You won't really have to use this function since by virtue of structural inheritance all descriptors and locators are already valid idents.

    This function is only useful if you absolutely need to remove the non-ident fields from a structure before storing it somewhere.

    This function is only useful if you absolutely need to remove the non-ident fields from a structure before storing it somewhere.

    Parameters

    Returns Ident

convertToManifestRange

  • convertToManifestRange(range: string): string
  • Some bindings are internal-only and not meant to be displayed anywhere (for instance that's the case with the parent locator bound to the file: ranges).

    this function strips them from a range.

    this function strips them from a range.

    Parameters

    • range: string

    Returns string

convertToZip

copyPackage

del

  • del(target: string, options: Options): Promise<Buffer>

detectPackageManager

devirtualizeDescriptor

devirtualizeLocator

dynamicRequire

  • dynamicRequire(path: string): any

dynamicRequire

  • dynamicRequire(request: string): any

dynamicRequireNoCache

emitList

  • emitList(values: Array<formatUtils.Tuple>, __namedParameters: object): void

emitTree

  • emitTree(tree: TreeNode, __namedParameters: object): void

encodeUnsafeCharacters

  • encodeUnsafeCharacters(str: string): string

escapeRegExp

  • escapeRegExp(str: string): string

executePackageAccessibleBinary

  • executePackageAccessibleBinary(locator: Locator, binaryName: string, args: Array<string>, __namedParameters: object): Promise<number>
  • Execute a binary from the specified package.

    Note that "binary" in this sense means "a Javascript file". Actual native binaries cannot be executed this way, because we use Node in order to transparently read from the archives.

    Note that "binary" in this sense means "a Javascript file". Actual native binaries cannot be executed this way, because we use Node in order to transparently read from the archives.

    Parameters

    • locator: Locator

      The queried package

    • binaryName: string

      The name of the binary file to execute

    • args: Array<string>

      The arguments to pass to the file

    • __namedParameters: object
      • cwd: string & object
      • nodeArgs: string[]
      • project: Project
      • stderr: Writable
      • stdin: null | Readable
      • stdout: Writable

    Returns Promise<number>

executePackageScript

  • executePackageScript(locator: Locator, scriptName: string, args: Array<string>, __namedParameters: object): Promise<number>

executePackageShellcode

  • executePackageShellcode(locator: Locator, command: string, args: Array<string>, __namedParameters: object): Promise<number>

executeWorkspaceAccessibleBinary

  • executeWorkspaceAccessibleBinary(workspace: Workspace, binaryName: string, args: Array<string>, __namedParameters: object): Promise<number>
  • Execute a binary from the specified workspace

    Parameters

    • workspace: Workspace

      The queried package

    • binaryName: string

      The name of the binary file to execute

    • args: Array<string>

      The arguments to pass to the file

    • __namedParameters: object
      • cwd: string & object
      • stderr: Writable
      • stdin: null | Readable
      • stdout: Writable

    Returns Promise<number>

executeWorkspaceLifecycleScript

  • executeWorkspaceLifecycleScript(workspace: Workspace, lifecycleScriptName: string, __namedParameters: object): Promise<void>

executeWorkspaceScript

  • executeWorkspaceScript(workspace: Workspace, scriptName: string, args: Array<string>, __namedParameters: object): Promise<number>

execvp

  • execvp(fileName: string, args: Array<string>, opts: ExecvpOptions & object): Promise<object>
  • execvp(fileName: string, args: Array<string>, opts: ExecvpOptions & object): Promise<object>
  • execvp(fileName: string, args: Array<string>, opts: ExecvpOptions): Promise<object>

extractArchiveTo

  • extractArchiveTo<T>(tgz: Buffer, targetFs: T, __namedParameters?: object): Promise<T>

formatName

  • formatName(name: MessageName | null, __namedParameters: object): string

formatNameWithHyperlink

  • formatNameWithHyperlink(name: MessageName | null, __namedParameters: object): string

get

  • get(target: string, __namedParameters: object): Promise<any>

getArrayWithDefault

  • getArrayWithDefault<K, T>(map: Map<K, Array<T>>, key: K): T[]

getCacheKeyComponent

  • getCacheKeyComponent(checksum: string): null | string

getCachedCertificate

  • getCachedCertificate(caFilePath: PortablePath): Promise<Buffer>

Const getConfiguration

getDefaultGlobalFolder

  • getDefaultGlobalFolder(): string & object

getDefaultValue

getEnvironmentSettings

  • getEnvironmentSettings(): object

getExitCode

  • getExitCode(code: number | null, signal: NodeJS.Signals | null): number

getFactoryWithDefault

  • getFactoryWithDefault<K, T>(map: Map<K, T>, key: K, factory: function): T

getHashComponent

  • getHashComponent(checksum: string): string

getHomeFolder

  • getHomeFolder(): string & object

getIdentVendorPath

  • getIdentVendorPath(ident: Ident): string & object
  • The presence of a node_modules directory in the path is extremely common in the JavaScript ecosystem to denote whether a path belongs to a vendor or not. I considered using a more generic path for packages that aren't always JS-only (such as when using the Git fetcher), but that unfortunately caused various JS apps to start showing errors when working with git repos.

    As a result, all packages from all languages will follow this convention. At least it'll be consistent, and linkers will always have the ability to remap them to a different location if that's a critical requirement.

    As a result, all packages from all languages will follow this convention. At least it'll be consistent, and linkers will always have the ability to remap them to a different location if that's a critical requirement.

    Parameters

    Returns string & object

getIndent

  • getIndent(content: string): string

getMapWithDefault

  • getMapWithDefault<K, MK, MV>(map: Map<K, Map<MK, MV>>, key: K): Map<MK, MV>

getNetworkSettings

  • getNetworkSettings(target: string, opts: object): object

getPackageAccessibleBinaries

  • getPackageAccessibleBinaries(locator: Locator, __namedParameters: object): Promise<Map<string, [Locator, string & object]>>

getRcFilename

  • getRcFilename(): string & object

getSetWithDefault

  • getSetWithDefault<K, T>(map: Map<K, Set<T>>, key: K): Set<T>

getWorkspaceAccessibleBinaries

  • getWorkspaceAccessibleBinaries(workspace: Workspace): Promise<Map<string, [Locator, string & object]>>

hasFd

  • hasFd(stream: null | Readable | Writable): boolean

hasPackageScript

  • hasPackageScript(locator: Locator, scriptName: string, __namedParameters: object): Promise<boolean>

hasParams

  • hasParams(params: ParsedUrlQuery | null): params

hasWorkspaceScript

  • hasWorkspaceScript(workspace: Workspace, scriptName: string): boolean

initializeConfiguration

  • initializeConfiguration<T>(value: object, cb: function): Promise<T>

initializePackageEnvironment

  • initializePackageEnvironment(locator: Locator, __namedParameters: object): Promise<object>

isFolderInside

isIndexableObject

  • isIndexableObject(value: unknown): value

isReportError

  • isReportError(error: Error): error

isVirtualDescriptor

  • isVirtualDescriptor(descriptor: Descriptor): boolean

isVirtualLocator

  • isVirtualLocator(locator: Locator): boolean

json

  • json<T>(value: Source<T>, formatType: T | string): any

makeArchiveFromDirectory

  • makeArchiveFromDirectory(source: PortablePath, __namedParameters?: object): Promise<ZipFS>

makeDescriptor

makeHash

  • makeHash<T>(...args: Array<BinaryLike | null>): T

makeIdent

  • makeIdent(scope: string | null, name: string): Ident

makeLocator

makePathWrapper

makeRange

  • makeRange(__namedParameters: object): string
  • Turn the components returned by parseRange back into a string. Check parseRange for more details.

    Parameters

    • __namedParameters: object
      • params: null | ParsedUrlQuery
      • protocol: null | string
      • selector: string
      • source: null | string

    Returns string

Const makeRecord

  • makeRecord<T>(obj: object): object

makeScriptEnv

  • makeScriptEnv(__namedParameters: object): Promise<object & object>

mapAndFilter

  • mapAndFilter<In, Out>(iterable: Iterable<In>, cb: function): Array<Out>
  • Type parameters

    • In

    • Out

    Parameters

    • iterable: Iterable<In>
    • cb: function
        • (value: In): Out | typeof mapAndFilterSkip
        • Parameters

          • value: In

          Returns Out | typeof mapAndFilterSkip

    Returns Array<Out>

mapAndFind

  • mapAndFind<In, Out>(iterable: Iterable<In>, cb: function): Out | undefined
  • Type parameters

    • In

    • Out

    Parameters

    • iterable: Iterable<In>
    • cb: function
        • (value: In): Out | typeof mapAndFindSkip
        • Parameters

          • value: In

          Returns Out | typeof mapAndFindSkip

    Returns Out | undefined

mark

maybeExecuteWorkspaceLifecycleScript

normalizeSlashes

  • normalizeSlashes(str: string): string & object

overrideType

  • overrideType<T>(val: unknown): val

parseBoolean

  • parseBoolean(value: unknown): boolean

parseDescriptor

  • parseDescriptor(string: string, strict?: boolean): Descriptor
  • Parses a string into a descriptor

    Throws an error if the descriptor cannot be parsed.

    Throws an error if the descriptor cannot be parsed.

    Parameters

    • string: string

      The descriptor string (eg. lodash@^1.0.0)

    • Default value strict: boolean = false

      If false, the range is optional (unknown will be used as fallback)

    Returns Descriptor

parseFileStyleRange

  • parseFileStyleRange(range: string, __namedParameters: object): object
  • File-style ranges are bound to a parent locators that we need in order to resolve relative paths to the location of their parent packages. This function wraps parseRange to automatically extract the parent locator from the bindings and return it along with the selector.

    Parameters

    • range: string
    • __namedParameters: object
      • protocol: string

    Returns object

    • parentLocator: Locator
    • path: string & object

parseIdent

  • parseIdent(string: string): Ident

parseLocator

  • parseLocator(string: string, strict?: boolean): Locator
  • Parses a string into a locator

    Throws an error if the locator cannot be parsed.

    Throws an error if the locator cannot be parsed.

    Parameters

    • string: string

      The locator string (eg. lodash@1.0.0)

    • Default value strict: boolean = false

      If false, the reference is optional (unknown will be used as fallback)

    Returns Locator

parseMap

parseOptionalBoolean

  • parseOptionalBoolean(value: unknown): boolean | undefined

parseProxy

  • parseProxy(specifier: string): object

parseRange

  • Parses a range into its constituents. Ranges typically follow these forms, with both protocol and bindings being optionals:

    ::: :#::

    The selector is intended to "refine" the source, and is required. The source itself is optional (for instance we don't need it for npm packages, but we do for git dependencies).

    ::: :#::

    The selector is intended to "refine" the source, and is required. The source itself is optional (for instance we don't need it for npm packages, but we do for git dependencies).

    Type parameters

    Parameters

    • range: string
    • Optional opts: Opts

    Returns ParseRangeReturnType<Opts>

parseShape

parseSingleValue

parseValue

pipevp

  • pipevp(fileName: string, args: Array<string>, __namedParameters: object): Promise<object>
  • Parameters

    • fileName: string
    • args: Array<string>
    • __namedParameters: object
      • cwd: string & object
      • end: EndStrategy
      • env: object
        • [key: string]: string | undefined
      • stderr: Writable
      • stdin: null | Readable
      • stdout: Writable
      • strict: boolean

    Returns Promise<object>

post

  • post(target: string, body: Body, options: Options): Promise<Buffer>

prepareExternalProject

prettifyAsyncErrors

  • prettifyAsyncErrors<T>(fn: function, update: function): Promise<T>

prettifySyncErrors

  • prettifySyncErrors<T>(fn: function, update: function): T

pretty

prettyDependent

prettyDescriptor

prettyIdent

prettyList

  • prettyList<T>(configuration: Configuration, values: Iterable<Source<T>>, formatType: T | string, __namedParameters?: object): string

prettyLocator

prettyLocatorNoColors

  • prettyLocatorNoColors(locator: Locator): string

prettyRange

  • prettyRange(configuration: Configuration, range: string): string

prettyRangeNoColors

  • prettyRangeNoColors(range: string): string

prettyReference

  • prettyReference(configuration: Configuration, reference: string): string

prettyResolution

prettyWorkspace

put

  • put(target: string, body: Body, options: Options): Promise<Buffer>

releaseAfterUseAsync

  • releaseAfterUseAsync<T>(fn: function, cleanup?: function | null): Promise<T>

renamePackage

replaceEnvVariables

  • replaceEnvVariables(value: string, __namedParameters: object): string

request

  • request(target: string, body: Body, __namedParameters: object): Promise<Response<any>>

requirableIdent

  • requirableIdent(ident: Ident): string

satisfiesWithPrereleases

  • satisfiesWithPrereleases(version: string | null, range: string, loose?: boolean): boolean
  • Returns whether the given semver version satisfies the given range. Notably this supports prerelease versions so that "2.0.0-rc.0" satisfies the range ">=1.0.0", for example.

    This function exists because the semver.satisfies method does not include pre releases. This means ranges such as * would not satisfy 1.0.0-rc. The includePrerelease flag has a weird behavior and cannot be used (if you want to try it out, just run the semverUtils testsuite using this flag instead of our own implementation, and you'll see the failing cases).

    See https://github.com/yarnpkg/berry/issues/575 for more context.

    This function exists because the semver.satisfies method does not include pre releases. This means ranges such as * would not satisfy 1.0.0-rc. The includePrerelease flag has a weird behavior and cannot be used (if you want to try it out, just run the semverUtils testsuite using this flag instead of our own implementation, and you'll see the failing cases).

    See https://github.com/yarnpkg/berry/issues/575 for more context.

    Parameters

    • version: string | null
    • range: string
    • Default value loose: boolean = false

    Returns boolean

sigintHandler

  • sigintHandler(): void

slugifyIdent

  • slugifyIdent(ident: Ident): string

slugifyLocator

  • slugifyLocator(locator: Locator): string & object

sortDescriptors

sortMap

  • sortMap<T>(values: Iterable<T>, mappers: function | Array<function>): T[]

stringifyDescriptor

  • stringifyDescriptor(descriptor: Descriptor): string

stringifyIdent

  • stringifyIdent(ident: Ident): string

stringifyLocator

  • stringifyLocator(locator: Locator): string

stringifyMessageName

  • stringifyMessageName(name: MessageName | number): string

stripBOM

  • stripBOM(content: string): string

transformConfiguration

treeNodeToJson

  • treeNodeToJson(printTree: TreeNode): any

treeNodeToTreeify

  • treeNodeToTreeify(printTree: TreeNode, __namedParameters: object): object

tryParseDescriptor

  • tryParseDescriptor(string: string, strict?: boolean): Descriptor | null
  • Parses a string into a descriptor

    Returns null if the descriptor cannot be parsed.

    Returns null if the descriptor cannot be parsed.

    Parameters

    • string: string

      The descriptor string (eg. lodash@^1.0.0)

    • Default value strict: boolean = false

      If false, the range is optional (unknown will be used as fallback)

    Returns Descriptor | null

tryParseIdent

  • tryParseIdent(string: string): Ident | null

tryParseLocator

  • tryParseLocator(string: string, strict?: boolean): Locator | null
  • Parses a string into a locator

    Returns null if the locator cannot be parsed.

    Returns null if the locator cannot be parsed.

    Parameters

    • string: string

      The locator string (eg. lodash@1.0.0)

    • Default value strict: boolean = false

      If false, the reference is optional (unknown will be used as fallback)

    Returns Locator | null

tryParseOptionalBoolean

  • tryParseOptionalBoolean(value: unknown): boolean | undefined | null

tryParseOptionalBoolean

  • tryParseOptionalBoolean(value: unknown, __namedParameters: object): undefined | null | false | true

tuple

validRange

  • validRange(potentialRange: string): Range | null

validateEnum

  • validateEnum<T>(def: object, value: string): T

Const validateTransform

  • validateTransform<T>(spec: object): object
  • Type parameters

    • T

    Parameters

    • spec: object
      • json: function
          • (val: T): any
          • Parameters

            • val: T

            Returns any

      • pretty: function
          • (configuration: any, val: T): string
          • Parameters

            • configuration: any
            • val: T

            Returns string

    Returns object

    • json: function
        • (val: T): any
        • Parameters

          • val: T

          Returns any

    • pretty: function
        • (configuration: any, val: T): string
        • Parameters

          • configuration: any
          • val: T

          Returns string

virtualizeDescriptor

virtualizePackage

Object literals

Const CorePlugin

CorePlugin: object

hooks

hooks: object

reduceDependency

validateProject

  • validateProject(project: Project, report: object): Promise<void>

validateWorkspace

  • validateWorkspace(workspace: Workspace, report: object): Promise<void>

Const INSTALL_STATE_FIELDS

INSTALL_STATE_FIELDS: object

restoreInstallersCustomData

restoreInstallersCustomData: ["installersCustomData"] = [`installersCustomData`,] as const

restoreResolutions

restoreResolutions: ["accessibleLocators", "optionalBuilds", "storedDescriptors", "storedResolutions", "storedPackages", "lockFileChecksum"] = [`accessibleLocators`,`optionalBuilds`,`storedDescriptors`,`storedResolutions`,`storedPackages`,`lockFileChecksum`,] as const

Const coreDefinitions

coreDefinitions: object

bstatePath

bstatePath: object

default

default: string = `./.yarn/build-state.yml`

description

description: string = `Path of the file where the current state of the built packages must be stored`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

caFilePath

caFilePath: object

default

default: null = null

description

description: string = `A path to a file containing one or multiple Certificate Authority signing certificates`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

cacheFolder

cacheFolder: object

default

default: string = `./.yarn/cache`

description

description: string = `Folder where the cache files must be written`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

cacheKeyOverride

cacheKeyOverride: object

default

default: null = null

description

description: string = `A global cache key override; used only for test purposes`

type

type: STRING = SettingsType.STRING

checksumBehavior

checksumBehavior: object

default

default: string = `throw`

description

description: string = `Enumeration defining what to do when a checksum doesn't match expectations`

type

type: STRING = SettingsType.STRING

compressionLevel

compressionLevel: object

default

default: 0 | 3 | 1 | 2 | 5 | 4 | 8 | 6 | 7 | 9 | "mixed" = DEFAULT_COMPRESSION_LEVEL

description

description: string = `Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)`

type

type: NUMBER = SettingsType.NUMBER

values

values: (string | number)[] = [`mixed`, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

defaultLanguageName

defaultLanguageName: object

default

default: string = `node`

description

description: string = `Default language mode that should be used when a package doesn't offer any insight`

type

type: STRING = SettingsType.STRING

defaultProtocol

defaultProtocol: object

default

default: string = `npm:`

description

description: string = `Default resolution protocol used when resolving pure semver and tag ranges`

type

type: STRING = SettingsType.STRING

enableAbsoluteVirtuals

enableAbsoluteVirtuals: object

default

default: boolean = false

description

description: string = `If true, the virtual symlinks will use absolute paths if required [non portable!!]`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableColors

enableColors: object

default

default: boolean = formatUtils.supportsColor

defaultText

defaultText: string = `<dynamic>`

description

description: string = `If true, the CLI is allowed to use colors in its output`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableGlobalCache

enableGlobalCache: object

default

default: boolean = false

description

description: string = `If true, the system-wide cache folder will be used regardless of \`cache-folder\``

type

type: BOOLEAN = SettingsType.BOOLEAN

enableHyperlinks

enableHyperlinks: object

default

default: boolean = formatUtils.supportsHyperlinks

defaultText

defaultText: string = `<dynamic>`

description

description: string = `If true, the CLI is allowed to use hyperlinks in its output`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableImmutableCache

enableImmutableCache: object

default

default: boolean = false

description

description: string = `If true, the cache is reputed immutable and actions that would modify it will throw`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableInlineBuilds

enableInlineBuilds: object

default

default: boolean = isCI

defaultText

defaultText: string = `<dynamic>`

description

description: string = `If true, the CLI will print the build output on the command line`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableMirror

enableMirror: object

default

default: boolean = true

description

description: string = `If true, the downloaded packages will be retrieved and stored in both the local and global folders`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableNetwork

enableNetwork: object

default

default: boolean = true

description

description: string = `If false, the package manager will refuse to use the network if required to`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableProgressBars

enableProgressBars: object

default

default: undefined | false | true = !isCI && process.stdout.isTTY && process.stdout.columns > 22

defaultText

defaultText: string = `<dynamic>`

description

description: string = `If true, the CLI is allowed to show a progress bar for long-running events`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableScripts

enableScripts: object

default

default: boolean = true

description

description: string = `If true, packages are allowed to have install scripts by default`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableStrictSsl

enableStrictSsl: object

default

default: boolean = true

description

description: string = `If false, SSL certificate errors will be ignored`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableTelemetry

enableTelemetry: object

default

default: boolean = true

description

description: string = `If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableTimers

enableTimers: object

default

default: boolean = true

description

description: string = `If true, the CLI is allowed to print the time spent executing commands`

type

type: BOOLEAN = SettingsType.BOOLEAN

enableTransparentWorkspaces

enableTransparentWorkspaces: object

default

default: boolean = true

description

description: string = `If false, Yarn won't automatically resolve workspace dependencies unless they use the \`workspace:\` protocol`

type

type: BOOLEAN = SettingsType.BOOLEAN

globalFolder

globalFolder: object

default

default: string & object = folderUtils.getDefaultGlobalFolder()

description

description: string = `Folder where are stored the system-wide settings`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

httpProxy

httpProxy: object

default

default: null = null

description

description: string = `URL of the http proxy that must be used for outgoing http requests`

type

type: STRING = SettingsType.STRING

httpRetry

httpRetry: object

default

default: number = 3

description

description: string = `Retry times on http failure`

type

type: NUMBER = SettingsType.NUMBER

httpTimeout

httpTimeout: object

default

default: number = 60000

description

description: string = `Timeout of each http request in milliseconds`

type

type: NUMBER = SettingsType.NUMBER

httpsProxy

httpsProxy: object

default

default: null = null

description

description: string = `URL of the http proxy that must be used for outgoing https requests`

type

type: STRING = SettingsType.STRING

ignoreCwd

ignoreCwd: object

default

default: boolean = false

description

description: string = `If true, the \`--cwd\` flag will be ignored`

type

type: BOOLEAN = SettingsType.BOOLEAN

ignorePath

ignorePath: object

default

default: boolean = false

description

description: string = `If true, the local executable will be ignored when using the global one`

type

type: BOOLEAN = SettingsType.BOOLEAN

immutablePatterns

immutablePatterns: object

default

default: never[] = []

description

description: string = `Array of glob patterns; files matching them won't be allowed to change during immutable installs`

isArray

isArray: true = true

type

type: STRING = SettingsType.STRING

installStatePath

installStatePath: object

default

default: string = `./.yarn/install-state.gz`

description

description: string = `Path of the file where the install state will be persisted`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

lastUpdateCheck

lastUpdateCheck: object

default

default: null = null

description

description: string = `Last timestamp we checked whether new Yarn versions were available`

type

type: STRING = SettingsType.STRING

lockfileFilename

lockfileFilename: object

default

default: string & object = DEFAULT_LOCK_FILENAME

description

description: string = `Name of the files where the Yarn dependency tree entries must be stored`

type

type: STRING = SettingsType.STRING

logFilters

logFilters: object

concatenateValues

concatenateValues: true = true

description

description: string = `Overrides for log levels`

isArray

isArray: true = true

type

type: SHAPE = SettingsType.SHAPE

properties

properties: object

code

code: object

default

default: undefined = undefined

description

description: string = `Code of the messages covered by this override`

type

type: STRING = SettingsType.STRING

level

level: object

default

default: undefined = undefined

description

description: string = `Log level override, set to null to remove override`

isNullable

isNullable: true = true

type

type: STRING = SettingsType.STRING

values

values: (Error | Warning | Info | Discard)[] = Object.values(formatUtils.LogLevel)

text

text: object

default

default: undefined = undefined

description

description: string = `Code of the texts covered by this override`

type

type: STRING = SettingsType.STRING

networkConcurrency

networkConcurrency: object

default

default: number = Infinity

description

description: string = `Maximal number of concurrent requests`

type

type: NUMBER = SettingsType.NUMBER

networkSettings

networkSettings: object

description

description: string = `Network settings per hostname (glob patterns are supported)`

type

type: MAP = SettingsType.MAP

valueDefinition

valueDefinition: object

description

description: string = ``

type

type: SHAPE = SettingsType.SHAPE

properties

properties: object

caFilePath

caFilePath: object

default

default: null = null

description

description: string = `Path to file containing one or multiple Certificate Authority signing certificates`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

enableNetwork

enableNetwork: object

default

default: null = null

description

description: string = `If false, the package manager will refuse to use the network if required to`

type

type: BOOLEAN = SettingsType.BOOLEAN

httpProxy

httpProxy: object

default

default: null = null

description

description: string = `URL of the http proxy that must be used for outgoing http requests`

type

type: STRING = SettingsType.STRING

httpsProxy

httpsProxy: object

default

default: null = null

description

description: string = `URL of the http proxy that must be used for outgoing https requests`

type

type: STRING = SettingsType.STRING

packageExtensions

packageExtensions: object

description

description: string = `Map of package corrections to apply on the dependency tree`

type

type: MAP = SettingsType.MAP

valueDefinition

valueDefinition: object

description

description: string = `The extension that will be applied to any package whose version matches the specified range`

type

type: SHAPE = SettingsType.SHAPE

properties

properties: object

dependencies

dependencies: object

description

description: string = `The set of dependencies that must be made available to the current package in order for it to work properly`

type

type: MAP = SettingsType.MAP

valueDefinition

valueDefinition: object

description

description: string = `A range`

type

type: STRING = SettingsType.STRING

peerDependencies

peerDependencies: object

description

description: string = `Inherited dependencies - the consumer of the package will be tasked to provide them`

type

type: MAP = SettingsType.MAP

valueDefinition

valueDefinition: object

description

description: string = `A semver range`

type

type: STRING = SettingsType.STRING

peerDependenciesMeta

peerDependenciesMeta: object

description

description: string = `Extra information related to the dependencies listed in the peerDependencies field`

type

type: MAP = SettingsType.MAP

valueDefinition

valueDefinition: object

description

description: string = `The peerDependency meta`

type

type: SHAPE = SettingsType.SHAPE

properties

properties: object

optional

optional: object

default

default: boolean = false

description

description: string = `If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error`

type

type: BOOLEAN = SettingsType.BOOLEAN

preferAggregateCacheInfo

preferAggregateCacheInfo: object

default

default: boolean = isCI

description

description: string = `If true, the CLI will only print a one-line report of any cache changes`

type

type: BOOLEAN = SettingsType.BOOLEAN

preferInteractive

preferInteractive: object

default

default: boolean = false

description

description: string = `If true, the CLI will automatically use the interactive mode when called from a TTY`

type

type: BOOLEAN = SettingsType.BOOLEAN

preferTruncatedLines

preferTruncatedLines: object

default

default: boolean = false

description

description: string = `If true, the CLI will truncate lines that would go beyond the size of the terminal`

type

type: BOOLEAN = SettingsType.BOOLEAN

progressBarStyle

progressBarStyle: object

default

default: undefined = undefined

defaultText

defaultText: string = `<dynamic>`

description

description: string = `Which style of progress bar should be used (only when progress bars are enabled)`

type

type: STRING = SettingsType.STRING

rcFilename

rcFilename: object

default

default: string & object = getRcFilename()

description

description: string = `Name of the files where the configuration can be found`

type

type: STRING = SettingsType.STRING

telemetryInterval

telemetryInterval: object

default

default: number = 7

description

description: string = `Minimal amount of time between two telemetry uploads, in days`

type

type: NUMBER = SettingsType.NUMBER

telemetryUserId

telemetryUserId: object

default

default: null = null

description

description: string = `If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.`

type

type: STRING = SettingsType.STRING

unsafeHttpWhitelist

unsafeHttpWhitelist: object

default

default: never[] = []

description

description: string = `List of the hostnames for which http queries are allowed (glob patterns are supported)`

isArray

isArray: true = true

type

type: STRING = SettingsType.STRING

virtualFolder

virtualFolder: object

default

default: string = `./.yarn/$$virtual`

description

description: string = `Folder where the virtual packages (cf doc) will be mapped on the disk (must be named $$virtual)`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

yarnPath

yarnPath: object

default

default: null = null

description

description: string = `Path to the local executable that must be used over the global one`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

Const transforms

transforms: object

__computed

__computed: object = validateTransform({pretty: (configuration: Configuration, filePath: string) => {return applyColor(configuration, npath.fromPortablePath(filePath), Type.PATH);},json: (filePath: string) => {return npath.fromPortablePath(filePath) as string;},})

Type declaration

  • json: function
      • (val: T): any
      • Parameters

        • val: T

        Returns any

  • pretty: function
      • (configuration: any, val: T): string
      • Parameters

        • configuration: any
        • val: T

        Returns string

Generated using TypeDoc