v8.0.0 - Complete Refactor & Modernization
🎉 package-build-stats v8.0.0
Major Release - New Features & Improvements
🚨 Breaking Changes
Node.js Version Requirement
- Minimum Node.js version is now 20.0.0+ (was 16.x)
- Minimum npm version is now 10.0.0+
If you're on an older Node.js version, please upgrade before using v8.0.0.
✨ New Features
1. Command-Line Interface
New CLI for analyzing packages directly from the command line:
npm install -g package-build-stats
# Analyze a package
package-stats lodash
# Get detailed comparison
package-stats compare lodash react
# Test top packages
package-stats top 202. New Package Manager Support
Bun (NEW!)
- 13x faster installation for package analysis
- Use with:
packageManager: 'bun'
pnpm (NEW!)
- Efficient disk space usage
- Use with:
packageManager: 'pnpm'
Both are now fully supported alongside npm and yarn.
3. Enhanced Comparison Tools
Compare published vs local builds:
const { comparePackages } = require('package-build-stats');
const result = await comparePackages('react', {
minification: true, // Compare with minification
exportAnalysis: true, // Analyze export sizes
cache: true // Use master cache
});🔧 Improvements
Performance
- Faster builds - Rspack bundler (from Webpack)
- Faster tests - Vitest (from Jest)
- Smaller package - 20-30MB reduction in dependencies
- Better caching - Master cache for repeated tests
Developer Experience
- Better debug mode for dependency exploration
- Improved error messages
- More accurate export size calculations
Type Safety
- Full TypeScript support
- Better IDE integration
- Complete type definitions
📚 Usage Examples
Basic Usage (unchanged)
const { getPackageStats } = require('package-build-stats');
const stats = await getPackageStats('lodash');
console.log(stats.size, stats.gzip);With New Package Managers
// Use Bun (fastest)
const stats = await getPackageStats('react', {
packageManager: 'bun'
});
// Use pnpm
const stats = await getPackageStats('react', {
packageManager: 'pnpm'
});CLI Usage
# List popular packages
package-stats list
# Test specific packages
package-stats test lodash react axios
# Test top 50 packages
package-stats top 50
# Advanced comparison
package-stats compare lodash --minification📦 What Changed?
- Node.js 20+ is now required
- Webpack replaced with Rspack (internal, no API changes)
- Jest replaced with Vitest (internal, no API changes)
- 22 unused dependencies removed
- Comparison tools completely rewritten (public API simplified)
🔄 Upgrading from v7
-
Update Node.js to 20+
node --version # Must be >= 20.0.0 -
Update the package
npm install package-build-stats@8.0.0
-
That's it! Your existing code will continue to work with the new features available.
🆘 Need Help?
Install now:
npm install package-build-stats@8.0.0Enjoy! 🚀