You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npm pack includes gitignored examples/cloudflare/dist build artifacts #608
main at $(git rev-parse HEAD 2>/dev/null); found while merging #607.
Minimal reproduction
examples/cloudflare/dist/ is gitignored (.gitignore has dist/), and is written by npm run test:examples:built's Cloudflare build step (node dist/cli.js build --target cloudflare --project examples/cloudflare --out examples/cloudflare/dist). Because examples is listed wholesale in package.json's files, npm pack includes those gitignored files anyway:
$ npm run build && npm run test:examples:built && npm pack --dry-run --json | jq '.[0].files[] | select(.path | contains("cloudflare/dist"))'
reports 4 files, ~9.5 KB, that ship in the published tarball only when the local working tree happens to have run the Cloudflare example build first (e.g. in CI's checks job, which runs test:examples:built before test:package:built in the same checkout). A tree that hasn't built the example does not ship them, so the packed contents are nondeterministic depending on build order/history in the working directory.
Relevant output
Confirmed locally: npm run build && npm run test:package:built passes; running npm run test:examples:built first and re-running test:package:built fails the unpacked-size budget (scripts/package-audit.ts), which is how this was found — #607's own legitimate growth ate the remaining headroom.
Suggested fix
Exclude examples/*/dist (and similar per-example build output directories) from the packed files, e.g. an explicit exclude in package.json's files array, or have package-audit.ts assert no gitignored path appears in the pack listing. Separately, #607 raised the unpacked budget from 2450 KiB to 2550 KiB partly to cover this leak; once fixed, consider lowering it back.
Activity
fix(core): raise the packed unpacked-size budget for this PR's growth
fix(core): raise the packed unpacked-size budget past main's current …
fix(core): actionable authoring errors, strict request fixtures and J…
ci: raise the core package unpacked-size budget for the onboarding-do…
docs: onboarding docs sweep — concepts page, task-first index, split …
fix: exclude examples/*/dist build artifacts from npm pack (#608) (#631)