Files
pnpm/fs/packlist
Zoltan Kochan dd8d5d7597 fix(pack): bundle dependencies declared in bundleDependencies (#11524)
- 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).
2026-05-09 01:50:09 +02:00
..
2026-04-10 18:30:33 +02:00

@pnpm/fs.packlist

Get a list of the files to add from a directory into an npm package

npm version

Installation

pnpm add @pnpm/fs.packlist

Usage

const { packlist } = require('@pnpm/fs.packlist')

const files = packlist('/package-dir')

License

MIT © Zoltan Kochan