Starting with version 5.2.0, all notable changes to Image Guard are documented in this file, which is (mostly) AI-generated and (always) human-edited. Dependency updates may or may not be called out specifically.
The format is based on Keep a Changelog, and the project adheres to Semantic Versioning.
- Added recommended ESLint rules to config (and fixed resulting warnings)
- Promoted
no-unused-varsandeqeqeqfrom warnings to errors in ESLint config
- Changed bin entry from a Node.js script to a shell wrapper that locates node from common version managers (nvm, Volta, asdf, mise) and package managers (Homebrew) before invocation, resolving hook failures in GUI Git clients that don’t inherit the shell’s PATH
- Migration: If you set up hooks, replace
npx image-guard --stagedwith./node_modules/.bin/image-guard --stagedin your.githooks/pre-commitor.husky/pre-commit.
- Migration: If you set up hooks, replace
- Improved corrupt-file error detection to cover WebP and AVIF formats, normalize message casing before matching, and avoid false positives from the overly broad
Invalidstring match - Warned when a
.bakfile is left behind after a failed file replacement - Removed a dead code branch in result processing
- Moved to compression and conversion running in parallel (non-overlapping file sets), reducing wall-clock time when
--heic-to-avifis active - Reduced directory traversals from two to one in non-staged mode when
--heic-to-avifis active - Extracted shared
MAX_FILE_SIZEconstant; alignednode:fsandnode:pathimport style inutils.js - Extended test coverage for corrupt file detection and reporting
- Updated HEIC dry run to report actual file sizes instead of omitting size data
- Adjusted HEIC-to-AVIF conversion to use lossy instead of lossless encoding (quality 80), to produce files smaller than the HEIC originals but still at high quality
- Removed redundant lossless compression pass after HEIC conversion
- Documented Display P3 to sRGB color space mapping during HEIC conversion
- Added opt-in HEIC/HEIF-to-AVIF conversion via
--heic-to-avif(with--keep-heicto preserve originals) - Introduced changelog