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"

AllDependencies

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

BaseSettingsDefinition

BaseSettingsDefinition<T>: object

Type parameters

Type declaration

  • description: string
  • Optional isArray?: undefined | false | true
  • type: T

Body

Body: null | string | Buffer | object

Body

Body: null | string | Buffer | object

BuildDirective

BuildDirective: [BuildType, string]

BuildDirective

BuildDirective: [BuildType, string]

CommandContext

CommandContext: object

Type declaration

CommandContext

CommandContext: object

Type declaration

DescriptorHash

DescriptorHash: string & object

DescriptorHash

DescriptorHash: string & object

ExecvpOptions

ExecvpOptions: object

Type declaration

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

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

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.

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.

FinalizeInstallStatus

FinalizeInstallStatus: object

Type declaration

FinalizeInstallStatus

FinalizeInstallStatus: object

Type declaration

HardDependencies

HardDependencies: "dependencies" | "devDependencies"

HardDependencies

HardDependencies: "dependencies" | "devDependencies"

Hooks

Hooks: object

Type declaration

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

Hooks

Hooks: object

Type declaration

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

IdentHash

IdentHash: string & object

IdentHash

IdentHash: string & object

InstallOptions

InstallOptions: object

Type declaration

  • cache: Cache
  • Optional fetcher?: Fetcher
  • Optional immutable?: undefined | false | true
  • Optional lockfileOnly?: undefined | false | true
  • report: Report
  • Optional resolver?: Resolver

InstallStatus

InstallStatus: object

Type declaration

InstallStatus

InstallStatus: object

Type declaration

LightReportOptions

LightReportOptions: object

Type declaration

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

LinkOptions

LinkOptions: MinimalLinkOptions & object

LinkOptions

LinkOptions: MinimalLinkOptions & object

LocatorHash

LocatorHash: string & object

LocatorHash

LocatorHash: string & object

MapSettingsDefinition

MapSettingsDefinition: BaseSettingsDefinition<MAP> & object

MinimalFetchOptions

MinimalFetchOptions: object

Type declaration

MinimalFetchOptions

MinimalFetchOptions: object

Type declaration

MinimalLinkOptions

MinimalLinkOptions: object

Type declaration

MinimalLinkOptions

MinimalLinkOptions: object

Type declaration

MinimalResolveOptions

MinimalResolveOptions: object

Type declaration

MinimalResolveOptions

MinimalResolveOptions: object

Type declaration

Options

Options: object

Type declaration

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

Options

Options: object

Type declaration

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

PipevpOptions

PipevpOptions: object

Type declaration

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

PipevpOptions

PipevpOptions: object

Type declaration

  • cwd: PortablePath
  • 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

Plugin

Plugin<PluginHooks>: object

Type parameters

  • PluginHooks

Type declaration

PluginConfiguration

PluginConfiguration: object

Type declaration

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

PluginConfiguration

PluginConfiguration: object

Type declaration

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

ProgressDefinition

ProgressDefinition: object

Type declaration

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

ResolveOptions

ResolveOptions: MinimalResolveOptions & object

ResolveOptions

ResolveOptions: MinimalResolveOptions & object

SettingsDefinition

SettingsDefinition

SettingsDefinitionNoDefault

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

ShapeSettingsDefinition

ShapeSettingsDefinition: BaseSettingsDefinition<SHAPE> & object

SimpleSettingsDefinition

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

StreamReportOptions

StreamReportOptions: object

Type declaration

  • configuration: Configuration
  • 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

Variables

Const DEFAULT_LOCK_FILENAME

DEFAULT_LOCK_FILENAME: string & object & object & object = toFilename(`yarn.lock`)

Const DEFAULT_LOCK_FILENAME

DEFAULT_LOCK_FILENAME: string & object & object & object = toFilename(`yarn.lock`)

Const DEFAULT_RC_FILENAME

DEFAULT_RC_FILENAME: string & object & object & object = toFilename(`.yarnrc.yml`)

Const DEFAULT_RC_FILENAME

DEFAULT_RC_FILENAME: string & object & object & object = toFilename(`.yarnrc.yml`)

Const ENVIRONMENT_PREFIX

ENVIRONMENT_PREFIX: "yarn_" = `yarn_`

Const TAG_REGEXP

TAG_REGEXP: RegExp = /^[a-z]+$/

Const YarnVersion

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

Const YarnVersion

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

Const formatColors

