@pnpm/link-bins
Version:
Link bins to node_modules/.bin
12 lines (11 loc) • 582 B
TypeScript
/**
* Returns the node_modules paths relevant to a binary in the virtual store layout.
* For a binary at `.pnpm/pkg@version/node_modules/pkg/bin/cli.js`, this returns:
* 1. `.pnpm/pkg@version/node_modules/pkg/node_modules` (bundled dependencies)
* 2. `.pnpm/pkg@version/node_modules` (sibling/regular dependencies)
*
* These directories must be in NODE_PATH so that tools like `import-local`
* (used by jest, eslint, etc.) which resolve from CWD can find the correct
* dependency versions.
*/
export declare function getBinNodePaths(target: string): Promise<string[]>;