@vizzly-testing/honeydiff 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +13 -0
- package/index.d.ts +12 -0
- package/index.js +4 -1
- package/package.json +1 -1
- package/platforms/index-aarch64-apple-darwin.node +0 -0
- package/platforms/index-aarch64-unknown-linux-gnu.node +0 -0
- package/platforms/index-x86_64-pc-windows-msvc.node +0 -0
- package/platforms/index-x86_64-unknown-linux-gnu.node +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.13.0] - 2026-07-23
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Exposed `effectiveDiffPixels`, `effectiveMaskComplete`,
|
|
14
|
+
`maskSemanticsVersion`, and the installed package `version` for auditable
|
|
15
|
+
mask consumers.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- Kept binary mask alpha opaque even when a transparent display diff color is
|
|
19
|
+
requested.
|
|
20
|
+
- Kept requested pixel and cluster diagnostics from changing the effective mask
|
|
21
|
+
or variable-height classification.
|
|
22
|
+
|
|
23
|
+
**Full Changelog**: https://github.com/vizzly-testing/honeydiff/compare/v0.12.0...v0.13.0
|
|
24
|
+
|
|
10
25
|
## [0.12.0] - 2026-07-19
|
|
11
26
|
|
|
12
27
|
### Fixed
|
package/README.md
CHANGED
|
@@ -187,6 +187,9 @@ interface DiffResult {
|
|
|
187
187
|
diffPercentage: number;
|
|
188
188
|
totalPixels: number;
|
|
189
189
|
diffPixels: number;
|
|
190
|
+
effectiveDiffPixels: number;
|
|
191
|
+
effectiveMaskComplete: boolean;
|
|
192
|
+
maskSemanticsVersion: string;
|
|
190
193
|
aaPixelsIgnored: number;
|
|
191
194
|
aaPercentage: number;
|
|
192
195
|
boundingBox: BoundingBox | null;
|
|
@@ -199,6 +202,16 @@ interface DiffResult {
|
|
|
199
202
|
}
|
|
200
203
|
```
|
|
201
204
|
|
|
205
|
+
`diffPixels` is the raw post-threshold/anti-aliasing count.
|
|
206
|
+
`effectiveDiffPixels` is the retained count represented by the binary mask after
|
|
207
|
+
`minClusterSize` filtering. It always matches the mask's nontransparent pixel
|
|
208
|
+
count. If `effectiveMaskComplete` is `false`, `maxDiffs` stopped the scan early;
|
|
209
|
+
the partial mask is useful for diagnostics but not complete spatial proof.
|
|
210
|
+
Requesting `diffPixelsList` or `diffClusters` never changes that retained result.
|
|
211
|
+
|
|
212
|
+
The package also exports `version` from its installed manifest and
|
|
213
|
+
`maskSemanticsVersion` from the native comparison engine.
|
|
214
|
+
|
|
202
215
|
See [index.d.ts](./index.d.ts) for the full API surface.
|
|
203
216
|
|
|
204
217
|
## Thresholds
|
package/index.d.ts
CHANGED
|
@@ -75,6 +75,12 @@ export interface DiffResult {
|
|
|
75
75
|
* Note: This may be > 0 even when isDifferent is false if small clusters were filtered as noise
|
|
76
76
|
*/
|
|
77
77
|
diffPixels: number;
|
|
78
|
+
/** Number of retained pixels represented by the effective diff mask */
|
|
79
|
+
effectiveDiffPixels: number;
|
|
80
|
+
/** False when maxDiffs stopped the scan before the full image was evaluated */
|
|
81
|
+
effectiveMaskComplete: boolean;
|
|
82
|
+
/** Version of the pixel-retention semantics used by the effective mask */
|
|
83
|
+
maskSemanticsVersion: string;
|
|
78
84
|
/** Number of pixels ignored due to anti-aliasing detection */
|
|
79
85
|
aaPixelsIgnored: number;
|
|
80
86
|
/** Percentage of pixels ignored as anti-aliasing (0.0 - 100.0) */
|
|
@@ -99,6 +105,12 @@ export interface DiffResult {
|
|
|
99
105
|
gmsdScore: number | null;
|
|
100
106
|
}
|
|
101
107
|
|
|
108
|
+
/** Installed @vizzly-testing/honeydiff package version */
|
|
109
|
+
export const version: string;
|
|
110
|
+
|
|
111
|
+
/** Native effective-mask semantics implemented by this package */
|
|
112
|
+
export const maskSemanticsVersion: string;
|
|
113
|
+
|
|
102
114
|
// ============================================================================
|
|
103
115
|
// Options
|
|
104
116
|
// ============================================================================
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @vizzly-testing/honeydiff - Native Node.js bindings for Honeydiff
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { existsSync } from 'node:fs';
|
|
5
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
6
6
|
import { createRequire } from 'node:module';
|
|
7
7
|
import { dirname, join } from 'node:path';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
@@ -11,6 +11,7 @@ const require = createRequire(import.meta.url);
|
|
|
11
11
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
12
|
|
|
13
13
|
let addon;
|
|
14
|
+
let packageMetadata = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'));
|
|
14
15
|
|
|
15
16
|
// Try to load the native addon:
|
|
16
17
|
// 1. First try load-platform.cjs (exists in published npm package with multi-platform binaries)
|
|
@@ -41,6 +42,8 @@ export const compareSync = addon.compareSync;
|
|
|
41
42
|
export const quickCompareSync = addon.quickCompareSync;
|
|
42
43
|
export const getDimensions = addon.getDimensions;
|
|
43
44
|
export const getDimensionsSync = addon.getDimensionsSync;
|
|
45
|
+
export const maskSemanticsVersion = addon.maskSemanticsVersion;
|
|
46
|
+
export const version = packageMetadata.version;
|
|
44
47
|
|
|
45
48
|
// Image Metadata API
|
|
46
49
|
export const getImageMetadata = addon.getImageMetadata;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|