@yarnpkg/pnp
Index
Enumerations
Functions
Type Aliases
- DependencyTarget
- LocationLengthData
- PackageInformation
- PackageInformationData
- PackageLocator
- PackageRegistry
- PackageRegistryData
- PackageStore
- PackageStoreData
- PhysicalPackageLocator
- PnpApi
- PnpSettings
- ResolveRequestOptions
- ResolveToUnqualifiedOptions
- ResolveUnqualifiedOptions
- RuntimeState
- SerializedState
- TopLevelPackageLocator
Functions
generateInlinedScript
Parameters
settings: PnpSettings
Returns string
generateLoader
Parameters
shebang: undefined | null | string
loader: string
Returns string
generatePrettyJson
Parameters
data: any
Returns string
generateSplitScript
Parameters
settings: PnpSettings
Returns { dataFile: string; loaderFile: string }
dataFile: string
loaderFile: string
getESMLoaderTemplate
Returns string
hydratePnpFile
Parameters
location: PortablePath
__namedParameters: { fakeFs: FakeFS<PortablePath>; pnpapiResolution: string }
Returns Promise<PnpApi>
hydratePnpSource
Parameters
source: string
__namedParameters: { basePath: string; fakeFs: FakeFS<PortablePath>; pnpapiResolution: string }
Returns PnpApi
makeRuntimeApi
Parameters
settings: PnpSettings
basePath: string
fakeFs: FakeFS<PortablePath>
Returns PnpApi
Type Aliases
DependencyTarget
LocationLengthData
PackageInformation
Type parameters
- P: Path
Type declaration
discardFromLookup: boolean
linkType: LinkType
packageDependencies: Map<string, DependencyTarget>
packageLocation: P
packagePeers: Set<string>
PackageInformationData
Type parameters
- P: Path
Type declaration
optionaldiscardFromLookup?: boolean
linkType: LinkType
packageDependencies: [string, DependencyTarget][]
packageLocation: P
optionalpackagePeers?: string[]
PackageLocator
PackageRegistry
PackageRegistryData
PackageStore
PackageStoreData
PhysicalPackageLocator
Type declaration
name: string
reference: string
PnpApi
Type declaration
VERSIONS: { std: number }
[key string]: number
std: number
findPackageLocator: (location: NativePath) => PhysicalPackageLocator | null
Parameters
location: NativePath
Returns PhysicalPackageLocator | null
optionalgetAllLocators?: () => PhysicalPackageLocator[]
Returns PhysicalPackageLocator[]
getDependencyTreeRoots: () => PhysicalPackageLocator[]
Returns PhysicalPackageLocator[]
getLocator: (name: string, referencish: string | [string, string]) => PhysicalPackageLocator
Parameters
name: string
referencish: string | [string, string]
Returns PhysicalPackageLocator
getPackageInformation: (locator: PackageLocator) => PackageInformation<NativePath> | null
Parameters
locator: PackageLocator
Returns PackageInformation<NativePath> | null
resolveRequest: (request: string, issuer: NativePath | null, opts?: ResolveRequestOptions) => NativePath | null
Parameters
request: string
issuer: NativePath | null
optionalopts: ResolveRequestOptions
Returns NativePath | null
resolveToUnqualified: (request: string, issuer: NativePath | null, opts?: ResolveToUnqualifiedOptions) => NativePath | null
Parameters
request: string
issuer: NativePath | null
optionalopts: ResolveToUnqualifiedOptions
Returns NativePath | null
resolveUnqualified: (unqualified: NativePath, opts?: ResolveUnqualifiedOptions) => NativePath
Parameters
unqualified: NativePath
optionalopts: ResolveUnqualifiedOptions
Returns NativePath
optionalresolveVirtual?: (p: NativePath) => NativePath | null
Parameters
p: NativePath
Returns NativePath | null
topLevel: { name: null; reference: null }
name: null
reference: null
PnpSettings
Type declaration
dependencyTreeRoots: PhysicalPackageLocator[]
optionalenableTopLevelFallback?: boolean
optionalfallbackExclusionList?: PhysicalPackageLocator[]
optionalfallbackPool?: Map<string, DependencyTarget>
optionalignorePattern?: string | null
packageRegistry: PackageRegistry
optionalshebang?: string | null
ResolveRequestOptions
ResolveToUnqualifiedOptions
Type declaration
optionalconsiderBuiltins?: boolean
ResolveUnqualifiedOptions
Type declaration
optionalconditions?: Set<string>
optionalextensions?: string[]
RuntimeState
Type declaration
basePath: PortablePath
dependencyTreeRoots: PhysicalPackageLocator[]
enableTopLevelFallback: boolean
fallbackExclusionList: Map<string, Set<string>>
fallbackPool: Map<string, DependencyTarget>
ignorePattern: RegExp | null
packageLocatorsByLocations: Map<PortablePath, { discardFromLookup: boolean; locator: PhysicalPackageLocator }>
packageRegistry: PackageRegistry
SerializedState
Type declaration
__info: string[]
dependencyTreeRoots: PhysicalPackageLocator[]
enableTopLevelFallback: boolean
fallbackExclusionList: [string, string[]][]
fallbackPool: [string, DependencyTarget][]
ignorePatternData: string | null
packageRegistryData: PackageRegistryData
TopLevelPackageLocator
Type declaration
name: null
reference: null