@vizzly-testing/cli 0.16.1 → 0.16.2
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.
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { Buffer } from 'buffer';
|
|
2
2
|
import { writeFileSync, readFileSync, existsSync } from 'fs';
|
|
3
3
|
import { join, resolve } from 'path';
|
|
4
|
-
import
|
|
4
|
+
import { getDimensionsSync } from '@vizzly-testing/honeydiff';
|
|
5
5
|
import * as output from '../../utils/output.js';
|
|
6
6
|
import { TddService } from '../../services/tdd-service.js';
|
|
7
7
|
import { sanitizeScreenshotName, validateScreenshotProperties } from '../../utils/security.js';
|
|
8
8
|
import { detectImageInputType } from '../../utils/image-input-detector.js';
|
|
9
|
-
let {
|
|
10
|
-
getDimensionsSync
|
|
11
|
-
} = honeydiff;
|
|
12
9
|
|
|
13
10
|
/**
|
|
14
11
|
* Group comparisons by screenshot name with variant structure
|
|
@@ -142,9 +139,19 @@ export const createTddHandler = (config, workingDir, baselineBuild, baselineComp
|
|
|
142
139
|
// This ensures we update the correct variant even with same name
|
|
143
140
|
const existingIndex = reportData.comparisons.findIndex(c => c.id === newComparison.id);
|
|
144
141
|
if (existingIndex >= 0) {
|
|
145
|
-
|
|
142
|
+
// Preserve initialStatus from the original comparison
|
|
143
|
+
// This keeps sort order stable when status changes (e.g., after approval)
|
|
144
|
+
let initialStatus = reportData.comparisons[existingIndex].initialStatus;
|
|
145
|
+
reportData.comparisons[existingIndex] = {
|
|
146
|
+
...newComparison,
|
|
147
|
+
initialStatus: initialStatus || newComparison.status
|
|
148
|
+
};
|
|
146
149
|
} else {
|
|
147
|
-
|
|
150
|
+
// New comparison - set initialStatus to current status
|
|
151
|
+
reportData.comparisons.push({
|
|
152
|
+
...newComparison,
|
|
153
|
+
initialStatus: newComparison.status
|
|
154
|
+
});
|
|
148
155
|
}
|
|
149
156
|
|
|
150
157
|
// Generate grouped structure from flat comparisons
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizzly-testing/cli",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"description": "Visual review platform for UI developers and designers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"visual-testing",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"bugs": "https://github.com/vizzly-testing/cli/issues",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "https://github.com/vizzly-testing/cli.git"
|
|
19
|
+
"url": "git+https://github.com/vizzly-testing/cli.git"
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "Stubborn Mule Software <support@vizzly.dev>",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"main": "./dist/index.js",
|
|
47
47
|
"types": "./dist/types/index.d.ts",
|
|
48
48
|
"bin": {
|
|
49
|
-
"vizzly": "
|
|
49
|
+
"vizzly": "bin/vizzly.js"
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
52
52
|
"bin",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"registry": "https://registry.npmjs.org/"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@vizzly-testing/honeydiff": "^0.3
|
|
87
|
+
"@vizzly-testing/honeydiff": "^0.4.3",
|
|
88
88
|
"commander": "^14.0.0",
|
|
89
89
|
"cosmiconfig": "^9.0.0",
|
|
90
90
|
"dotenv": "^17.2.1",
|