OverviewFilesCommitsIssuesDocsReleasesPeers

wirecore commits / 2fca56e

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

Changed files (1) +3 -0

pear-app/prune-prebuilds.js +3 -0
……@@ -45,6 +45,9 @@ function pruneDirectory(dir, depth = 0) {
4545 } else if (entry.name === 'node_modules') {
4646 // Recurse into nested node_modules
4747 pruneDirectory(fullPath, depth + 1)
48 } else if (entry.name.startsWith('@')) {
49 // Scoped package namespace - recurse into it
50 pruneDirectory(fullPath, depth)
4851 } else {
4952 // Check every directory for prebuilds and nested node_modules
5053 const prebuildsPath = path.join(fullPath, 'prebuilds')