formatColors: Map<FormatType, string> | Map<FormatType, number> = chalkOptions.level >= 3 ? new Map([[FormatType.NAME, `#d7875f`],[FormatType.RANGE, `#00afaf`],[FormatType.REFERENCE, `#87afff`],[FormatType.NUMBER, `#ffd700`],[FormatType.PATH, `#d75fd7`],[FormatType.SCOPE, `#d75f00`],[FormatType.ADDED, `#5faf00`],[FormatType.REMOVED, `#d70000`],]) : new Map([[FormatType.NAME, 173],[FormatType.RANGE, 37],[FormatType.REFERENCE, 111],[FormatType.NUMBER, 220],[FormatType.PATH, 170],[FormatType.SCOPE, 166],[FormatType.ADDED, 70],[FormatType.REMOVED, 160],])

Functions

areDescriptorsEqual

areDescriptorsEqual

areIdentsEqual

areIdentsEqual

areLocatorsEqual

areLocatorsEqual

areVirtualPackagesEquivalent

areVirtualPackagesEquivalent

assertNever

  • assertNever(arg: never): never

assertNever

  • assertNever(arg: never): never

bindDescriptor

bindDescriptor

bindLocator

bindLocator

bufferStream

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

bufferStream

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

builtinModules

  • builtinModules(): Set<string>

checksumFile

checksumFile

convertDescriptorToLocator

convertDescriptorToLocator

convertLocatorToDescriptor

convertLocatorToDescriptor

convertPackageToLocator

convertPackageToLocator

convertToIdent

convertToIdent

convertToManifestRange

  • convertToManifestRange(range: string): string
  • The range used internally may differ from the range stored in the Manifest (package.json). This removes any params indicated for internal use. An internal param starts with "__".

    Parameters

    • range: string

      range to convert

    Returns string

convertToManifestRange

  • convertToManifestRange(range: string): string
  • The range used internally may differ from the range stored in the Manifest (package.json). This removes any params indicated for internal use. An internal param starts with "__".

    Parameters

    • range: string

      range to convert

    Returns string

convertToZip

  • convertToZip(tgz: Buffer, opts: ExtractBufferOptions): Promise<ZipFS>

convertToZip

  • convertToZip(tgz: Buffer, opts: ExtractBufferOptions): Promise<ZipFS>

copyPackage

copyPackage

devirtualizeDescriptor

devirtualizeDescriptor

devirtualizeLocator

devirtualizeLocator

dynamicRequire

  • dynamicRequire(request: string): any

dynamicRequire

  • dynamicRequire(path: string): any

dynamicRequire

  • dynamicRequire(path: string): any

dynamicRequireNoCache

dynamicRequireNoCache

