happo 6.3.4 → 6.3.6
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/dist/cli/cancelJob-LQPQPD5I.js +10 -0
- package/dist/cli/{chunk-4JWGHBWV.js → chunk-2F4ONKOX.js} +3 -3
- package/dist/cli/{chunk-VCHPF5HT.js → chunk-4FHG27V2.js} +3 -2
- package/dist/cli/{chunk-VCHPF5HT.js.map → chunk-4FHG27V2.js.map} +2 -2
- package/dist/cli/{chunk-FGXBXADQ.js → chunk-B4NWDBAN.js} +2 -2
- package/dist/cli/{chunk-SYK4EWJG.js → chunk-GBORF5SP.js} +2 -2
- package/dist/cli/{chunk-SDRGUIAT.js → chunk-QIVIGY3K.js} +2 -2
- package/dist/cli/{chunk-AGKX4YUW.js → chunk-VOPCZYUD.js} +9 -11
- package/dist/cli/{chunk-AGKX4YUW.js.map → chunk-VOPCZYUD.js.map} +2 -2
- package/dist/cli/createAsyncComparison-5ZQY53AW.js +10 -0
- package/dist/cli/{createAsyncReport-YG573QF4.js → createAsyncReport-MZGC4WYR.js} +4 -4
- package/dist/cli/{getFlakes-HHKDRMUX.js → getFlakes-OZICV3BM.js} +4 -4
- package/dist/cli/main.js +14 -12
- package/dist/cli/main.js.map +2 -2
- package/dist/cli/package-FRXI4E4G.js +7 -0
- package/dist/cli/{prepareSnapRequests-4MXQWKYB.js → prepareSnapRequests-6BOXFGHI.js} +4 -4
- package/dist/cli/startJob-GASMCYIM.js +10 -0
- package/dist/cli/{wrapper-7YC7ZCKZ.js → wrapper-UNP6YKH6.js} +7 -7
- package/dist/config/loadConfig.d.ts.map +1 -1
- package/dist/cypress/task.d.ts.map +1 -1
- package/dist/cypress/task.js +29 -24
- package/dist/cypress/task.js.map +2 -2
- package/dist/e2e/controller.d.ts +1 -1
- package/dist/e2e/controller.d.ts.map +1 -1
- package/dist/network/fetchWithRetry.d.ts.map +1 -1
- package/dist/playwright/index.d.ts.map +1 -1
- package/dist/playwright/index.js +25 -23
- package/dist/playwright/index.js.map +2 -2
- package/package.json +8 -10
- package/dist/cli/cancelJob-2Y37DD62.js +0 -10
- package/dist/cli/createAsyncComparison-4JNXSJPV.js +0 -10
- package/dist/cli/package-2XZLNOYC.js +0 -7
- package/dist/cli/startJob-DPDKPF7E.js +0 -10
- /package/dist/cli/{cancelJob-2Y37DD62.js.map → cancelJob-LQPQPD5I.js.map} +0 -0
- /package/dist/cli/{chunk-4JWGHBWV.js.map → chunk-2F4ONKOX.js.map} +0 -0
- /package/dist/cli/{chunk-FGXBXADQ.js.map → chunk-B4NWDBAN.js.map} +0 -0
- /package/dist/cli/{chunk-SYK4EWJG.js.map → chunk-GBORF5SP.js.map} +0 -0
- /package/dist/cli/{chunk-SDRGUIAT.js.map → chunk-QIVIGY3K.js.map} +0 -0
- /package/dist/cli/{createAsyncComparison-4JNXSJPV.js.map → createAsyncComparison-5ZQY53AW.js.map} +0 -0
- /package/dist/cli/{createAsyncReport-YG573QF4.js.map → createAsyncReport-MZGC4WYR.js.map} +0 -0
- /package/dist/cli/{getFlakes-HHKDRMUX.js.map → getFlakes-OZICV3BM.js.map} +0 -0
- /package/dist/cli/{package-2XZLNOYC.js.map → package-FRXI4E4G.js.map} +0 -0
- /package/dist/cli/{prepareSnapRequests-4MXQWKYB.js.map → prepareSnapRequests-6BOXFGHI.js.map} +0 -0
- /package/dist/cli/{startJob-DPDKPF7E.js.map → startJob-GASMCYIM.js.map} +0 -0
- /package/dist/cli/{wrapper-7YC7ZCKZ.js.map → wrapper-UNP6YKH6.js.map} +0 -0
package/dist/cypress/task.js
CHANGED
|
@@ -18,7 +18,7 @@ import asyncRetry from "async-retry";
|
|
|
18
18
|
// package.json
|
|
19
19
|
var package_default = {
|
|
20
20
|
name: "happo",
|
|
21
|
-
version: "6.3.
|
|
21
|
+
version: "6.3.6",
|
|
22
22
|
description: "Catch unexpected visual and accessibility changes and UI bugs",
|
|
23
23
|
license: "MIT",
|
|
24
24
|
repository: {
|
|
@@ -120,39 +120,37 @@ var package_default = {
|
|
|
120
120
|
arrowParens: "always"
|
|
121
121
|
},
|
|
122
122
|
devDependencies: {
|
|
123
|
-
"@eslint/js": "^
|
|
123
|
+
"@eslint/js": "^10.0.1",
|
|
124
124
|
"@playwright/test": "^1.55.1",
|
|
125
125
|
"@reporters/github": "^1.11.0",
|
|
126
126
|
"@storybook/builder-vite": "^10.0.1",
|
|
127
127
|
"@storybook/react-vite": "^10.0.1",
|
|
128
128
|
"@types/async-retry": "^1.4.9",
|
|
129
129
|
"@types/base64-stream": "^1.0.5",
|
|
130
|
-
"@types/jsdom": "^
|
|
130
|
+
"@types/jsdom": "^28.0.0",
|
|
131
131
|
"@types/mime-types": "^3.0.1",
|
|
132
132
|
"@types/multiparty": "^4.2.1",
|
|
133
133
|
"@types/node": "^24.9.1",
|
|
134
134
|
"@types/react": "^19.2.0",
|
|
135
135
|
"@types/react-dom": "^19.2.0",
|
|
136
|
-
"@types/serve-handler": "^6.1.4",
|
|
137
136
|
cypress: "^15.5.0",
|
|
138
137
|
esbuild: "^0.27.0",
|
|
139
|
-
eslint: "^
|
|
138
|
+
eslint: "^10.0.2",
|
|
140
139
|
"eslint-config-prettier": "^10.1.8",
|
|
141
|
-
"eslint-plugin-compat": "^
|
|
142
|
-
"eslint-plugin-depend": "^1.
|
|
140
|
+
"eslint-plugin-compat": "^7.0.1",
|
|
141
|
+
"eslint-plugin-depend": "^1.4.0",
|
|
143
142
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
144
143
|
"eslint-plugin-unicorn": "^63.0.0",
|
|
145
|
-
jiti: "^2.6.
|
|
144
|
+
jiti: "^2.6.1",
|
|
146
145
|
jsdom: "^28.0.0",
|
|
147
146
|
multiparty: "^4.2.3",
|
|
148
147
|
prettier: "^3.6.2",
|
|
149
148
|
react: "^19.2.0",
|
|
150
149
|
"react-dom": "^19.2.0",
|
|
151
150
|
"react-error-boundary": "^6.0.0",
|
|
152
|
-
"serve-handler": "^6.1.6",
|
|
153
151
|
storybook: "^10.0.1",
|
|
154
152
|
typescript: "^5.9.2",
|
|
155
|
-
"typescript-eslint": "^8.
|
|
153
|
+
"typescript-eslint": "^8.56.1"
|
|
156
154
|
},
|
|
157
155
|
dependencies: {
|
|
158
156
|
"async-retry": "^1.3.3",
|
|
@@ -252,6 +250,7 @@ async function fetchWithRetry(url, {
|
|
|
252
250
|
const originalError = maybeError instanceof Error ? maybeError : new Error(String(maybeError));
|
|
253
251
|
const message = originalError.name === "TimeoutError" ? `Timeout when fetching ${url} using method ${method}` : originalError.message;
|
|
254
252
|
throw new Error(`${message} (took ${Date.now() - start} ms)`, {
|
|
253
|
+
// eslint-disable-next-line preserve-caught-error -- We actually are preserving the original error, the rule is wrong in this case
|
|
255
254
|
cause: originalError
|
|
256
255
|
});
|
|
257
256
|
}
|
|
@@ -560,7 +559,9 @@ async function loadConfigFile(configFilePath, environment, logger = console) {
|
|
|
560
559
|
}
|
|
561
560
|
} catch (error) {
|
|
562
561
|
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
|
563
|
-
throw new Error(`Happo config file could not be found: ${configFilePath}
|
|
562
|
+
throw new Error(`Happo config file could not be found: ${configFilePath}`, {
|
|
563
|
+
cause: error
|
|
564
|
+
});
|
|
564
565
|
}
|
|
565
566
|
throw error;
|
|
566
567
|
}
|
|
@@ -1306,23 +1307,14 @@ var Controller = class {
|
|
|
1306
1307
|
this.happoDebug = true;
|
|
1307
1308
|
}
|
|
1308
1309
|
if (!HAPPO_E2E_PORT) {
|
|
1309
|
-
|
|
1310
|
-
`
|
|
1311
|
-
[HAPPO] Happo is disabled. Enable it by using the \`happo\` command.
|
|
1312
|
-
|
|
1313
|
-
Documentation:
|
|
1314
|
-
Playwright: https://docs.happo.io/docs/playwright#usage
|
|
1315
|
-
Cypress (run): https://docs.happo.io/docs/cypress#usage-with-cypress-run
|
|
1316
|
-
Cypress (open): https://docs.happo.io/docs/cypress#usage-with-cypress-open
|
|
1317
|
-
`.trim()
|
|
1318
|
-
);
|
|
1319
|
-
return;
|
|
1310
|
+
return false;
|
|
1320
1311
|
}
|
|
1321
1312
|
if (this.happoDebug) {
|
|
1322
1313
|
console.log("[HAPPO] Running Controller.init");
|
|
1323
1314
|
}
|
|
1324
1315
|
const configFilePath = findConfigFile();
|
|
1325
1316
|
this.happoConfig = await loadConfigFile(configFilePath);
|
|
1317
|
+
return true;
|
|
1326
1318
|
}
|
|
1327
1319
|
isActive() {
|
|
1328
1320
|
const result = !!this.happoConfig;
|
|
@@ -1350,6 +1342,9 @@ Documentation:
|
|
|
1350
1342
|
return assetsPath;
|
|
1351
1343
|
}
|
|
1352
1344
|
async finish() {
|
|
1345
|
+
if (!this.happoConfig) {
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1353
1348
|
if (this.happoDebug) {
|
|
1354
1349
|
console.log("[HAPPO] Running Controller.finish");
|
|
1355
1350
|
}
|
|
@@ -1653,6 +1648,7 @@ var controller_default = Controller;
|
|
|
1653
1648
|
|
|
1654
1649
|
// src/cypress/task.ts
|
|
1655
1650
|
var controller = new controller_default();
|
|
1651
|
+
var disabledLogged = false;
|
|
1656
1652
|
var { HAPPO_DEBUG } = process.env;
|
|
1657
1653
|
function getCleanupTimeframe({
|
|
1658
1654
|
attempt,
|
|
@@ -1736,8 +1732,17 @@ var task = {
|
|
|
1736
1732
|
return null;
|
|
1737
1733
|
},
|
|
1738
1734
|
async handleBeforeSpec() {
|
|
1739
|
-
await controller.init();
|
|
1740
|
-
if (
|
|
1735
|
+
const isRunning = await controller.init();
|
|
1736
|
+
if (!isRunning) {
|
|
1737
|
+
if (!disabledLogged) {
|
|
1738
|
+
console.log(
|
|
1739
|
+
"[HAPPO] Happo is disabled. See https://docs.happo.io/docs/cypress for how to enable it."
|
|
1740
|
+
);
|
|
1741
|
+
disabledLogged = true;
|
|
1742
|
+
}
|
|
1743
|
+
return;
|
|
1744
|
+
}
|
|
1745
|
+
if (!task.isRegisteredCorrectly) {
|
|
1741
1746
|
throw new Error(`Happo hasn't been registered correctly. Make sure you call \`happoTask.register\` when you register the plugin:
|
|
1742
1747
|
|
|
1743
1748
|
const happoTask = require('happo/cypress/task');
|