Options
All
  • Public
  • Public/Protected
  • All
Menu

Package plugin-compat

@yarnpkg/plugin-compat

This plugin contains various builtin patches that will be applied to packages that aren't compatible with the Plug'n'Play resolution out-of-the-box.

Install

This plugin is included by default in Yarn.

Compatibility Features

Variables

EventEmitter

EventEmitter: EventEmitter = require('events').EventEmitter

Const FILENAME

FILENAME: string = path.basename(__filename)

Const IGNORED_VERSIONS

IGNORED_VERSIONS: Set<string> = new Set([`3.3.3333`,`3.7.0-beta`,`3.9.0-beta`,`4.0.0-beta`,`4.3.0-beta`,`4.4.0-beta`,// Broken publish - missing files`4.9.0-beta`,])

Native

Native: any = require("bindings")("fse")

Const Native

Native: any = require('./fsevents.node')

Const Native

Native: any = require("./fsevents.node")

Const PATCHES

PATCHES: Map<string & object, getPatch> = new Map([[structUtils.makeIdent(null, `fsevents`).identHash, getFseventsPatch],[structUtils.makeIdent(null, `resolve`).identHash, getResolvePatch],[structUtils.makeIdent(null, `typescript`).identHash, getTypescriptPatch],])

Const SLICES

SLICES: object[] = [{from: `5d50de3`,to: `426f5a7`,onto: `e39bdc3`,range: `>=3.2 <3.5`,},{from: `5d50de3`,to: `426f5a7`,onto: `cf7b2d4`,range: `>=3.5 <=3.6`,},{from: `5d50de3`,to: `426f5a7`,onto: `cda54b8`,range: `>3.6 <3.7`,},{from: `5d50de3`,to: `2f85932`,onto: `e39bdc3`,range: `>=3.7 <3.9`,},{from: `5d50de3`,to: `3af06df`,onto: `551f0dd`,range: `>=3.9 <4.0`,},{from: `6dbdd2f`,to: `6dbdd2f`,onto: `56865f7`,range: `>=4.0 <4.1`,},{from: `746d79b`,to: `746d79b`,onto: `69972a3`,range: `>=4.1 <4.2`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.2{from: `8e0e8703b9c95013aec7819e4593d099cdf7763a`,to: `178a67b4663d80b0fcbea542e7255b4499b51708`,onto: `bfc55b5762443c37ecdef08a3b5a4e057b4d1e85`,range: `>=4.2 <4.3`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.3{from: `530aad19e4ac19d35cb6b200168c91ce86cb0050`,to: `ffa54c5a104e7940b5c23666ddffbf44878f9d9f`,onto: `28e3e6ff2f49f1dbf06d31809ec73dbe42f1aa63`,range: `>=4.3 <4.4`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.4{from: `793bfe32745bf6797924354b0fd5be62cf01950c`,to: `20ffca2f3c48591c971e6606a55b7b1820d8a64f`,onto: `a10409ccaa3604790dc45f52ef0402eb49015dcf`,range: `>=4.4 <4.5`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.5{from: `79fe5d206f89e5f1585807bdcd7feeb567a69646`,to: `fff89a12766fa485e35b1c65d8631d109c4e2c0e`,onto: `7893f689fedcfe28a499d119d34844840bce9160`,range: `>=4.5.2 <4.6`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.6{from: `fbec717ef33fc2db5791f2a1d5f9a315e293a50a`,to: `fbec717ef33fc2db5791f2a1d5f9a315e293a50a`,onto: `83efc9f0d646bf86a3469e00c5ef5e4f7ab7cb95`,range: `>=4.6.1-rc <4.7`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.7{from: `cd8d000510ed2d2910e0ebaa903a51adda546a0a`,to: `cd8d000510ed2d2910e0ebaa903a51adda546a0a`,onto: `6e62273fa1e7469b89b589667c2c233789c62176`,range: `>=4.7.0-beta <4.8`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.8.0-beta{from: `3287098f4785fd652112beadf3b33a960fcd19aa`,to: `3287098f4785fd652112beadf3b33a960fcd19aa`,onto: `9a09c37878a45b06994485fdb510eb4d24587dcb`,range: `>=4.8.0-beta <4.8.1-rc`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.8-stable{from: `623a7ac5aa49250155d39e604b09b4d015468a9c`,to: `30840e0c2ad8e115c518f87379b7cb55fdf77f03`,onto: `60b5167a2a7015759d048cdd4655d1f66a8416a2`,range: `>=4.8.1-rc <4.8.4`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.8{from: `d3747e92c3cd2d1f98739382c14226a725df38fd`,to: `5b9a74243e47db6113e857eabe5d26589fa0b64f`,onto: `a614119c1921ca61d549a7eee65c0b8c69c28752`,range: `>=4.8.4 <4.9.1-beta`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.9-beta{from: `69c84aacfcea603c4d74721366cdcbbebd1c1681`,to: `18b67922d3dcc5215541a38bf6417972270bf60f`,onto: `549b5429d4837344e8c99657109bb6538fd2dbb5`,range: `>=4.9.1-beta <4.9.2-rc`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.9-rc{from: `5613f8d8e30dfa9fb3da15e2b8432ed7e2347a12`,to: `d3a8a86ce4774d607c5a4a225cc5b59b1f96f42f`,onto: `107f832b80df2dc97748021cb00af2b6813db75b`,range: `>=4.9.2-rc <4.9.4`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.9{from: `a0859a75a408ec95222a3f0175ba0644d60396f1`,to: `936e68ba96e004bd32e438d64ac720c3bfe5576b`,onto: `e2868216f637e875a74c675845625eb15dcfe9a2`,range: `>=4.9.4 <5.0.0-beta`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-5.0-beta{from: `65bff6fadce4736bb9a77213ba8016f1ac7d25e5`,to: `6225be2771938c6a1fce825eabe66292e4ace489`,onto: `dcad07ffd29854e2b93a86da0ba197f6eec21698`,range: `>=5.0.0-beta <5.0.1-rc`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-5.0{from: `2c85874875fdf1f1182733b99afe47604915bfec`,to: `9a2c1c80b05a5fbd5bc6d2bfcbaa617793a236ab`,onto: `89515ce7e31d0bfaef776ac25929a78015cceb82`,range: `>=5.0.1-rc <5.1.0-beta`,},// https://github.com/merceyz/TypeScript/tree/merceyz/pnp-5.1{from: `a6ef895fb06014c416cce2f80969912ec5ea47d5`,to: `a6ef895fb06014c416cce2f80969912ec5ea47d5`,onto: `1c5cc6152322cd5b131b6e617e0947bcb068fc4a`,range: `>=5.1.0-beta`,},]

Const TEST_RANGES

TEST_RANGES: Array<[]> = [[`fsevents`, [`^1`,`^2.1`,`latest`,],], [`resolve`, [`>=1.9`,`latest`,`next`,],], [`typescript`, [`>=3.2`,`latest`,`next`,],],]

Const TEST_TIMEOUT

TEST_TIMEOUT: 100000000 = 100000000

Const TMP_DIR

TMP_DIR: "/tmp/ts-builds" = `/tmp/ts-builds`

Const TS_REPO

TS_REPO: "/tmp/ts-repo" = `/tmp/ts-repo`

brotliCompressSync

brotliCompressSync: brotliCompressSync

Const cp

cp: "child_process" = require(`child_process`)

Const crypto

crypto: "crypto" = require(`crypto`)

defer

defer: setImmediate = global.setImmediate || process.nextTick

Const events

events: any = Native.constants

Const events

events: any = Native.constants

fs

fs: "fs" = require('fs')

Const fs

fs: "fs" = require(`fs`)

getPatch

getPatch: any

Const https

https: "https" = require(`https`)

inherits

inherits: inherits = require('util').inherits

Const jsFile

jsFile: string = process.argv[3]

Let patch

patch: string

Let patch

patch: string

Let patch

patch: string

Const patchContent

patchContent: Buffer = readFileSync(process.argv[2])

Const patchEncoded

patchEncoded: string = brotliCompressSync(patchContent).toString(`base64`)

Const path

path: PlatformPath = require(`path`)

Const path

path: PlatformPath = require(`path`)

Const path

path: PlatformPath = require(`path`)

Const path

path: PlatformPath = require(`path`)

Let pnpApi

pnpApi: any = null

readFileSync

readFileSync: readFileSync

Let relevantVersions

relevantVersions: any

Const semver

semver: any = require(`semver`)

Const testedCandidates

testedCandidates: Set<LocatorHash> = new Set()

A Set used to keep track of the test candidates, so we only test each candidate once.

writeFileSync

writeFileSync: writeFileSync

Functions

FSEvents

  • FSEvents(path: any, handler: any): void

anyIsTrue

  • anyIsTrue(obj: any): boolean

anyIsTrue

  • anyIsTrue(obj: any): boolean

buildRepository

  • buildRepository(__namedParameters: object): Promise<string>

cloneRepository

  • cloneRepository(): Promise<void>

createProject

execFile

  • execFile(binary: any, args: any, __namedParameters?: object): Promise<any>

fetch

  • fetch(url: any): Promise<any>

fetchVersions

  • fetchVersions(range: any): Promise<any[]>

getConfiguration

getDescriptorCandidates

getEventType

  • getEventType(flags: any): "unknown" | "deleted" | "moved" | "created" | "modified" | "root-changed"

getEventType

  • getEventType(flags: any): "unknown" | "deleted" | "moved" | "created" | "modified" | "root-changed" | "cloned"

getEventType

  • getEventType(flags: any): "unknown" | "deleted" | "moved" | "created" | "modified" | "root-changed" | "cloned"

getFileChanges

  • getFileChanges(flags: any): object

getFileChanges

  • getFileChanges(flags: any): object

getFileChanges

  • getFileChanges(flags: any): object

getFileType

  • getFileType(flags: any): undefined | "file" | "directory" | "symlink"

getFileType

  • getFileType(flags: any): undefined | "file" | "directory" | "symlink"

getFileType

  • getFileType(flags: any): undefined | "file" | "directory" | "symlink"

getInfo

  • getInfo(path: any, flags: any): object

getInfo

  • getInfo(path: any, flags: any): object

getInfo

  • getInfo(path: any, flags: any): object

getPatch

  • getPatch(): string

getPatch

  • getPatch(): string

getPatch

  • getPatch(): string

getVirtualLookupFn

  • getVirtualLookupFn(pnpApi: any): (Anonymous function)

main

  • main(): Promise<void>

proxies

  • proxies(ctor: any, target: any): void

resetGit

  • resetGit(hash: any): Promise<void>

run

  • run(__namedParameters: object): Promise<object>

testCandidate

  • testCandidate(locator: Locator): Promise<void>

validate

  • validate(version: any, patch: any): Promise<void>

watch

  • watch(path: any): any

watch

  • watch(path: any, handler: any): (Anonymous function)

watch

  • watch(path: any, since: any, handler: any): (Anonymous function)

Object literals

Const TS_REPO_SPAWN

TS_REPO_SPAWN: object

cwd

cwd: string = TS_REPO

Const plugin

plugin: object

hooks

hooks: object

getBuiltinPatch

  • getBuiltinPatch(project: Project, name: string): Promise<undefined | null | string>

reduceDependency

registerPackageExtensions

  • registerPackageExtensions(configuration: Configuration, registerPackageExtension: function): Promise<void>

Generated using TypeDoc