@stencil/core 4.18.0 → 4.18.1
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/cli/index.cjs +106 -215
- package/cli/index.js +107 -217
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +1686 -2826
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +117 -227
- package/internal/app-data/index.cjs +1 -0
- package/internal/app-data/index.js +1 -0
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +53 -36
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/shadow-css.js +1 -2
- package/internal/hydrate/index.js +53 -36
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +52 -89
- package/internal/package.json +1 -1
- package/internal/stencil-public-compiler.d.ts +12 -1
- package/internal/stencil-public-runtime.d.ts +1 -0
- package/internal/testing/index.js +52 -35
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +378 -493
- package/mock-doc/index.d.ts +1 -1
- package/mock-doc/index.js +378 -493
- package/mock-doc/package.json +1 -1
- package/package.json +5 -6
- package/screenshot/index.js +43 -85
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +14 -27
- package/sys/node/glob.js +1 -1
- package/sys/node/index.js +42 -42
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +148 -268
- package/testing/jest/jest-27-and-under/jest-facade.d.ts +1 -1
- package/testing/jest/jest-28/jest-facade.d.ts +5 -5
- package/testing/jest/jest-29/jest-facade.d.ts +5 -5
- package/testing/package.json +1 -1
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./internal/stencil-core/index.cjs",
|
|
6
6
|
"module": "./internal/stencil-core/index.js",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"testing/"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build.rollup": "npm run tsc.scripts && npm run tsc.prod && npm run rollup.prod.ci",
|
|
27
26
|
"build": "npm run clean && npm run tsc.scripts && npm run tsc.prod && node scripts/build --prod --ci",
|
|
28
27
|
"build.watch": "npm run build -- --watch",
|
|
29
28
|
"build.updateSelectorEngine": "node scripts/build/updateSelectorEngine.js",
|
|
@@ -73,7 +72,7 @@
|
|
|
73
72
|
"@types/graceful-fs": "^4.1.5",
|
|
74
73
|
"@types/jest": "^27.0.3",
|
|
75
74
|
"@types/listr": "^0.14.4",
|
|
76
|
-
"@types/node": "^20.
|
|
75
|
+
"@types/node": "^20.12.11",
|
|
77
76
|
"@types/pixelmatch": "^5.2.4",
|
|
78
77
|
"@types/pngjs": "^6.0.1",
|
|
79
78
|
"@types/prompts": "^2.0.9",
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
"conventional-changelog-cli": "^4.0.0",
|
|
89
88
|
"cspell": "^8.0.0",
|
|
90
89
|
"dts-bundle-generator": "~9.5.0",
|
|
91
|
-
"esbuild": "^0.
|
|
90
|
+
"esbuild": "^0.21.0",
|
|
92
91
|
"esbuild-plugin-replace": "^1.4.0",
|
|
93
92
|
"eslint": "^8.23.1",
|
|
94
93
|
"eslint-config-prettier": "^9.0.0",
|
|
@@ -99,7 +98,7 @@
|
|
|
99
98
|
"execa": "8.0.1",
|
|
100
99
|
"exit": "^0.1.2",
|
|
101
100
|
"fs-extra": "^11.0.0",
|
|
102
|
-
"glob": "10.3.
|
|
101
|
+
"glob": "10.3.14",
|
|
103
102
|
"graceful-fs": "~4.2.6",
|
|
104
103
|
"jest": "^27.4.5",
|
|
105
104
|
"jest-cli": "^27.4.5",
|
|
@@ -150,7 +149,7 @@
|
|
|
150
149
|
],
|
|
151
150
|
"prettier": "@ionic/prettier-config",
|
|
152
151
|
"volta": {
|
|
153
|
-
"node": "
|
|
152
|
+
"node": "22.1.0",
|
|
154
153
|
"npm": "10.7.0"
|
|
155
154
|
}
|
|
156
155
|
}
|
package/screenshot/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Screenshot v4.18.
|
|
2
|
+
Stencil Screenshot v4.18.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __create = Object.create;
|
|
@@ -334,14 +334,10 @@ var ScreenshotConnector = class {
|
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
screenshotCache.items.sort((a, b) => {
|
|
337
|
-
if (a.ts > b.ts)
|
|
338
|
-
|
|
339
|
-
if (a.
|
|
340
|
-
|
|
341
|
-
if (a.mp > b.mp)
|
|
342
|
-
return -1;
|
|
343
|
-
if (a.mp < b.mp)
|
|
344
|
-
return 1;
|
|
337
|
+
if (a.ts > b.ts) return -1;
|
|
338
|
+
if (a.ts < b.ts) return 1;
|
|
339
|
+
if (a.mp > b.mp) return -1;
|
|
340
|
+
if (a.mp < b.mp) return 1;
|
|
345
341
|
return 0;
|
|
346
342
|
});
|
|
347
343
|
screenshotCache.items = screenshotCache.items.slice(0, 1e3);
|
|
@@ -382,78 +378,50 @@ var ScreenshotConnector = class {
|
|
|
382
378
|
sortScreenshots(screenshots) {
|
|
383
379
|
return screenshots.sort((a, b) => {
|
|
384
380
|
if (a.desc && b.desc) {
|
|
385
|
-
if (a.desc.toLowerCase() < b.desc.toLowerCase())
|
|
386
|
-
|
|
387
|
-
if (a.desc.toLowerCase() > b.desc.toLowerCase())
|
|
388
|
-
return 1;
|
|
381
|
+
if (a.desc.toLowerCase() < b.desc.toLowerCase()) return -1;
|
|
382
|
+
if (a.desc.toLowerCase() > b.desc.toLowerCase()) return 1;
|
|
389
383
|
}
|
|
390
384
|
if (a.device && b.device) {
|
|
391
|
-
if (a.device.toLowerCase() < b.device.toLowerCase())
|
|
392
|
-
|
|
393
|
-
if (a.device.toLowerCase() > b.device.toLowerCase())
|
|
394
|
-
return 1;
|
|
385
|
+
if (a.device.toLowerCase() < b.device.toLowerCase()) return -1;
|
|
386
|
+
if (a.device.toLowerCase() > b.device.toLowerCase()) return 1;
|
|
395
387
|
}
|
|
396
388
|
if (a.userAgent && b.userAgent) {
|
|
397
|
-
if (a.userAgent.toLowerCase() < b.userAgent.toLowerCase())
|
|
398
|
-
|
|
399
|
-
if (a.userAgent.toLowerCase() > b.userAgent.toLowerCase())
|
|
400
|
-
return 1;
|
|
389
|
+
if (a.userAgent.toLowerCase() < b.userAgent.toLowerCase()) return -1;
|
|
390
|
+
if (a.userAgent.toLowerCase() > b.userAgent.toLowerCase()) return 1;
|
|
401
391
|
}
|
|
402
|
-
if (a.width < b.width)
|
|
403
|
-
|
|
404
|
-
if (a.
|
|
405
|
-
|
|
406
|
-
if (a.
|
|
407
|
-
|
|
408
|
-
if (a.height > b.height)
|
|
409
|
-
return 1;
|
|
410
|
-
if (a.id < b.id)
|
|
411
|
-
return -1;
|
|
412
|
-
if (a.id > b.id)
|
|
413
|
-
return 1;
|
|
392
|
+
if (a.width < b.width) return -1;
|
|
393
|
+
if (a.width > b.width) return 1;
|
|
394
|
+
if (a.height < b.height) return -1;
|
|
395
|
+
if (a.height > b.height) return 1;
|
|
396
|
+
if (a.id < b.id) return -1;
|
|
397
|
+
if (a.id > b.id) return 1;
|
|
414
398
|
return 0;
|
|
415
399
|
});
|
|
416
400
|
}
|
|
417
401
|
sortCompares(compares) {
|
|
418
402
|
return compares.sort((a, b) => {
|
|
419
|
-
if (a.allowableMismatchedPixels > b.allowableMismatchedPixels)
|
|
420
|
-
|
|
421
|
-
if (a.
|
|
422
|
-
|
|
423
|
-
if (a.allowableMismatchedRatio > b.allowableMismatchedRatio)
|
|
424
|
-
return -1;
|
|
425
|
-
if (a.allowableMismatchedRatio < b.allowableMismatchedRatio)
|
|
426
|
-
return 1;
|
|
403
|
+
if (a.allowableMismatchedPixels > b.allowableMismatchedPixels) return -1;
|
|
404
|
+
if (a.allowableMismatchedPixels < b.allowableMismatchedPixels) return 1;
|
|
405
|
+
if (a.allowableMismatchedRatio > b.allowableMismatchedRatio) return -1;
|
|
406
|
+
if (a.allowableMismatchedRatio < b.allowableMismatchedRatio) return 1;
|
|
427
407
|
if (a.desc && b.desc) {
|
|
428
|
-
if (a.desc.toLowerCase() < b.desc.toLowerCase())
|
|
429
|
-
|
|
430
|
-
if (a.desc.toLowerCase() > b.desc.toLowerCase())
|
|
431
|
-
return 1;
|
|
408
|
+
if (a.desc.toLowerCase() < b.desc.toLowerCase()) return -1;
|
|
409
|
+
if (a.desc.toLowerCase() > b.desc.toLowerCase()) return 1;
|
|
432
410
|
}
|
|
433
411
|
if (a.device && b.device) {
|
|
434
|
-
if (a.device.toLowerCase() < b.device.toLowerCase())
|
|
435
|
-
|
|
436
|
-
if (a.device.toLowerCase() > b.device.toLowerCase())
|
|
437
|
-
return 1;
|
|
412
|
+
if (a.device.toLowerCase() < b.device.toLowerCase()) return -1;
|
|
413
|
+
if (a.device.toLowerCase() > b.device.toLowerCase()) return 1;
|
|
438
414
|
}
|
|
439
415
|
if (a.userAgent && b.userAgent) {
|
|
440
|
-
if (a.userAgent.toLowerCase() < b.userAgent.toLowerCase())
|
|
441
|
-
|
|
442
|
-
if (a.userAgent.toLowerCase() > b.userAgent.toLowerCase())
|
|
443
|
-
return 1;
|
|
416
|
+
if (a.userAgent.toLowerCase() < b.userAgent.toLowerCase()) return -1;
|
|
417
|
+
if (a.userAgent.toLowerCase() > b.userAgent.toLowerCase()) return 1;
|
|
444
418
|
}
|
|
445
|
-
if (a.width < b.width)
|
|
446
|
-
|
|
447
|
-
if (a.
|
|
448
|
-
|
|
449
|
-
if (a.
|
|
450
|
-
|
|
451
|
-
if (a.height > b.height)
|
|
452
|
-
return 1;
|
|
453
|
-
if (a.id < b.id)
|
|
454
|
-
return -1;
|
|
455
|
-
if (a.id > b.id)
|
|
456
|
-
return 1;
|
|
419
|
+
if (a.width < b.width) return -1;
|
|
420
|
+
if (a.width > b.width) return 1;
|
|
421
|
+
if (a.height < b.height) return -1;
|
|
422
|
+
if (a.height > b.height) return 1;
|
|
423
|
+
if (a.id < b.id) return -1;
|
|
424
|
+
if (a.id > b.id) return 1;
|
|
457
425
|
return 0;
|
|
458
426
|
});
|
|
459
427
|
}
|
|
@@ -489,18 +457,15 @@ var reducePathComponents = (components) => {
|
|
|
489
457
|
const reduced = [components[0]];
|
|
490
458
|
for (let i = 1; i < components.length; i++) {
|
|
491
459
|
const component = components[i];
|
|
492
|
-
if (!component)
|
|
493
|
-
|
|
494
|
-
if (component === ".")
|
|
495
|
-
continue;
|
|
460
|
+
if (!component) continue;
|
|
461
|
+
if (component === ".") continue;
|
|
496
462
|
if (component === "..") {
|
|
497
463
|
if (reduced.length > 1) {
|
|
498
464
|
if (reduced[reduced.length - 1] !== "..") {
|
|
499
465
|
reduced.pop();
|
|
500
466
|
continue;
|
|
501
467
|
}
|
|
502
|
-
} else if (reduced[0])
|
|
503
|
-
continue;
|
|
468
|
+
} else if (reduced[0]) continue;
|
|
504
469
|
}
|
|
505
470
|
reduced.push(component);
|
|
506
471
|
}
|
|
@@ -511,23 +476,18 @@ var getRootLength = (path2) => {
|
|
|
511
476
|
return rootLength < 0 ? ~rootLength : rootLength;
|
|
512
477
|
};
|
|
513
478
|
var getEncodedRootLength = (path2) => {
|
|
514
|
-
if (!path2)
|
|
515
|
-
return 0;
|
|
479
|
+
if (!path2) return 0;
|
|
516
480
|
const ch0 = path2.charCodeAt(0);
|
|
517
481
|
if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) {
|
|
518
|
-
if (path2.charCodeAt(1) !== ch0)
|
|
519
|
-
return 1;
|
|
482
|
+
if (path2.charCodeAt(1) !== ch0) return 1;
|
|
520
483
|
const p1 = path2.indexOf(ch0 === 47 /* slash */ ? "/" : altDirectorySeparator, 2);
|
|
521
|
-
if (p1 < 0)
|
|
522
|
-
return path2.length;
|
|
484
|
+
if (p1 < 0) return path2.length;
|
|
523
485
|
return p1 + 1;
|
|
524
486
|
}
|
|
525
487
|
if (isVolumeCharacter(ch0) && path2.charCodeAt(1) === 58 /* colon */) {
|
|
526
488
|
const ch2 = path2.charCodeAt(2);
|
|
527
|
-
if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */)
|
|
528
|
-
|
|
529
|
-
if (path2.length === 2)
|
|
530
|
-
return 2;
|
|
489
|
+
if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) return 3;
|
|
490
|
+
if (path2.length === 2) return 2;
|
|
531
491
|
}
|
|
532
492
|
const schemeEnd = path2.indexOf(urlSchemeSeparator);
|
|
533
493
|
if (schemeEnd !== -1) {
|
|
@@ -556,12 +516,10 @@ var getEncodedRootLength = (path2) => {
|
|
|
556
516
|
var isVolumeCharacter = (charCode) => charCode >= 97 /* a */ && charCode <= 122 /* z */ || charCode >= 65 /* A */ && charCode <= 90 /* Z */;
|
|
557
517
|
var getFileUrlVolumeSeparatorEnd = (url, start) => {
|
|
558
518
|
const ch0 = url.charCodeAt(start);
|
|
559
|
-
if (ch0 === 58 /* colon */)
|
|
560
|
-
return start + 1;
|
|
519
|
+
if (ch0 === 58 /* colon */) return start + 1;
|
|
561
520
|
if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) {
|
|
562
521
|
const ch2 = url.charCodeAt(start + 2);
|
|
563
|
-
if (ch2 === 97 /* a */ || ch2 === 65 /* A */)
|
|
564
|
-
return start + 3;
|
|
522
|
+
if (ch2 === 97 /* a */ || ch2 === 65 /* A */) return start + 3;
|
|
565
523
|
}
|
|
566
524
|
return -1;
|
|
567
525
|
};
|
package/screenshot/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Screenshot Pixel Match v4.18.
|
|
2
|
+
Stencil Screenshot Pixel Match v4.18.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __create = Object.create;
|
|
@@ -54,8 +54,7 @@ var require_pixelmatch = __commonJS({
|
|
|
54
54
|
throw new Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");
|
|
55
55
|
if (img1.length !== img2.length || output && output.length !== img1.length)
|
|
56
56
|
throw new Error("Image sizes do not match.");
|
|
57
|
-
if (img1.length !== width * height * 4)
|
|
58
|
-
throw new Error("Image data size does not match width/height.");
|
|
57
|
+
if (img1.length !== width * height * 4) throw new Error("Image data size does not match width/height.");
|
|
59
58
|
options = Object.assign({}, defaultOptions, options);
|
|
60
59
|
const len = width * height;
|
|
61
60
|
const a32 = new Uint32Array(img1.buffer, img1.byteOffset, len);
|
|
@@ -69,8 +68,7 @@ var require_pixelmatch = __commonJS({
|
|
|
69
68
|
}
|
|
70
69
|
if (identical) {
|
|
71
70
|
if (output && !options.diffMask) {
|
|
72
|
-
for (let i = 0; i < len; i++)
|
|
73
|
-
drawGrayPixel(img1, 4 * i, options.alpha, output);
|
|
71
|
+
for (let i = 0; i < len; i++) drawGrayPixel(img1, 4 * i, options.alpha, output);
|
|
74
72
|
}
|
|
75
73
|
return 0;
|
|
76
74
|
}
|
|
@@ -82,8 +80,7 @@ var require_pixelmatch = __commonJS({
|
|
|
82
80
|
const delta = colorDelta(img1, img2, pos, pos);
|
|
83
81
|
if (Math.abs(delta) > maxDelta) {
|
|
84
82
|
if (!options.includeAA && (antialiased(img1, x, y, width, height, img2) || antialiased(img2, x, y, width, height, img1))) {
|
|
85
|
-
if (output && !options.diffMask)
|
|
86
|
-
drawPixel(output, pos, ...options.aaColor);
|
|
83
|
+
if (output && !options.diffMask) drawPixel(output, pos, ...options.aaColor);
|
|
87
84
|
} else {
|
|
88
85
|
if (output) {
|
|
89
86
|
drawPixel(output, pos, ...delta < 0 && options.diffColorAlt || options.diffColor);
|
|
@@ -91,8 +88,7 @@ var require_pixelmatch = __commonJS({
|
|
|
91
88
|
diff++;
|
|
92
89
|
}
|
|
93
90
|
} else if (output) {
|
|
94
|
-
if (!options.diffMask)
|
|
95
|
-
drawGrayPixel(img1, pos, options.alpha, output);
|
|
91
|
+
if (!options.diffMask) drawGrayPixel(img1, pos, options.alpha, output);
|
|
96
92
|
}
|
|
97
93
|
}
|
|
98
94
|
}
|
|
@@ -113,13 +109,11 @@ var require_pixelmatch = __commonJS({
|
|
|
113
109
|
let minX, minY, maxX, maxY;
|
|
114
110
|
for (let x = x0; x <= x2; x++) {
|
|
115
111
|
for (let y = y0; y <= y2; y++) {
|
|
116
|
-
if (x === x1 && y === y1)
|
|
117
|
-
continue;
|
|
112
|
+
if (x === x1 && y === y1) continue;
|
|
118
113
|
const delta = colorDelta(img, img, pos, (y * width + x) * 4, true);
|
|
119
114
|
if (delta === 0) {
|
|
120
115
|
zeroes++;
|
|
121
|
-
if (zeroes > 2)
|
|
122
|
-
return false;
|
|
116
|
+
if (zeroes > 2) return false;
|
|
123
117
|
} else if (delta < min) {
|
|
124
118
|
min = delta;
|
|
125
119
|
minX = x;
|
|
@@ -131,8 +125,7 @@ var require_pixelmatch = __commonJS({
|
|
|
131
125
|
}
|
|
132
126
|
}
|
|
133
127
|
}
|
|
134
|
-
if (min === 0 || max === 0)
|
|
135
|
-
return false;
|
|
128
|
+
if (min === 0 || max === 0) return false;
|
|
136
129
|
return hasManySiblings(img, minX, minY, width, height) && hasManySiblings(img2, minX, minY, width, height) || hasManySiblings(img, maxX, maxY, width, height) && hasManySiblings(img2, maxX, maxY, width, height);
|
|
137
130
|
}
|
|
138
131
|
function hasManySiblings(img, x1, y1, width, height) {
|
|
@@ -144,13 +137,10 @@ var require_pixelmatch = __commonJS({
|
|
|
144
137
|
let zeroes = x1 === x0 || x1 === x2 || y1 === y0 || y1 === y2 ? 1 : 0;
|
|
145
138
|
for (let x = x0; x <= x2; x++) {
|
|
146
139
|
for (let y = y0; y <= y2; y++) {
|
|
147
|
-
if (x === x1 && y === y1)
|
|
148
|
-
continue;
|
|
140
|
+
if (x === x1 && y === y1) continue;
|
|
149
141
|
const pos2 = (y * width + x) * 4;
|
|
150
|
-
if (img[pos] === img[pos2] && img[pos + 1] === img[pos2 + 1] && img[pos + 2] === img[pos2 + 2] && img[pos + 3] === img[pos2 + 3])
|
|
151
|
-
|
|
152
|
-
if (zeroes > 2)
|
|
153
|
-
return true;
|
|
142
|
+
if (img[pos] === img[pos2] && img[pos + 1] === img[pos2 + 1] && img[pos + 2] === img[pos2 + 2] && img[pos + 3] === img[pos2 + 3]) zeroes++;
|
|
143
|
+
if (zeroes > 2) return true;
|
|
154
144
|
}
|
|
155
145
|
}
|
|
156
146
|
return false;
|
|
@@ -164,8 +154,7 @@ var require_pixelmatch = __commonJS({
|
|
|
164
154
|
let g2 = img2[m + 1];
|
|
165
155
|
let b2 = img2[m + 2];
|
|
166
156
|
let a2 = img2[m + 3];
|
|
167
|
-
if (a1 === a2 && r1 === r2 && g1 === g2 && b1 === b2)
|
|
168
|
-
return 0;
|
|
157
|
+
if (a1 === a2 && r1 === r2 && g1 === g2 && b1 === b2) return 0;
|
|
169
158
|
if (a1 < 255) {
|
|
170
159
|
a1 /= 255;
|
|
171
160
|
r1 = blend(r1, a1);
|
|
@@ -181,8 +170,7 @@ var require_pixelmatch = __commonJS({
|
|
|
181
170
|
const y1 = rgb2y(r1, g1, b1);
|
|
182
171
|
const y2 = rgb2y(r2, g2, b2);
|
|
183
172
|
const y = y1 - y2;
|
|
184
|
-
if (yOnly)
|
|
185
|
-
return y;
|
|
173
|
+
if (yOnly) return y;
|
|
186
174
|
const i = rgb2i(r1, g1, b1) - rgb2i(r2, g2, b2);
|
|
187
175
|
const q = rgb2q(r1, g1, b1) - rgb2q(r2, g2, b2);
|
|
188
176
|
const delta = 0.5053 * y * y + 0.299 * i * i + 0.1957 * q * q;
|
|
@@ -2313,8 +2301,7 @@ function getMismatchedPixels(pixelMatchInput) {
|
|
|
2313
2301
|
const imgB = import_fs.default.createReadStream(pixelMatchInput.imageBPath).pipe(new import_pngjs.PNG()).on("parsed", doneReading);
|
|
2314
2302
|
let filesRead = 0;
|
|
2315
2303
|
function doneReading() {
|
|
2316
|
-
if (++filesRead < 2)
|
|
2317
|
-
return;
|
|
2304
|
+
if (++filesRead < 2) return;
|
|
2318
2305
|
const mismatchedPixels = (0, import_pixelmatch.default)(imgA.data, imgB.data, null, pixelMatchInput.width, pixelMatchInput.height, {
|
|
2319
2306
|
threshold: pixelMatchInput.pixelmatchThreshold,
|
|
2320
2307
|
includeAA: false
|