Route every package file selector (pack/publish, git-fetcher, directory-fetcher, patch-commit, deploy, and the injected-copy writers) through `pnpm-fs-packlist` (`select_package_files`, `select_dir_package_files`, `packlist_dir`) and the shared internal symlink admission and placement helpers in `pnpm_fs::internal_symlink` (`admit_internal_symlink`, `resolve_symlink_placement`, `recreate_internal_symlink`, `SymlinkTargets`, `AdmittedSymlink`). Test `pnpm-fs-packlist` against `npm-packlist` and `@pnpm/fs.packlist` on a generated `proptest` corpus (`generated_trees_match_npm_packlist`), against `npm pack --dry-run --json` (`pack_matches_npm_pack_dry_run`, run nightly in `cargo-equivalence.yml`), and across all file-selection consumers (`every_file_selector_agrees_with_pack`). Keep deliberate divergences in `DELIBERATE_DIVERGENCES` with witness tests. Fix two bugs surfaced by the new tests: 1. Normalize string `bin` fields into an object in `@pnpm/fs.packlist` before passing the manifest to `npm-packlist`. 2. Canonicalize symlink sources in `import_indexed_dir` when falling back to importing an internal symlink to an unselected file as a regular file, so hardlink imports link the target file rather than the symlink inode. Closes https://github.com/pnpm/tasks/issues/223
230 B
230 B
@pnpm/fs.packlist, pnpm
| @pnpm/fs.packlist | pnpm |
|---|---|
| patch | patch |
pnpm pack and pnpm publish now always include the binary file declared by a string bin field in package.json, even when files or .npmignore would otherwise exclude it.