escapeRegExp

  • escapeRegExp(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>

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<undefined | number>

executePackageScript

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

executePackageShellcode

  • executePackageShellcode(locator: Locator, command: 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>

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>

executeWorkspaceScript

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

executeWorkspaceScript

  • executeWorkspaceScript(workspace: Workspace, scriptName: string, args: Array<string>, __namedParameters: object): Promise<undefined | 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>

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>

extractArchiveTo

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

get

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

get

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

getArrayWithDefault

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

getArrayWithDefault

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

getDefaultGlobalFolder

  • getDefaultGlobalFolder(): string & object

getDefaultGlobalFolder

  • getDefaultGlobalFolder(): string & object

getFactoryWithDefault

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

getFactoryWithDefault

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

getHomeFolder

  • getHomeFolder(): string & object

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

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

getMapWithDefault

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

getMapWithDefault

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

getPackageAccessibleBinaries

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

getPackageAccessibleBinaries

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

getSetWithDefault

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

getSetWithDefault

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

getWorkspaceAccessibleBinaries

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

getWorkspaceAccessibleBinaries

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

hasPackageScript

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

hasPackageScript

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

hasWorkspaceScript

  • hasWorkspaceScript(workspace: Workspace, scriptName: string): Promise<boolean>

hasWorkspaceScript

  • hasWorkspaceScript(workspace: Workspace, scriptName: string): Promise<boolean>

isFolderInside

isFolderInside

isReportError

  • isReportError(error: Error): error

isVirtualDescriptor

  • isVirtualDescriptor(descriptor: Descriptor): boolean

isVirtualDescriptor

  • isVirtualDescriptor(descriptor: Descriptor): boolean

isVirtualLocator

  • isVirtualLocator(locator: Locator): boolean

isVirtualLocator

  • isVirtualLocator(locator: Locator): boolean

makeArchiveFromDirectory

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

makeArchiveFromDirectory

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

makeDescriptor

makeDescriptor

makeHash

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

makeHash

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

makeIdent

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

makeIdent

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

makeLocator

makeLocator

makeRange

  • makeRange(__namedParameters: object): string

makeRange

  • makeRange(__namedParameters: object): string

makeScriptEnv

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

makeScriptEnv

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

mapAndFilter

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

    • In

    • Out

    Parameters

    • array: Array<In>
    • cb: function
        • (value: In): Out | typeof mapAndFilterSkip
        • Parameters

          • value: In

          Returns Out | typeof mapAndFilterSkip

    Returns Array<Out>

mapAndFilter

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

    • In

    • Out

    Parameters

    • array: Array<In>
    • cb: function
        • (value: In): Out | typeof mapAndFilterSkip
        • Parameters

          • value: In

          Returns Out | typeof mapAndFilterSkip

    Returns Array<Out>

parseDescriptor

  • parseDescriptor(string: string, strict?: boolean): Descriptor

parseDescriptor

  • parseDescriptor(string: string, strict?: boolean): Descriptor

parseFileStyleRange

  • parseFileStyleRange(range: string, __namedParameters: object): object

parseFileStyleRange

  • parseFileStyleRange(range: string, __namedParameters: object): object

parseIdent

  • parseIdent(string: string): Ident

parseIdent

  • parseIdent(string: string): Ident

parseLocator

  • parseLocator(string: string, strict?: boolean): Locator

parseLocator

  • parseLocator(string: string, strict?: boolean): Locator

parseRange

  • parseRange<Opts>(range: string, opts?: Opts): ParseRangeReturnType<Opts>

parseRange

  • parseRange<Opts>(range: string, opts?: Opts): ParseRangeReturnType<Opts>

pipevp

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

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

    Returns Promise<object>

pipevp

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

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

    Returns Promise<object>

prepareExternalProject

prepareExternalProject

prettifyAsyncErrors

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

    • T

    Parameters

    • fn: function
        • (): Promise<T>
        • Returns Promise<T>

    • update: function
        • (message: string): string
        • Parameters

          • message: string

          Returns string

    Returns Promise<T>

prettifyAsyncErrors

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

    • T

    Parameters

    • fn: function
        • (): Promise<T>
        • Returns Promise<T>

    • update: function
        • (message: string): string
        • Parameters

          • message: string

          Returns string

    Returns Promise<T>

prettifySyncErrors

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

prettifySyncErrors

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

prettyDescriptor

prettyDescriptor

prettyIdent

prettyIdent

prettyLocator

prettyLocator

prettyLocatorNoColors

  • prettyLocatorNoColors(locator: Locator): string

prettyLocatorNoColors

  • prettyLocatorNoColors(locator: Locator): string

prettyRange

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

prettyRange

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

prettyReference

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

prettyReference

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

prettyWorkspace

prettyWorkspace

put

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

put

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

releaseAfterUseAsync

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

releaseAfterUseAsync

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

renamePackage

renamePackage

request

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

request

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

requirableIdent

  • requirableIdent(ident: Ident): string

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

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

slugifyIdent

  • slugifyIdent(ident: Ident): string

slugifyIdent

  • slugifyIdent(ident: Ident): string

slugifyLocator

  • slugifyLocator(locator: Locator): string & object & object & object

slugifyLocator

  • slugifyLocator(locator: Locator): string & object & object & object

sortDescriptors

sortDescriptors

sortMap

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

sortMap

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

stringifyDescriptor

  • stringifyDescriptor(descriptor: Descriptor): string

stringifyDescriptor

  • stringifyDescriptor(descriptor: Descriptor): string

stringifyIdent

  • stringifyIdent(ident: Ident): string

stringifyIdent

  • stringifyIdent(ident: Ident): string

stringifyLocator

  • stringifyLocator(locator: Locator): string

stringifyLocator

  • stringifyLocator(locator: Locator): string

tryParseDescriptor

  • tryParseDescriptor(string: string, strict?: boolean): Descriptor | null

tryParseDescriptor

  • tryParseDescriptor(string: string, strict?: boolean): Descriptor | null

tryParseIdent

  • tryParseIdent(string: string): Ident | null

tryParseIdent

  • tryParseIdent(string: string): Ident | null

tryParseLocator

  • tryParseLocator(string: string, strict?: boolean): Locator | null

tryParseLocator

  • tryParseLocator(string: string, strict?: boolean): Locator | null

virtualizeDescriptor

virtualizeDescriptor

virtualizePackage

virtualizePackage

Object literals

Const CorePlugin

CorePlugin: object

hooks

hooks: object

reduceDependency

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

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

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

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 = 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 = supportsColor

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

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

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

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

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

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 & object & 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

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 = ``

type

type: ANY = SettingsType.ANY

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

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: undefined | string = getRcFilename()

description

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

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

Generated using TypeDoc