@yarnpkg/nm
Index
Functions
buildLocatorMap
Parameters
nodeModulesTree: NodeModulesTree
Returns NodeModulesLocatorMap
buildNodeModulesTree
Parameters
pnp: PnpApi
PnP API
options: NodeModulesTreeOptions
Returns { errors: NodeModulesTreeErrors; preserveSymlinksRequired: boolean; tree: null | NodeModulesTree }
hoisted
node_modules
directories representation in-memoryerrors: NodeModulesTreeErrors
preserveSymlinksRequired: boolean
tree: null | NodeModulesTree
getArchivePath
Returns path to archive, if package location is inside the archive.
Parameters
packagePath: PortablePath
package location
Returns null | PortablePath
path to archive is location is insde the archive or null otherwise
References
HoisterDependencyKind
Re-exports HoisterDependencyKind
HoisterResult
Re-exports HoisterResult
HoisterTree
Re-exports HoisterTree
hoist
Re-exports hoist
Type Aliases
NodeModulesBaseNode
Type declaration
dirList: Set<Filename>
NodeModulesLocatorMap
NodeModulesPackageNode
Type declaration
aliases: string[]
optionaldirList?: undefined
linkType: LinkType
locator: LocatorKey
nodePath: string
target: PortablePath
NodeModulesTree
Node modules tree - a map of every folder within the node_modules, along with their directory listing and whether they are a symlink and their location.
Sample contents: /home/user/project/node_modules -> {dirList: ['foo', 'bar']} /home/user/project/node_modules/foo -> {target: '/home/user/project/.yarn/.cache/foo.zip/node_modules/foo', linkType: 'HARD'} /home/user/project/node_modules/bar -> {target: '/home/user/project/packages/bar', linkType: 'SOFT'}
Retrieve full package list and build hoisted
node_modules
directories representation in-memory.