Repository navigation
v3.0.0 - Major Release
·
26 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
🚨 BREAKING CHANGES
Remove deprecated v2.0 backward compatibility API (#32)
The old v2.0 signature that accepted prefix as a string and overrides as separate parameters has been removed. Only the options-based API introduced in v2.1 is now supported.
// ❌ v2.x - REMOVED
AutoEnvParse.parse(config, 'DB');
AutoEnvParse.parse(config, 'DB', overrides);
// ✅ v3.0 - Use this
AutoEnvParse.parse(config, { prefix: 'DB' });
AutoEnvParse.parse(config, { prefix: 'DB', overrides });📖 Migration Guide
Simple prefix usage:
// Before (v2.x)
const config = AutoEnvParse.parse(myConfig, 'DB');
// After (v3.0)
const config = AutoEnvParse.parse(myConfig, { prefix: 'DB' });With overrides:
// Before (v2.x)
const config = AutoEnvParse.parse(myConfig, 'DB', overrides);
// After (v3.0)
const config = AutoEnvParse.parse(myConfig, { prefix: 'DB', overrides });No prefix (default):
// Before (v2.x)
const config = AutoEnvParse.parse(myConfig);
// After (v3.0) - no change needed!
const config = AutoEnvParse.parse(myConfig);🔧 Automated Migration
Use find/replace with regex:
- Find:
\.parse\(([^,]+),\s*'([^']+)'\) - Replace:
.parse($1, { prefix: '$2' })
❌ Removed
- v2.0 API signature -
parse(target, prefix, overrides)removed in favor ofparse(target, options) - Conditional logic - Simplified implementation by removing string vs options detection
📝 Changed
- API Documentation - Updated all examples to use options-based API
- README - Streamlined from 587 to 428 lines, use AEP alias throughout, add TOC
- All tests - Updated 165 tests across 9 test files to use new API
✨ Benefits
- ✅ Cleaner API - Single consistent interface
- ✅ Better extensibility - Easy to add new options without changing signature
- ✅ Less confusion - One clear way to call the function
- ✅ Reduced bundle size - Simpler implementation (~40 lines removed)
- ✅ Future-proof - New features can be added via options object
Full Changelog: v2.1.1...v3.0.0