ReviewOS

pantry-pm/pantry

pantryignore glob patterns not excluding node_modules

#202
Open glennmichael123 opened this 24 days ago · 0 comments
24 days ago

Problem

The **/node_modules glob pattern in .pantryignore does not actually exclude node_modules/ from the tarball during pantry publish:commit. This causes tarballs to be 70-100MB+ instead of the expected 1-2MB, hitting the 50MB size limit.

Reproduction

.pantryignore:

**/node_modules
.git

Run:

pantry publish:commit '.'

Output:

Using .pantryignore for exclusions (420 bytes)
  + exclude: **/node_modules
  ...
Tarball: 73738788 bytes
Upload error: {"error":"Tarball for ts-watches exceeds maximum size of 50MB"}

The log shows pantry reads the .pantryignore and lists **/node_modules as an exclusion, but the resulting tarball is 73MB — which matches the full node_modules/ directory size (101MB minus other exclusions).

Expected behavior

**/node_modules should exclude:

  • ./node_modules/
  • ./packages/*/node_modules/
  • Any nested node_modules/ at any depth

Workaround

Currently we have to rm -rf node_modules before running pantry publish:commit in CI:

- name: Clean up before publish
  run: rm -rf node_modules packages/*/node_modules

- name: Publish Commit
  run: pantry publish:commit '.'

Affected repo

Likely root cause

The glob matching in the tarball creation code (packages/zig/src/cli/commands/install/core.zig or the publish command) may not be matching **/node_modules correctly against paths like node_modules/ (without a leading ./) or may require a trailing / to match directories.

Sign in to comment on this issue.