Options
All
  • Public
  • Public/Protected
  • All
Menu

Package plugin-pnp

@yarnpkg/plugin-pnp

This plugin adds support for installing packages according to the Plug'n'Play specification.

Install

This plugin is included by default in Yarn.

Type aliases

AbstractInstallerOptions

AbstractInstallerOptions: LinkOptions & object

Variables

Const FORCED_UNPLUG_FILETYPES

FORCED_UNPLUG_FILETYPES: Set<string> = new Set([// Windows can't execute exe files inside zip archives`.exe`,// The c/c++ compiler can't read files from zip archives`.h`, `.hh`, `.hpp`, `.c`, `.cc`, `.cpp`,// The java runtime can't read files from zip archives`.java`, `.jar`,// Node opens these through dlopen`.node`,])

Const FORCED_UNPLUG_PACKAGES

FORCED_UNPLUG_PACKAGES: Set<string & object> = new Set([// Some packages do weird stuff and MUST be unplugged. I don't like them.structUtils.makeIdent(null, `nan`).identHash,structUtils.makeIdent(null, `node-gyp`).identHash,structUtils.makeIdent(null, `node-pre-gyp`).identHash,structUtils.makeIdent(null, `node-addon-api`).identHash,// Those ones contain native builds (*.node), and Node loads them through dlopenstructUtils.makeIdent(null, `fsevents`).identHash,])

Functions

Const getPnpPath

  • getPnpPath(project: Project): object

getUnpluggedPath

  • getUnpluggedPath(locator: Locator, __namedParameters: object): string & object

populateYarnPaths

  • populateYarnPaths(project: Project, definePath: function): Promise<void>

Const quotePathIfNeeded

  • quotePathIfNeeded(path: string): string

setupScriptEnvironment

  • setupScriptEnvironment(project: Project, env: object, makePathWrapper: function): Promise<void>
  • Parameters

    • project: Project
    • env: object
      • [key: string]: string
    • makePathWrapper: function
        • (name: string, argv0: string, args: Array<string>): Promise<void>
        • Parameters

          • name: string
          • argv0: string
          • args: Array<string>

          Returns Promise<void>

    Returns Promise<void>

Object literals

Const plugin

plugin: object

commands

commands: UnplugCommand[] = [unplug,]

linkers

linkers: PnpLinker[] = [PnpLinker,]

configuration

configuration: object

nodeLinker

nodeLinker: object

default

default: string = `pnp`

description

description: string = `The linker used for installing Node packages, one of: "pnp", "node-modules"`

type

type: STRING = SettingsType.STRING

pnpDataPath

pnpDataPath: object

default

default: string = `./.pnp.data.json`

description

description: string = `Path of the file where the PnP data (used by the loader) must be written`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

pnpEnableInlining

pnpEnableInlining: object

default

default: boolean = true

description

description: string = `If true, the PnP data will be inlined along with the generated loader`

type

type: BOOLEAN = SettingsType.BOOLEAN

pnpFallbackMode

pnpFallbackMode: object

default

default: string = `dependencies-only`

description

description: string = `If true, the generated PnP loader will follow the top-level fallback rule`

type

type: STRING = SettingsType.STRING

pnpIgnorePatterns

pnpIgnorePatterns: object

default

default: never[] = []

description

description: string = `Array of glob patterns; files matching them will use the classic resolution`

isArray

isArray: true = true

type

type: STRING = SettingsType.STRING

pnpMode

pnpMode: object

default

default: string = `strict`

description

description: string = `If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.`

type

type: STRING = SettingsType.STRING

pnpShebang

pnpShebang: object

default

default: string = `#!/usr/bin/env node`

description

description: string = `String to prepend to the generated PnP script`

type

type: STRING = SettingsType.STRING

pnpUnpluggedFolder

pnpUnpluggedFolder: object

default

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

description

description: string = `Folder where the unplugged packages must be stored`

type

type: ABSOLUTE_PATH = SettingsType.ABSOLUTE_PATH

hooks

hooks: object

populateYarnPaths

populateYarnPaths: populateYarnPaths

setupScriptEnvironment

setupScriptEnvironment: setupScriptEnvironment

Generated using TypeDoc