Options
All
  • Public
  • Public/Protected
  • All
Menu

Package yarnpkg-pnp

Type aliases

ApiMetadata

ApiMetadata: object

Type declaration

  • cache:
  • instance: PnpApi
  • lastRefreshCheck: number
  • stats: Stats

ApplyPatchOptions

ApplyPatchOptions: object

Type declaration

DependencyTarget

DependencyTarget: string | [string, string] | null

HydrateRuntimeStateOptions

HydrateRuntimeStateOptions: object

Type declaration

  • basePath: string

LocationBlacklistData

LocationBlacklistData: Array<PortablePath>

LocationLengthData

LocationLengthData: Array<number>

MakeApiOptions

MakeApiOptions: object

Type declaration

  • Optional allowDebug?: undefined | false | true
  • Optional compatibilityMode?: undefined | false | true
  • fakeFs: FakeFS<PortablePath>
  • pnpapiResolution: NativePath

MakeManagerOptions

MakeManagerOptions: object

Type declaration

Manager

Manager: ReturnType<typeof makeManager>

PackageInformation

PackageInformation<P>: object

Type parameters

Type declaration

  • discardFromLookup: boolean
  • linkType: LinkType
  • packageDependencies: Map<string, DependencyTarget>
  • packageLocation: P
  • packagePeers: Set<string>

PackageInformationData

PackageInformationData<P>: object

Type parameters

Type declaration

  • Optional discardFromLookup?: undefined | false | true
  • linkType: LinkType
  • packageDependencies: Array<[string, DependencyTarget]>
  • packageLocation: P
  • Optional packagePeers?: Array<string>

PackageLocator

PackageRegistry

PackageRegistry: Map<string | null, PackageStore>

PackageRegistryData

PackageRegistryData: Array<[string | null, PackageStoreData]>

PackageStore

PackageStore: Map<string | null, PackageInformation<PortablePath>>

PackageStoreData

PackageStoreData: Array<[string | null, PackageInformationData<PortablePath>]>

PhysicalPackageLocator

PhysicalPackageLocator: object

Type declaration

  • name: string
  • reference: string

PnpApi

PnpApi: object

Type declaration

PnpSettings

PnpSettings: object

Type declaration

PrettyJsonMachine

PrettyJsonMachine: object

Type declaration

ResolveRequestOptions

ResolveToUnqualifiedOptions

ResolveToUnqualifiedOptions: object

Type declaration

  • Optional considerBuiltins?: undefined | false | true

ResolveUnqualifiedOptions

ResolveUnqualifiedOptions: object

Type declaration

  • Optional extensions?: Array<string>

RuntimeState

RuntimeState: object

Type declaration

SerializedState

SerializedState: object

Type declaration

TopLevelPackageLocator

TopLevelPackageLocator: object

Type declaration

  • name: null
  • reference: null

Variables

$$SETUP_STATE

$$SETUP_STATE: function

Type declaration

Const MODULE_NOT_FOUND_ERRORS

MODULE_NOT_FOUND_ERRORS: Set<ErrorCode> = new Set([ErrorCode.BLACKLISTED,ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED,ErrorCode.MISSING_DEPENDENCY,ErrorCode.MISSING_PEER_DEPENDENCY,ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED,ErrorCode.UNDECLARED_DEPENDENCY,])

__non_webpack_module__

__non_webpack_module__: NodeModule

Const defaultApi

defaultApi: object & object = Object.assign(makeApi(defaultRuntimeState, {fakeFs: defaultFsLayer,pnpapiResolution: defaultPnpapiResolution,}), {/*** Can be used to generate a different API than the default one (for example* to map it on `/` rather than the local directory path, or to use a* different FS layer than the default one).*/makeApi: ({basePath = undefined,fakeFs = defaultFsLayer,pnpapiResolution = defaultPnpapiResolution,...rest}: Partial<MakeApiOptions> & {basePath?: NativePath}) => {const apiRuntimeState = typeof basePath !== `undefined`? $$SETUP_STATE(hydrateRuntimeState, basePath): defaultRuntimeState;return makeApi(apiRuntimeState, {fakeFs,pnpapiResolution,...rest,});},/*** Will inject the specified API into the environment, monkey-patching FS. Is* automatically called when the hook is loaded through `--require`.*/setup: (api?: PnpApi) => {applyPatch(api || defaultApi, {fakeFs: defaultFsLayer,manager,});},})

Const defaultFsLayer

defaultFsLayer: FakeFS<PortablePath> = new VirtualFS({baseFs: new ZipOpenFS({baseFs: nodeFs,libzip: getLibzipSync(),maxOpenFiles: 80,readOnlyArchives: true,}),})

Const defaultPnpapiResolution

defaultPnpapiResolution: string = __filename

Const defaultRuntimeState

defaultRuntimeState: object = $$SETUP_STATE(hydrateRuntimeState)

Type declaration

Let manager

manager: Manager

Const nodeFs

nodeFs: NodeFS = new NodeFS(localFs)

Const readFileP

readFileP: __promisify__ = promisify(readFile)

Functions

applyPatch

generate

generateCollapsedArray

  • generateCollapsedArray(data: Array<any>, state: PrettyJsonState, indent: string): string

generateCollapsedObject

  • generateCollapsedObject(data: object, state: PrettyJsonState, indent: string): string

generateExpandedArray

  • generateExpandedArray(data: Array<any>, state: PrettyJsonState, indent: string): string

generateExpandedObject

  • generateExpandedObject(data: object, state: PrettyJsonState, indent: string): string

generateFallbackExclusionList

  • generateFallbackExclusionList(settings: PnpSettings): Array<[string, Array<string>]>

generateFallbackPoolData

  • generateFallbackPoolData(settings: PnpSettings): Array<[string, string | [string, string] | null]>

generateInlinedScript

generateInlinedSetup

generateJsonString

generateLoader

  • generateLoader(shebang: string | null | undefined, loader: string): string

generateLocationBlacklistData

generateNext

  • generateNext(key: string, data: any, state: PrettyJsonState, indent: string): string

generatePackageRegistryData

generatePrettyJson

  • generatePrettyJson(data: any): string

generateSerializedState

generateSplitScript

  • generateSplitScript(settings: PnpSettings & object): object

generateSplitSetup

  • generateSplitSetup(dataLocation: string): string

getIssuerModule

  • getIssuerModule(parent: NodeModule | null | undefined): NodeModule | null

getPathForDisplay

  • getPathForDisplay(p: Path): string & object

hydratePnpFile

  • hydratePnpFile(location: string, __namedParameters: object): Promise<object>

hydratePnpSource

  • hydratePnpSource(source: string, __namedParameters: object): object

hydrateRuntimeState

makeApi

makeError

  • makeError(pnpCode: ErrorCode, message: string, data?: Object): Error

makeManager

Const makeRuntimeApi

sortMap

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

Object literals

Const localFs

localFs: object

Const prettyJsonMachine

prettyJsonMachine: object

__computed

__computed: object

collapsed

collapsed: true = true

next

next: object

*

*: DEFAULT = PrettyJsonState.DEFAULT

fallbackExclusionList

fallbackExclusionList: FALLBACK_EXCLUSION_LIST = PrettyJsonState.FALLBACK_EXCLUSION_LIST

packageDependencies

packageDependencies: PACKAGE_DEPENDENCIES = PrettyJsonState.PACKAGE_DEPENDENCIES

packageRegistryData

packageRegistryData: PACKAGE_REGISTRY_DATA = PrettyJsonState.PACKAGE_REGISTRY_DATA

Generated using TypeDoc