Skip to content

feat: forward globalIgnoreFile option to npm-packlist#487

Open
ljharb wants to merge 1 commit into
npm:mainfrom
ljharb:feat/global-ignore-file
Open

feat: forward globalIgnoreFile option to npm-packlist#487
ljharb wants to merge 1 commit into
npm:mainfrom
ljharb:feat/global-ignore-file

Conversation

@ljharb
Copy link
Copy Markdown

@ljharb ljharb commented May 13, 2026

DirFetcher is the entry point for packing a directory spec and calls npm-packlist directly. Pull globalIgnoreFile off the opts and pass it through to packlist so a user level ignore file (configured by callers such as the npm cli) actually reaches the walker that decides which files end up in the tarball.

Includes a test that mocks npm-packlist to confirm the option is forwarded, and a complementary test confirming that omitting the option passes undefined through. The behavior on the packlist side lands in a separate npm-packlist release; this commit only adds the plumbing on the pacote side.

Required for npm/cli#9351

`DirFetcher` is the entry point for packing a directory spec and calls `npm-packlist` directly.
Pull `globalIgnoreFile` off the opts and pass it through to packlist so a user level ignore file (configured by callers such as the npm cli) actually reaches the walker that decides which files end up in the tarball.

Includes a test that mocks `npm-packlist` to confirm the option is forwarded, and a complementary test confirming that omitting the option passes `undefined` through.
The behavior on the packlist side lands in a separate npm-packlist release; this commit only adds the plumbing on the pacote side.
@ljharb ljharb requested a review from a team as a code owner May 13, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant