mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-12 01:54:53 -04:00
## Summary - pnpm installing a Node.js runtime (`node@runtime:<ver>`, `pnpm env use`, `pnpm runtime set node`) no longer extracts the bundled `npm`, `npx`, and `corepack`. These make up ~2,800 of ~5,800 files in a typical Node.js archive, so skipping them materially reduces hashing, CAS writes, SQLite index inserts, and import/link work. - Users who still need `npm` can install it as a separate package. ## How A new optional `ignoreFilePattern` (regex source string, serializable across the worker boundary) threads through `FetchOptions` → `tarball-fetcher` → `@pnpm/worker` → `cafs.addFilesFromTarball`. `cafs.addFilesFromTarball` now accepts a per-call ignore on top of the existing cafs-level `ignoreFile`; the two are combined. `@pnpm/fetching.binary-fetcher` defines the Node-specific regex and applies it when `opts.pkg.name === 'node'`: - Tarball path: sets `ignoreFilePattern`. - Windows zip path: new `ignoreEntry?: RegExp` on `AssetInfo`; `extractZipToTarget` strips the `basename/` prefix and skips matching entries before `zip.extractEntryTo`. `@pnpm/engine.runtime.node-resolver`'s `getNodeBinsForCurrentOS` drops `npm`/`npx` so pnpm no longer creates shims for bins that no longer exist. ## Breaking change Shipping in v11. After this lands, `pnpm runtime set node` / `node@runtime:<version>` no longer puts `npm`, `npx`, or `corepack` on `$PATH`. Scripts that call them directly will need to install npm separately.
56 lines
972 B
JSON
56 lines
972 B
JSON
{
|
|
"extends": "@pnpm/tsconfig",
|
|
"compilerOptions": {
|
|
"outDir": "lib",
|
|
"rootDir": "src"
|
|
},
|
|
"include": [
|
|
"src/**/*.ts",
|
|
"../../__typings__/**/*.d.ts"
|
|
],
|
|
"references": [
|
|
{
|
|
"path": "../../core/types"
|
|
},
|
|
{
|
|
"path": "../../engine/runtime/node-resolver"
|
|
},
|
|
{
|
|
"path": "../../fetching/binary-fetcher"
|
|
},
|
|
{
|
|
"path": "../../fetching/directory-fetcher"
|
|
},
|
|
{
|
|
"path": "../../fetching/fetcher-base"
|
|
},
|
|
{
|
|
"path": "../../fetching/git-fetcher"
|
|
},
|
|
{
|
|
"path": "../../fetching/tarball-fetcher"
|
|
},
|
|
{
|
|
"path": "../../fetching/types"
|
|
},
|
|
{
|
|
"path": "../../hooks/types"
|
|
},
|
|
{
|
|
"path": "../../network/auth-header"
|
|
},
|
|
{
|
|
"path": "../../network/fetch"
|
|
},
|
|
{
|
|
"path": "../../resolving/default-resolver"
|
|
},
|
|
{
|
|
"path": "../../resolving/resolver-base"
|
|
},
|
|
{
|
|
"path": "../../store/index"
|
|
}
|
|
]
|
|
}
|