mirror of
https://github.com/pnpm/pnpm.git
synced 2026-06-10 09:24:50 -04:00
- Fixes [#11519](https://github.com/pnpm/pnpm/issues/11519): `pnpm pack` in pnpm 11 silently dropped every package listed in `bundleDependencies` / `bundledDependencies`, producing tarballs that no longer contained the bundled `node_modules/<dep>` files that v10 produced. - Root cause: the npm-packlist v10 upgrade ([#10658](https://github.com/pnpm/pnpm/pull/10658)) changed its API to require the caller to pre-populate the dependency tree's `edgesOut` Map. The wrapper in `fs/packlist` passed an empty Map, so npm-packlist's `gatherBundles()` looked up each declared name, found nothing, and skipped them all. - Fix: `fs/packlist` now reads each bundled dep's `package.json` (walking up parent `node_modules` to support hoisted layouts), recursively populates `edgesOut` for transitive deps of bundled packages, and normalizes `bundleDependencies: true` to an explicit array (npm-packlist iterates the field directly).
@pnpm/fs.packlist
Get a list of the files to add from a directory into an npm package
Installation
pnpm add @pnpm/fs.packlist
Usage
const { packlist } = require('@pnpm/fs.packlist')
const files = packlist('/package-dir')
License
MIT © Zoltan Kochan