Skip to content

Commit 5f54075

Browse files
committed
Release vmain
1 parent 965605b commit 5f54075

6 files changed

Lines changed: 969 additions & 1 deletion

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Bug report
2+
description: Report a problem with Honeydiff
3+
labels: ["bug"]
4+
body:
5+
- type: textarea
6+
id: summary
7+
attributes:
8+
label: Summary
9+
description: What happened?
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: repro
14+
attributes:
15+
label: Reproduction steps
16+
description: Steps to reproduce the issue.
17+
placeholder: |
18+
1.
19+
2.
20+
3.
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: expected
25+
attributes:
26+
label: Expected behavior
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: actual
31+
attributes:
32+
label: Actual behavior
33+
validations:
34+
required: true
35+
- type: input
36+
id: version
37+
attributes:
38+
label: Package version
39+
placeholder: e.g. 0.7.1
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: logs
44+
attributes:
45+
label: Logs or screenshots
46+
description: Add any relevant logs or screenshots.
47+
render: shell
48+
validations:
49+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Feature request
2+
description: Suggest an improvement for Honeydiff
3+
labels: ["enhancement"]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: Problem statement
9+
description: What problem are you trying to solve?
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: proposal
14+
attributes:
15+
label: Proposed solution
16+
description: What would you like to see added or changed?
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: alternatives
21+
attributes:
22+
label: Alternatives considered
23+
description: Other approaches you considered.
24+
validations:
25+
required: false
26+
- type: textarea
27+
id: impact
28+
attributes:
29+
label: Impact
30+
description: Who benefits and how?
31+
validations:
32+
required: false

