This guide summarizes the changes developers should expect when upgrading Condense between releases. For a complete history of changes, see CHANGELOG.md.
Before planning a migration, use the latest supported release. According to SECURITY.md, the recommended target for upgrades is the latest stable release, currently 1.0.1. View SECURITY.md for more info.
- 100% Backward-Compatible SDK: All existing function signatures (
optimizeImage,optimizeText,optimizeMediaStream,optimizeEsbuild,optimizeWasm,condenseApp) continue to work seamlessly. - New Fluent Pipeline API: You can now chain optimization steps with
createPipeline(). - Perceptual Compression (
optimizePerceptualImage): You can now target specific SSIM quality levels (e.g.ssim: 0.95). - New Binary Processors: Added native in-memory optimizers for ZIP archives (
optimizeZip), SVG Spritesheets (packSvgSprites), Fonts (optimizeFont), and PDFs (optimizePdf). - Multi-Threaded Worker Pool: Use
WorkerPoolorgetWorkerPool()for CPU-intensive background batch processing across worker threads.
// Before (v0.3.x):
const { optimizeImage } = require('@studioframes/condense');
const { buffer } = await optimizeImage(rawImage, 'image/jpeg', 'balanced');
// In v1.0.0 (Fluent Pipeline with Presets):
const { createPipeline } = require('@studioframes/condense');
const resultBuffer = await createPipeline(rawImage, 'image/jpeg')
.preset('web-hero')
.toBuffer();const { optimizePerceptualImage } = require('@studioframes/condense');
const { buffer, ssim, finalQuality } = await optimizePerceptualImage(rawImage, 'image/jpeg', {
targetSsim: 0.95,
format: 'webp',
});
console.log(`Optimized to WebP at quality ${finalQuality} with SSIM ${ssim}`);- The CLI is now centered around the
optimizesubcommand. - Use
--method(or-m) to choosequality,balanced, orextreme. - Use
-oto specify an output directory.
Example:
npx @studioframes/condense optimize ./src -o ./dist -m balanced- Added support for
.ts,.jsx,.tsx,.xml,.yaml,.yml,.graphql,.gql,.less, and.scss. - Added a new
balancedoptimization mode betweenqualityandextreme. - Added optional LRU caching, enabled with
CONDENSE_CACHE=true.
- Markdown (
.md) minification is no longer supported. - Existing ignore directives remain supported:
- HTML:
data-condense-ignore - Code:
/* condense-ignore */
- HTML:
- Existing integrations should continue to work without code changes.
- New optional query parameters are available for image resizing and media handling, including
width,height,fit,thumbnail, andfaststart. - Added support for AVIF, SVG, GIF, and enhanced media processing.
- The media pipeline now uses the FFmpeg CLI directly instead of the previous wrapper dependency.
- Upgrade the package to the latest version.
- Re-test your core workflows with representative assets.
- Verify any CLI commands and output paths.
- Check whether your assets use unsupported formats or directives.
- If you rely on caching, enable it explicitly with
CONDENSE_CACHE=true.
- Review CHANGELOG.md for the full release history.
- Consult the docs under docs/ for usage, CLI, and API examples.