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.
Files changed (45) hide show
  1. package/dist/cli/cancelJob-LQPQPD5I.js +10 -0
  2. package/dist/cli/{chunk-4JWGHBWV.js → chunk-2F4ONKOX.js} +3 -3
  3. package/dist/cli/{chunk-VCHPF5HT.js → chunk-4FHG27V2.js} +3 -2
  4. package/dist/cli/{chunk-VCHPF5HT.js.map → chunk-4FHG27V2.js.map} +2 -2
  5. package/dist/cli/{chunk-FGXBXADQ.js → chunk-B4NWDBAN.js} +2 -2
  6. package/dist/cli/{chunk-SYK4EWJG.js → chunk-GBORF5SP.js} +2 -2
  7. package/dist/cli/{chunk-SDRGUIAT.js → chunk-QIVIGY3K.js} +2 -2
  8. package/dist/cli/{chunk-AGKX4YUW.js → chunk-VOPCZYUD.js} +9 -11
  9. package/dist/cli/{chunk-AGKX4YUW.js.map → chunk-VOPCZYUD.js.map} +2 -2
  10. package/dist/cli/createAsyncComparison-5ZQY53AW.js +10 -0
  11. package/dist/cli/{createAsyncReport-YG573QF4.js → createAsyncReport-MZGC4WYR.js} +4 -4
  12. package/dist/cli/{getFlakes-HHKDRMUX.js → getFlakes-OZICV3BM.js} +4 -4
  13. package/dist/cli/main.js +14 -12
  14. package/dist/cli/main.js.map +2 -2
  15. package/dist/cli/package-FRXI4E4G.js +7 -0
  16. package/dist/cli/{prepareSnapRequests-4MXQWKYB.js → prepareSnapRequests-6BOXFGHI.js} +4 -4
  17. package/dist/cli/startJob-GASMCYIM.js +10 -0
  18. package/dist/cli/{wrapper-7YC7ZCKZ.js → wrapper-UNP6YKH6.js} +7 -7
  19. package/dist/config/loadConfig.d.ts.map +1 -1
  20. package/dist/cypress/task.d.ts.map +1 -1
  21. package/dist/cypress/task.js +29 -24
  22. package/dist/cypress/task.js.map +2 -2
  23. package/dist/e2e/controller.d.ts +1 -1
  24. package/dist/e2e/controller.d.ts.map +1 -1
  25. package/dist/network/fetchWithRetry.d.ts.map +1 -1
  26. package/dist/playwright/index.d.ts.map +1 -1
  27. package/dist/playwright/index.js +25 -23
  28. package/dist/playwright/index.js.map +2 -2
  29. package/package.json +8 -10
  30. package/dist/cli/cancelJob-2Y37DD62.js +0 -10
  31. package/dist/cli/createAsyncComparison-4JNXSJPV.js +0 -10
  32. package/dist/cli/package-2XZLNOYC.js +0 -7
  33. package/dist/cli/startJob-DPDKPF7E.js +0 -10
  34. /package/dist/cli/{cancelJob-2Y37DD62.js.map → cancelJob-LQPQPD5I.js.map} +0 -0
  35. /package/dist/cli/{chunk-4JWGHBWV.js.map → chunk-2F4ONKOX.js.map} +0 -0
  36. /package/dist/cli/{chunk-FGXBXADQ.js.map → chunk-B4NWDBAN.js.map} +0 -0
  37. /package/dist/cli/{chunk-SYK4EWJG.js.map → chunk-GBORF5SP.js.map} +0 -0
  38. /package/dist/cli/{chunk-SDRGUIAT.js.map → chunk-QIVIGY3K.js.map} +0 -0
  39. /package/dist/cli/{createAsyncComparison-4JNXSJPV.js.map → createAsyncComparison-5ZQY53AW.js.map} +0 -0
  40. /package/dist/cli/{createAsyncReport-YG573QF4.js.map → createAsyncReport-MZGC4WYR.js.map} +0 -0
  41. /package/dist/cli/{getFlakes-HHKDRMUX.js.map → getFlakes-OZICV3BM.js.map} +0 -0
  42. /package/dist/cli/{package-2XZLNOYC.js.map → package-FRXI4E4G.js.map} +0 -0
  43. /package/dist/cli/{prepareSnapRequests-4MXQWKYB.js.map → prepareSnapRequests-6BOXFGHI.js.map} +0 -0
  44. /package/dist/cli/{startJob-DPDKPF7E.js.map → startJob-GASMCYIM.js.map} +0 -0
  45. /package/dist/cli/{wrapper-7YC7ZCKZ.js.map → wrapper-UNP6YKH6.js.map} +0 -0
@@ -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.4",
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": "^9.36.0",
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": "^27.0.0",
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: "^9.36.0",
138
+ eslint: "^10.0.2",
140
139
  "eslint-config-prettier": "^10.1.8",
141
- "eslint-plugin-compat": "^6.0.2",
142
- "eslint-plugin-depend": "^1.3.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.0",
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.44.1"
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
- console.log(
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 (controller.isActive() && !task.isRegisteredCorrectly) {
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');