CHANGELOG.md

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.8.1] - 2026-01-09
9+
10+
## What's Changed
11+
12+
### Changed
13+
- **Performance**: SSIM calculation is now 5x faster using integral images and parallel processing (#21)
14+
- Full HD (1920×1080) images: 239ms → 51ms (4.7× speedup)
15+
- 640×480 images: 35ms → 8.3ms (4.2× speedup)
16+
- **Performance**: Skip SSIM calculation for identical images, saving ~250M operations per comparison (#20)
17+
- When images have no differences (or only anti-aliasing artifacts), SSIM returns 1.0 immediately
18+
- Particularly beneficial for visual regression test suites where most screenshots match their baselines
19+
20+
### Fixed
21+
- Clean up duplicate entries in package.json files list
22+
23+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.8.0...v0.8.1
24+
25+
## [0.8.0] - 2026-01-03
26+
27+
## What's Changed
28+
29+
### Added
30+
- **Custom diff mask colors**: New `diffMaskColor` option allows customizing the highlight color in generated mask images. Supports both hex strings (`"ff0000"`, `"#ff0000"`, with optional alpha `"ff0000ff"`) and RGBA arrays (`[255, 0, 0]` or `[255, 0, 0, 255]`). This brings feature parity with the CLI's `--diff-color` flag.
31+
32+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.7.1...v0.8.0
33+
34+
## [0.7.1] - 2025-12-11
35+
36+
## What's Changed
37+
38+
### Fixed
39+
- Add missing JavaScript exports for image metadata functions (`getImageMetadata`, `getImageMetadataSync`, `getImageMetadataFromFile`, `getImageMetadataFromFileSync`) that were added in v0.7.0 but not properly exported
40+
41+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.7.0...v0.7.1
42+
43+
## [0.7.0] - 2025-12-11
44+
45+
## What's Changed
46+
47+
### Added
48+
- **Image Metadata API** - New functions to extract image dimensions, file size, and format without performing comparison
49+
- `getImageMetadata(buffer)` / `getImageMetadataSync(buffer)` - Extract metadata from Buffer
50+
- `getImageMetadataFromFile(path)` / `getImageMetadataFromFileSync(path)` - Extract metadata from file path
51+
- Returns `ImageMetadata` with `width`, `height`, `fileSizeBytes`, and `format` properties
52+
- Useful for storage tracking and billing purposes without needing to scan cloud storage buckets
53+
54+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.6.0...v0.7.0
55+
56+
## [0.6.0] - 2025-12-10
57+
58+
## What's Changed
59+
60+
### Added
61+
- **Noise filtering with `minClusterSize` option** - New option to filter out single-pixel rendering variance while catching real visual changes. Defaults to `2` (filters isolated pixels), can be set to `1` for exact matching or `3+` for more permissive detection. Clustering is automatically enabled when `minClusterSize > 1`.
62+
63+
### Changed
64+
- **`isDifferent` now respects noise filtering** - When `minClusterSize` is set, small clusters below the threshold are filtered out, meaning `isDifferent` may be `false` even when `diffPixels > 0` (those pixels were classified as noise)
65+
- **`diffPixels` reports raw count** - The raw pixel count is now unaffected by `minClusterSize` filtering, showing all differing pixels including those filtered as noise
66+
- **Documentation improvements** - Added comprehensive documentation for the `minClusterSize` option in TypeScript types and README, including a behavior table and usage examples
67+
68+
### Fixed
69+
- Height differences now always count regardless of clustering (structural changes are never filtered as noise)
70+
71+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.5.0...v0.6.0
72+
73+
## [0.5.0] - 2025-12-04
74+
75+
## What's Changed
76+
77+
### Changed
78+
79+
**⚠️ BREAKING CHANGE: Switched from YIQ to CIEDE2000 for perceptual color comparison**
80+
81+
The image comparison algorithm has been upgraded to use the industry-standard CIEDE2000 (Delta E) metric, providing superior perceptual accuracy compared to the previous YIQ approach.
82+
83+
**API Changes:**
84+
- **Removed:** `colorThreshold` option (0.0-1.0 scale)
85+
- **Removed:** `pixelTolerance` option (0-255 scale)
86+
- **Removed:** `ignoreColors` option
87+
- **Added:** `threshold` option using CIEDE2000 Delta E units with intuitive perceptual scale:
88+
- `0.0` = Exact pixel matching (strictest)
89+
- `1.0` = Just Noticeable Difference (JND) - barely perceptible to trained observers
90+
- `2.0` = **Recommended default** - ignores sub-pixel rendering variance, catches real differences
91+
- `3.0+` = Permissive - high tolerance for rendering variations
92+
93+
**Migration Guide:**
94+
```typescript
95+
// Before (v0.4.x)
96+
const result = await compare('baseline.png', 'current.png', {
97+
pixelTolerance: 10, // ❌ Removed
98+
colorThreshold: 0.1, // ❌ Removed
99+
ignoreColors: false // ❌ Removed
100+
});
101+
102+
// After (v0.5.0)
103+
const result = await compare('baseline.png', 'current.png', {
104+
threshold: 2.0 // ✅ CIEDE2000 Delta E units (new default)
105+
});
106+
```
107+
108+
**Benefits:**
109+
- More accurate perceptual color difference detection
110+
- Aligns with CIE standards used in color science
111+
- Better handling of subtle color variations
112+
- Improved anti-aliasing detection accuracy
113+
114+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.4.3...v0.5.0
115+
116+
## [0.4.3] - 2025-12-01
117+
118+
## What's Changed
119+
120+
### Fixed
121+
- Fixed ESM module loading error by renaming platform loader to `.cjs` extension. The package uses `"type": "module"` in package.json, which caused Node.js to incorrectly treat the CommonJS platform loader as ESM, resulting in import errors. The loader now uses the correct `.cjs` extension.
122+
123+
### Changed
124+
- Updated Windows build infrastructure to use Blacksmith runners for improved performance
125+
126+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.4.2...v0.4.3
127+
128+
## [0.4.2] - 2025-12-01
129+
130+
## What's Changed
131+
132+
### Fixed
133+
- **ESM exports now work correctly in published package** - Fixed critical bug where ESM imports were broken in consuming projects (e.g., `import { compare } from '@vizzly-testing/honeydiff'` threw `SyntaxError: The requested module does not provide an export named 'compare'`). The package loader now auto-detects whether to use platform-specific binaries (published package) or the local development build. (#14)
134+
135+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.4.1...v0.4.2
136+
137+
## [0.4.1] - 2025-11-30
138+
139+
## What's Changed
140+
141+
### Changed
142+
- CHANGELOG.md is now included in the npm package, providing version history for offline reference
143+
144+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.4.0...v0.4.1
145+
146+
## [0.4.0] - 2025-11-30
147+
148+
### Breaking Changes
149+
- **ESM-only package**: Switched from CommonJS (`module.exports`) to native ES modules (`export`). If you're using CommonJS, you'll need to use dynamic `import()` or update your project to ESM.
150+
151+
### Added
152+
- Color blindness simulation API for accessibility testing:
153+
- `simulateColorBlindness` / `simulateColorBlindnessSync` - Simulate how images appear to users with color vision deficiencies
154+
- `saveColorBlindnessSimulation` / `saveColorBlindnessSimulationSync` - Save simulated images to disk
155+
- `saveAllColorBlindnessSimulations` / `saveAllColorBlindnessSimulationsSync` - Generate all CVD type simulations at once
156+
- `analyzeWcagForCvd` / `analyzeWcagForCvdSync` - Analyze WCAG contrast for a specific color blindness type
157+
- `analyzeWcagAllCvd` / `analyzeWcagAllCvdSync` - Analyze WCAG contrast across all color blindness types
158+
- `getColorBlindnessTypes` - Get list of supported color blindness types (protanopia, deuteranopia, tritanopia, achromatopsia)
159+
160+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.3.1...v0.4.0
161+
162+
## [0.3.1] - 2025-11-15
163+
164+
### Fixed
165+
- Fixed release workflow to properly export WCAG functions (`analyzeWcagContrast`, `analyzeWcagContrastSync`, `saveWcagOverlay`, `saveWcagOverlaySync`)
166+
167+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.3.0...v0.3.1
168+
169+
## [0.3.0] - 2025-11-15
170+
171+
### Added
172+
- WCAG accessibility testing API for analyzing color contrast compliance
173+
- `analyzeWcagContrast` / `analyzeWcagContrastSync` - Analyze images for WCAG color contrast violations
174+
- `saveWcagOverlay` / `saveWcagOverlaySync` - Generate visual overlays highlighting contrast issues
175+
176+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.2.1...v0.3.0
177+
178+
## [0.2.1] - 2025-11-11
179+
180+
### Changed
181+
- Improved README documentation for better user experience
182+
183+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.2.0...v0.2.1
184+
185+
## [0.2.0] - 2025-11-10
186+
187+
### Added
188+
- Node.js bindings for accessibility features (ignore colors mode, anti-aliasing detection settings)
189+
- Comprehensive accessibility features for visual regression testing
190+
191+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.1.1...v0.2.0
192+
193+
## [0.1.1] - 2025-10-25
194+
195+
### Added
196+
- `getDimensions` / `getDimensionsSync` API to retrieve image dimensions without loading full image into memory
197+
198+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.1.0...v0.1.1
199+
200+
## [0.1.0] - 2025-10-21
201+
202+
### Added
203+
- Initial release of `@vizzly-testing/honeydiff` Node.js bindings
204+
- Native Rust bindings via Neon for high-performance image diffing
205+
- `compare` / `compareSync` - Full image comparison with all options
206+
- `quickCompare` / `quickCompareSync` - Fast comparison returning only diff count and match status
207+
- Support for macOS ARM64, Linux x64/ARM64, and Windows x64
208+
- Async and sync variants of all APIs
209+
- TypeScript definitions included
210+
- 1.1B pixels/sec throughput for Full HD images
211+
212+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/releases/tag/v0.1.0

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Robert DeLuca
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)