Releases: 1mb-dev/imguri
Releases · 1mb-dev/imguri
v1.0.0 - Modern ES Modules Release
imguri v1.0.0
Modern ES modules library for converting local and remote images to data URIs.
🎉 What's New
Complete rewrite with modern JavaScript:
- ES modules with dual CJS/ESM support
- Promise-based API (async/await)
- Native fetch (Node.js 18+)
- Concurrent processing with configurable limits
- Path security with traversal protection
- Zero deprecated dependencies
📊 Quality Metrics
- ✅ 54 tests with 89% coverage
- ✅ Zero security vulnerabilities
- ✅ Bundle size: ESM 6.2KB, CJS 7.4KB
- ✅ Single runtime dependency (mime-types)
- ✅ CI passing on Node 18.x, 20.x, 21.x
💥 Breaking Changes from v0.x
- Node.js 18+ required (for native fetch)
- Promise-based API - callbacks deprecated to
encodeLegacy() - Results format - Map instead of plain object
- Default size limit - 4KB → 128KB
📦 Installation
```bash
npm install imguri
```
🚀 Quick Start
```javascript
import { encodeSingle, encode } from 'imguri';
// Single file
const uri = await encodeSingle('logo.png');
// Batch processing
const results = await encode(['icon1.png', 'icon2.png'], {
concurrency: 5
});
```
📚 Documentation
🔄 Migration from v0.x
See migration guide for upgrade instructions.