Skip to content

fix(build): deduplicate shared deps across external bundles#110

Merged
jdalton merged 2 commits intomainfrom
fix/deduplicate-external-bundles
Mar 26, 2026
Merged

fix(build): deduplicate shared deps across external bundles#110
jdalton merged 2 commits intomainfrom
fix/deduplicate-external-bundles

Conversation

@jdalton
Copy link
Copy Markdown
Collaborator

@jdalton jdalton commented Mar 26, 2026

Summary

  • Mark shared deps (signal-exit, supports-color, debug, which, spdx-correct, spdx-expression-parse, p-map) as external in npm-pack bundle so they resolve to existing standalone wrappers at runtime
  • Mark supports-color external in debug bundle, add p-map as standalone bundle and externalize from pico-pack
  • Update supports-color 10.0.0 → 10.2.2, add p-map 7.0.4 to devDependencies/overrides
  • Update picomatch 2.3.1/4.0.3 → 4.0.4, fix runWithTempDir optional prefix param
  • Enhance force-node-modules esbuild plugin to handle ESM-only packages
  • Net savings: ~88KB across bundles (npm-pack -86KB, debug -6KB, pico-pack -4KB, p-map +8KB new)

Test plan

  • pnpm build passes (145 files validated, 48 external modules verified)
  • pnpm test passes (6370 tests, 143 test files)
  • Runtime verification: all externalized deps resolve correctly from bundle wrappers
  • pnpm run check --all passes
  • pnpm run fix --all passes

🤖 Generated with Claude Code

jdalton added 2 commits March 26, 2026 10:50
Update picomatch dep from 2.3.1 to 4.0.4 and override from 4.0.3 to
4.0.4. Make runWithTempDir prefix parameter optional with default.
Mark signal-exit, supports-color, debug, which, spdx-correct,
spdx-expression-parse, and p-map as external in npm-pack bundle so
they resolve to existing standalone wrappers at runtime. Mark
supports-color external in debug bundle. Add p-map as standalone
bundle and externalize from pico-pack.

Update supports-color 10.0.0 → 10.2.2. Add p-map 7.0.4 to
devDependencies and pnpm overrides. Enhance force-node-modules
esbuild plugin to handle ESM-only packages.

Net savings: ~88KB across bundles (npm-pack -86KB, debug -6KB,
pico-pack -4KB, p-map +8KB new).
@jdalton jdalton merged commit 0d19a99 into main Mar 26, 2026
9 checks passed
@jdalton jdalton deleted the fix/deduplicate-external-bundles branch March 26, 2026 15:27
@jdalton jdalton mentioned this pull request Mar 26, 2026
3 tasks
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