Fix prebuild pruning for scoped packages - final optimization to 53MB
Fixed bug where scoped packages (@hyperswarm/secret-stream) weren't being
recursively processed, leaving 12 platform prebuilds unpruned.
Changes:
- Add special handling for @-prefixed directories (scoped package namespaces)
- Recurse into scoped packages at same depth (they're namespace containers)
- Found and removed additional 14.7 MB from @hyperswarm/secret-stream
Results (complete optimization):
- Original package: 304 MB
- After first optimization: 60.9 MB (79.9% reduction)
- After complete optimization: 53 MB (82.6% reduction!)
- Download size verified: 53 MB
- Only 34 platform directories remaining (all linux-x64)
Technical details:
- Scoped packages like @hyperswarm are namespace directories
- They contain subdirectories like secret-stream which are actual packages
- Each may have nested node_modules with their own prebuilds
- Must recurse into @-prefixed dirs without incrementing depth
Staged as version 2797 to pear://zupx3qzpwj61hdt1bxanabctcyxqqu3arogctwim4qt3wfbzn4bo
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2fca56ec48a11c1c5392e9b313aec4a9843bbed2
by plankatron <fleeky@gmail.com> · 2026-01-20T21:31:13.000Z