happo 6.10.7 → 6.10.8
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-GENB4D2J.js +10 -0
- package/dist/cli/{chunk-4NAY7VGC.js → chunk-4LR77I43.js} +2 -2
- package/dist/cli/{chunk-ZZR4F4NT.js → chunk-7HMFLTG3.js} +3 -3
- package/dist/cli/{chunk-3NPBBH4J.js → chunk-G7ULHRHU.js} +2 -2
- package/dist/cli/{chunk-QXNJWHLN.js → chunk-GD7KRJOO.js} +2 -2
- package/dist/cli/{chunk-3SKQZVN4.js → chunk-HCZZJ6R6.js} +3 -2
- package/dist/cli/chunk-HCZZJ6R6.js.map +7 -0
- package/dist/cli/{chunk-VAPIOMEF.js → chunk-RK77B2CV.js} +2 -2
- package/dist/cli/createAsyncComparison-ZQ6MUSVE.js +10 -0
- package/dist/cli/{createAsyncReport-GR5XHHZ3.js → createAsyncReport-2JPU7JD5.js} +4 -4
- package/dist/cli/{createExtendsReportSnapRequest-6666UHIR.js → createExtendsReportSnapRequest-N6GXYNAC.js} +4 -4
- package/dist/cli/{findBaselineReport-NZ65EYCX.js → findBaselineReport-ELJYMYXD.js} +4 -4
- package/dist/cli/{getFlakes-62CDGHAN.js → getFlakes-CBGWAHIU.js} +4 -4
- package/dist/cli/main.js +15 -15
- package/dist/cli/package-2XKSYS6F.js +7 -0
- package/dist/cli/{prepareSnapRequests-YYJOVIN5.js → prepareSnapRequests-LSGTNPWS.js} +4 -4
- package/dist/cli/startJob-K5V7SAXF.js +10 -0
- package/dist/cli/{wrapper-6JF4MXC2.js → wrapper-HH2NJLIH.js} +7 -7
- package/dist/custom/index.js +20 -24
- package/dist/custom/index.js.map +2 -2
- package/dist/cypress/task.js +2 -1
- package/dist/cypress/task.js.map +2 -2
- package/dist/playwright/index.js +2 -1
- package/dist/playwright/index.js.map +2 -2
- package/package.json +2 -1
- package/dist/cli/cancelJob-P42TC63B.js +0 -10
- package/dist/cli/chunk-3SKQZVN4.js.map +0 -7
- package/dist/cli/createAsyncComparison-BNAPEL7D.js +0 -10
- package/dist/cli/package-FHIQBQ3L.js +0 -7
- package/dist/cli/startJob-4JC6HOZY.js +0 -10
- /package/dist/cli/{cancelJob-P42TC63B.js.map → cancelJob-GENB4D2J.js.map} +0 -0
- /package/dist/cli/{chunk-4NAY7VGC.js.map → chunk-4LR77I43.js.map} +0 -0
- /package/dist/cli/{chunk-ZZR4F4NT.js.map → chunk-7HMFLTG3.js.map} +0 -0
- /package/dist/cli/{chunk-3NPBBH4J.js.map → chunk-G7ULHRHU.js.map} +0 -0
- /package/dist/cli/{chunk-QXNJWHLN.js.map → chunk-GD7KRJOO.js.map} +0 -0
- /package/dist/cli/{chunk-VAPIOMEF.js.map → chunk-RK77B2CV.js.map} +0 -0
- /package/dist/cli/{createAsyncComparison-BNAPEL7D.js.map → createAsyncComparison-ZQ6MUSVE.js.map} +0 -0
- /package/dist/cli/{createAsyncReport-GR5XHHZ3.js.map → createAsyncReport-2JPU7JD5.js.map} +0 -0
- /package/dist/cli/{createExtendsReportSnapRequest-6666UHIR.js.map → createExtendsReportSnapRequest-N6GXYNAC.js.map} +0 -0
- /package/dist/cli/{findBaselineReport-NZ65EYCX.js.map → findBaselineReport-ELJYMYXD.js.map} +0 -0
- /package/dist/cli/{getFlakes-62CDGHAN.js.map → getFlakes-CBGWAHIU.js.map} +0 -0
- /package/dist/cli/{package-FHIQBQ3L.js.map → package-2XKSYS6F.js.map} +0 -0
- /package/dist/cli/{prepareSnapRequests-YYJOVIN5.js.map → prepareSnapRequests-LSGTNPWS.js.map} +0 -0
- /package/dist/cli/{startJob-4JC6HOZY.js.map → startJob-K5V7SAXF.js.map} +0 -0
- /package/dist/cli/{wrapper-6JF4MXC2.js.map → wrapper-HH2NJLIH.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchWithRetry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RK77B2CV.js";
|
|
4
4
|
|
|
5
5
|
// src/network/getSignedToken.ts
|
|
6
6
|
import { SignJWT } from "jose";
|
|
@@ -81,4 +81,4 @@ async function makeHappoAPIRequest({ url, path, method = "GET", formData, body }
|
|
|
81
81
|
export {
|
|
82
82
|
makeHappoAPIRequest
|
|
83
83
|
};
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-4LR77I43.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4LR77I43.js";
|
|
4
4
|
import {
|
|
5
5
|
ErrorWithStatusCode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RK77B2CV.js";
|
|
7
7
|
|
|
8
8
|
// src/network/cancelJob.ts
|
|
9
9
|
async function cancelJob(status, message, config, { beforeSha, afterSha, link }, logger) {
|
|
@@ -43,4 +43,4 @@ async function cancelJob(status, message, config, { beforeSha, afterSha, link },
|
|
|
43
43
|
export {
|
|
44
44
|
cancelJob
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-7HMFLTG3.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4LR77I43.js";
|
|
4
4
|
|
|
5
5
|
// src/network/createAsyncComparison.ts
|
|
6
6
|
function assertResultIsCreateAsyncComparisonResult(result) {
|
|
@@ -60,4 +60,4 @@ async function createAsyncComparison(config, {
|
|
|
60
60
|
export {
|
|
61
61
|
createAsyncComparison
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-G7ULHRHU.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4LR77I43.js";
|
|
4
4
|
|
|
5
5
|
// src/network/startJob.ts
|
|
6
6
|
function assertResultIsStartJobResult(result) {
|
|
@@ -36,4 +36,4 @@ async function startJob(config, { beforeSha, afterSha, link, message }, logger)
|
|
|
36
36
|
export {
|
|
37
37
|
startJob
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-GD7KRJOO.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "happo",
|
|
4
|
-
version: "6.10.
|
|
4
|
+
version: "6.10.8",
|
|
5
5
|
description: "Catch unexpected visual and accessibility changes and UI bugs",
|
|
6
6
|
license: "MIT",
|
|
7
7
|
repository: {
|
|
@@ -71,6 +71,7 @@ var package_default = {
|
|
|
71
71
|
"storybook:dev": "storybook dev --config-dir src/storybook/__tests__/storybook-app -p ${PORT:-6007}",
|
|
72
72
|
test: "node --env-file-if-exists=.env.local ./scripts/test.ts",
|
|
73
73
|
"test:custom": "pnpm build:dist && pnpm build:custom && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.custom.config.ts",
|
|
74
|
+
"test:custom:skipped": 'pnpm build:dist && pnpm build:custom && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.custom.config.ts --project custom-skipped --skip "$(node ./scripts/getCustomSkip.ts)"',
|
|
74
75
|
"test:cypress": "pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.cypress.config.ts e2e -- cypress run -C src/cypress/__cypress__/cypress.config.ts",
|
|
75
76
|
"test:cypress:open": "cypress open -C src/cypress/__cypress__/cypress.config.ts",
|
|
76
77
|
"test:playwright": "pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright.config.ts e2e -- playwright test",
|
|
@@ -188,4 +189,4 @@ var package_default = {
|
|
|
188
189
|
export {
|
|
189
190
|
package_default
|
|
190
191
|
};
|
|
191
|
-
//# sourceMappingURL=chunk-
|
|
192
|
+
//# sourceMappingURL=chunk-HCZZJ6R6.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../package.json"],
|
|
4
|
+
"sourcesContent": ["{\n \"name\": \"happo\",\n \"version\": \"6.10.8\",\n \"description\": \"Catch unexpected visual and accessibility changes and UI bugs\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/happo/happo.git\"\n },\n \"bugs\": \"https://github.com/happo/happo/issues\",\n \"homepage\": \"https://happo.io\",\n \"bin\": {\n \"happo\": \"dist/cli/main.js\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/config/index.js\",\n \"types\": \"./dist/config/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/config/index.d.ts\",\n \"default\": \"./dist/config/index.js\"\n },\n \"./cypress\": {\n \"types\": \"./dist/cypress/index.d.ts\",\n \"default\": \"./dist/cypress/index.js\"\n },\n \"./cypress/task\": {\n \"types\": \"./dist/cypress/task.d.ts\",\n \"default\": \"./dist/cypress/task.js\"\n },\n \"./playwright\": {\n \"types\": \"./dist/playwright/index.d.ts\",\n \"default\": \"./dist/playwright/index.js\"\n },\n \"./custom\": {\n \"types\": \"./dist/custom/index.d.ts\",\n \"default\": \"./dist/custom/index.js\"\n },\n \"./storybook/addon\": {\n \"types\": \"./dist/storybook/browser/addon.d.ts\",\n \"default\": \"./dist/storybook/browser/addon.js\"\n },\n \"./storybook/decorator\": {\n \"types\": \"./dist/storybook/browser/decorator.d.ts\",\n \"default\": \"./dist/storybook/browser/decorator.js\"\n },\n \"./storybook/preset\": {\n \"types\": \"./dist/storybook/preset.d.ts\",\n \"default\": \"./dist/storybook/preset.js\"\n },\n \"./storybook/register\": {\n \"types\": \"./dist/storybook/browser/register.d.ts\",\n \"default\": \"./dist/storybook/browser/register.js\"\n }\n },\n \"files\": [\n \"dist\",\n \"preset.js\"\n ],\n \"scripts\": {\n \"all\": \"node ./scripts/allchecks.ts\",\n \"build\": \"pnpm build:types && pnpm build:dist\",\n \"build:custom\": \"esbuild src/custom/__happo__/index.ts --bundle --format=iife --global-name=happoCustom --outfile=tmp/happo-custom/bundle.js --platform=browser --target=esnext\",\n \"build:dist\": \"node ./scripts/build.ts\",\n \"build:types\": \"pnpm tsc --pretty\",\n \"build:watch\": \"tsc --build --watch\",\n \"clean\": \"node ./scripts/clean.ts\",\n \"lint\": \"eslint .\",\n \"prepublishOnly\": \"pnpm clean && pnpm build\",\n \"storybook:dev\": \"storybook dev --config-dir src/storybook/__tests__/storybook-app -p ${PORT:-6007}\",\n \"test\": \"node --env-file-if-exists=.env.local ./scripts/test.ts\",\n \"test:custom\": \"pnpm build:dist && pnpm build:custom && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.custom.config.ts\",\n \"test:custom:skipped\": \"pnpm build:dist && pnpm build:custom && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.custom.config.ts --project custom-skipped --skip \\\"$(node ./scripts/getCustomSkip.ts)\\\"\",\n \"test:cypress\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.cypress.config.ts e2e -- cypress run -C src/cypress/__cypress__/cypress.config.ts\",\n \"test:cypress:open\": \"cypress open -C src/cypress/__cypress__/cypress.config.ts\",\n \"test:playwright\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright.config.ts e2e -- playwright test\",\n \"test:playwright:nonce\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright-nonce.config.ts --nonce $HAPPO_NONCE e2e -- playwright test && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright-nonce.config.ts --nonce $HAPPO_NONCE finalize\",\n \"test:storybook\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.storybook.config.ts\",\n \"test:storybook:skipped\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.storybook.config.ts --project storybook-skipped --skip \\\"$(node ./scripts/getSkip.ts)\\\"\",\n \"test:storybook:only\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.storybook.config.ts --project storybook-only --only \\\"$(node ./scripts/getOnly.ts)\\\"\",\n \"test:pages\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.pages.config.ts\",\n \"release\": \"set -a && source .env && set +a && release-with-ease\",\n \"tsc\": \"tsc --build tsconfig.json\"\n },\n \"browserslist\": {\n \"node\": [\n \"node 22\"\n ],\n \"browser\": [\n \"last 2 Chrome major versions\",\n \"last 2 Firefox major versions\",\n \"last 2 Safari major versions\",\n \"last 2 Edge major versions\"\n ],\n \"isomorphic\": [\n \"node 22\",\n \"last 2 Chrome major versions\",\n \"last 2 Firefox major versions\",\n \"last 2 Safari major versions\",\n \"last 2 Edge major versions\"\n ]\n },\n \"prettier\": {\n \"printWidth\": 85,\n \"singleQuote\": true,\n \"trailingComma\": \"all\",\n \"arrowParens\": \"always\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^10.0.1\",\n \"@playwright/test\": \"^1.55.1\",\n \"@reporters/github\": \"^1.11.0\",\n \"@storybook/builder-vite\": \"^10.0.1\",\n \"@storybook/react-vite\": \"^10.0.1\",\n \"@types/async-retry\": \"^1.4.9\",\n \"@types/base64-stream\": \"^1.0.5\",\n \"@types/jsdom\": \"^28.0.0\",\n \"@types/mime-types\": \"^3.0.1\",\n \"@types/multiparty\": \"^4.2.1\",\n \"@types/node\": \"^24.9.1\",\n \"@types/react\": \"^19.2.0\",\n \"@types/react-dom\": \"^19.2.0\",\n \"cypress\": \"^15.5.0\",\n \"esbuild\": \"^0.28.0\",\n \"eslint\": \"^10.0.2\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-plugin-compat\": \"^7.0.1\",\n \"eslint-plugin-depend\": \"^1.4.0\",\n \"eslint-plugin-simple-import-sort\": \"^12.1.1\",\n \"eslint-plugin-unicorn\": \"^64.0.0\",\n \"jiti\": \"^2.6.1\",\n \"jsdom\": \"^29.0.0\",\n \"multiparty\": \"^4.2.3\",\n \"prettier\": \"^3.6.2\",\n \"react\": \"^19.2.0\",\n \"react-dom\": \"^19.2.0\",\n \"react-error-boundary\": \"^6.0.0\",\n \"storybook\": \"^10.0.1\",\n \"typescript\": \"^6.0.2\",\n \"release-with-ease\": \"^2.1.0\",\n \"typescript-eslint\": \"^8.57.2\"\n },\n \"dependencies\": {\n \"async-retry\": \"^1.3.3\",\n \"base64-stream\": \"^1.0.0\",\n \"empathic\": \"^2.0.0\",\n \"fflate\": \"^0.8.2\",\n \"jose\": \"^6.1.0\",\n \"limit-concur\": \"^4.0.0\",\n \"mime-types\": \"^3.0.1\",\n \"srcset\": \"^5.0.2\"\n },\n \"storybook\": {\n \"displayName\": \"Happo\",\n \"icon\": \"https://happo.io/static/happo-hippo.png\",\n \"supportedFrameworks\": [\n \"angular\",\n \"ember\",\n \"html\",\n \"preact\",\n \"react\",\n \"react-native\",\n \"svelte\",\n \"vue\",\n \"web-components\"\n ],\n \"unsupportedFrameworks\": []\n },\n \"keywords\": [\n \"storybook-addon\",\n \"accessibility\",\n \"cypress\",\n \"playwright\",\n \"regression\",\n \"storybook\",\n \"test\",\n \"testing\",\n \"ui\",\n \"visual-regression\",\n \"visual\",\n \"vrt\"\n ],\n \"engines\": {\n \"node\": \"^22.18.0 || ^23.6.0 || >=24.0.0\"\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,SAAW;AAAA,EACX,YAAc;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AA,IACf,MAAQ;AAAA,IACR,qBAAuB;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,uBAAyB,CAAC;AAAA,EAC5B;AAAA,EACA,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HCZZJ6R6.js";
|
|
4
4
|
|
|
5
5
|
// src/network/fetchWithRetry.ts
|
|
6
6
|
import asyncRetry from "async-retry";
|
|
@@ -95,4 +95,4 @@ export {
|
|
|
95
95
|
ErrorWithStatusCode,
|
|
96
96
|
fetchWithRetry
|
|
97
97
|
};
|
|
98
|
-
//# sourceMappingURL=chunk-
|
|
98
|
+
//# sourceMappingURL=chunk-RK77B2CV.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAsyncComparison
|
|
3
|
+
} from "./chunk-G7ULHRHU.js";
|
|
4
|
+
import "./chunk-4LR77I43.js";
|
|
5
|
+
import "./chunk-RK77B2CV.js";
|
|
6
|
+
import "./chunk-HCZZJ6R6.js";
|
|
7
|
+
export {
|
|
8
|
+
createAsyncComparison as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=createAsyncComparison-ZQ6MUSVE.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4LR77I43.js";
|
|
4
|
+
import "./chunk-RK77B2CV.js";
|
|
5
|
+
import "./chunk-HCZZJ6R6.js";
|
|
6
6
|
|
|
7
7
|
// src/network/createAsyncReport.ts
|
|
8
8
|
function assertResultIsCreateAsyncReportResult(result) {
|
|
@@ -38,4 +38,4 @@ async function createAsyncReport(snapRequestIds, config, { afterSha, link, messa
|
|
|
38
38
|
export {
|
|
39
39
|
createAsyncReport as default
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=createAsyncReport-
|
|
41
|
+
//# sourceMappingURL=createAsyncReport-2JPU7JD5.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4LR77I43.js";
|
|
4
|
+
import "./chunk-RK77B2CV.js";
|
|
5
|
+
import "./chunk-HCZZJ6R6.js";
|
|
6
6
|
|
|
7
7
|
// src/network/createExtendsReportSnapRequest.ts
|
|
8
8
|
async function createExtendsReportSnapRequest(extendsSha, skip, config) {
|
|
@@ -29,4 +29,4 @@ async function createExtendsReportSnapRequest(extendsSha, skip, config) {
|
|
|
29
29
|
export {
|
|
30
30
|
createExtendsReportSnapRequest as default
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=createExtendsReportSnapRequest-
|
|
32
|
+
//# sourceMappingURL=createExtendsReportSnapRequest-N6GXYNAC.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4LR77I43.js";
|
|
4
|
+
import "./chunk-RK77B2CV.js";
|
|
5
|
+
import "./chunk-HCZZJ6R6.js";
|
|
6
6
|
|
|
7
7
|
// src/network/findBaselineReport.ts
|
|
8
8
|
async function findBaselineReport(environment, config, logger) {
|
|
@@ -33,4 +33,4 @@ async function findBaselineReport(environment, config, logger) {
|
|
|
33
33
|
export {
|
|
34
34
|
findBaselineReport as default
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=findBaselineReport-
|
|
36
|
+
//# sourceMappingURL=findBaselineReport-ELJYMYXD.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4LR77I43.js";
|
|
4
|
+
import "./chunk-RK77B2CV.js";
|
|
5
|
+
import "./chunk-HCZZJ6R6.js";
|
|
6
6
|
|
|
7
7
|
// src/network/getFlakes.ts
|
|
8
8
|
function formatFlakeOutput(flakes) {
|
|
@@ -70,4 +70,4 @@ export {
|
|
|
70
70
|
getFlakes as default,
|
|
71
71
|
formatFlakeOutput
|
|
72
72
|
};
|
|
73
|
-
//# sourceMappingURL=getFlakes-
|
|
73
|
+
//# sourceMappingURL=getFlakes-CBGWAHIU.js.map
|
package/dist/cli/main.js
CHANGED
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
} from "./chunk-ML3Z5Z22.js";
|
|
8
8
|
import {
|
|
9
9
|
fetchWithRetry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RK77B2CV.js";
|
|
11
11
|
import {
|
|
12
12
|
package_default
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HCZZJ6R6.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/index.ts
|
|
16
16
|
import path3 from "node:path";
|
|
@@ -1235,7 +1235,7 @@ function createReporter(opts = {}) {
|
|
|
1235
1235
|
|
|
1236
1236
|
// src/cli/index.ts
|
|
1237
1237
|
async function getVersion() {
|
|
1238
|
-
const packageJson = await import("./package-
|
|
1238
|
+
const packageJson = await import("./package-2XKSYS6F.js");
|
|
1239
1239
|
return packageJson.default.version;
|
|
1240
1240
|
}
|
|
1241
1241
|
function parseDashdashCommandParts(rawArgs) {
|
|
@@ -1505,10 +1505,10 @@ async function main(rawArgs = process.argv, logger = console) {
|
|
|
1505
1505
|
async function handleDefaultCommand(config, environment, logger) {
|
|
1506
1506
|
logger.log("Running happo tests...");
|
|
1507
1507
|
const [startJob, createAsyncComparison, createAsyncReport, prepareSnapRequests] = await Promise.all([
|
|
1508
|
-
(await import("./startJob-
|
|
1509
|
-
(await import("./createAsyncComparison-
|
|
1510
|
-
(await import("./createAsyncReport-
|
|
1511
|
-
(await import("./prepareSnapRequests-
|
|
1508
|
+
(await import("./startJob-K5V7SAXF.js")).default,
|
|
1509
|
+
(await import("./createAsyncComparison-ZQ6MUSVE.js")).default,
|
|
1510
|
+
(await import("./createAsyncReport-2JPU7JD5.js")).default,
|
|
1511
|
+
(await import("./prepareSnapRequests-LSGTNPWS.js")).default
|
|
1512
1512
|
]);
|
|
1513
1513
|
await startJob(config, environment, logger);
|
|
1514
1514
|
try {
|
|
@@ -1540,7 +1540,7 @@ async function handleDefaultCommand(config, environment, logger) {
|
|
|
1540
1540
|
process.exitCode = 1;
|
|
1541
1541
|
return;
|
|
1542
1542
|
}
|
|
1543
|
-
const findBaselineReport = (await import("./findBaselineReport-
|
|
1543
|
+
const findBaselineReport = (await import("./findBaselineReport-ELJYMYXD.js")).default;
|
|
1544
1544
|
baselineSha = await findBaselineReport(environment, config, logger);
|
|
1545
1545
|
if (!baselineSha) {
|
|
1546
1546
|
logger.log(
|
|
@@ -1569,7 +1569,7 @@ async function handleDefaultCommand(config, environment, logger) {
|
|
|
1569
1569
|
return;
|
|
1570
1570
|
}
|
|
1571
1571
|
if (!baselineSha) {
|
|
1572
|
-
const findBaselineReport = (await import("./findBaselineReport-
|
|
1572
|
+
const findBaselineReport = (await import("./findBaselineReport-ELJYMYXD.js")).default;
|
|
1573
1573
|
baselineSha = await findBaselineReport(environment, config, logger);
|
|
1574
1574
|
if (!baselineSha) {
|
|
1575
1575
|
logger.log(
|
|
@@ -1581,7 +1581,7 @@ async function handleDefaultCommand(config, environment, logger) {
|
|
|
1581
1581
|
const { snapRequestIds, resolvedSkip } = await prepareSnapRequests(config, skip, only);
|
|
1582
1582
|
let allSnapRequestIds = snapRequestIds;
|
|
1583
1583
|
if (skip && baselineSha) {
|
|
1584
|
-
const createExtendsReportSnapRequest = (await import("./createExtendsReportSnapRequest-
|
|
1584
|
+
const createExtendsReportSnapRequest = (await import("./createExtendsReportSnapRequest-N6GXYNAC.js")).default;
|
|
1585
1585
|
const extendsRequestId = await createExtendsReportSnapRequest(
|
|
1586
1586
|
baselineSha,
|
|
1587
1587
|
resolvedSkip ?? skip,
|
|
@@ -1589,7 +1589,7 @@ async function handleDefaultCommand(config, environment, logger) {
|
|
|
1589
1589
|
);
|
|
1590
1590
|
allSnapRequestIds = [...snapRequestIds, extendsRequestId];
|
|
1591
1591
|
} else if (only && baselineSha && resolvedSkip && resolvedSkip.length > 0) {
|
|
1592
|
-
const createExtendsReportSnapRequest = (await import("./createExtendsReportSnapRequest-
|
|
1592
|
+
const createExtendsReportSnapRequest = (await import("./createExtendsReportSnapRequest-N6GXYNAC.js")).default;
|
|
1593
1593
|
const extendsRequestId = await createExtendsReportSnapRequest(
|
|
1594
1594
|
baselineSha,
|
|
1595
1595
|
resolvedSkip,
|
|
@@ -1625,7 +1625,7 @@ async function handleDefaultCommand(config, environment, logger) {
|
|
|
1625
1625
|
} catch (e) {
|
|
1626
1626
|
const message = e instanceof Error ? e.message : String(e);
|
|
1627
1627
|
logger.error(`${config.integration.type} run failed: ${message}`, e);
|
|
1628
|
-
const cancelJob = (await import("./cancelJob-
|
|
1628
|
+
const cancelJob = (await import("./cancelJob-GENB4D2J.js")).default;
|
|
1629
1629
|
await cancelJob("failure", message, config, environment, logger);
|
|
1630
1630
|
process.exitCode = 1;
|
|
1631
1631
|
return;
|
|
@@ -1636,7 +1636,7 @@ async function handleFinalizeCommand(config, environment, logger) {
|
|
|
1636
1636
|
logger.log("Config:", config);
|
|
1637
1637
|
logger.log("Environment:", environment);
|
|
1638
1638
|
try {
|
|
1639
|
-
const finalizeAll = (await import("./wrapper-
|
|
1639
|
+
const finalizeAll = (await import("./wrapper-HH2NJLIH.js")).finalizeAll;
|
|
1640
1640
|
await finalizeAll({ happoConfig: config, environment, logger });
|
|
1641
1641
|
} catch (e) {
|
|
1642
1642
|
logger.error(e instanceof Error ? e.message : String(e), e);
|
|
@@ -1664,7 +1664,7 @@ async function handleFlakeCommand(config, {
|
|
|
1664
1664
|
process.exitCode = 1;
|
|
1665
1665
|
return;
|
|
1666
1666
|
}
|
|
1667
|
-
const { default: getFlakes, formatFlakeOutput } = await import("./getFlakes-
|
|
1667
|
+
const { default: getFlakes, formatFlakeOutput } = await import("./getFlakes-CBGWAHIU.js");
|
|
1668
1668
|
const project = allProjects ? void 0 : projectOverride ?? config.project;
|
|
1669
1669
|
const flakes = await getFlakes(
|
|
1670
1670
|
{
|
|
@@ -1706,7 +1706,7 @@ async function handleE2ECommand(config, environment, dashdashCommandParts, confi
|
|
|
1706
1706
|
logger.log("Config:", config);
|
|
1707
1707
|
logger.log("Environment:", environment);
|
|
1708
1708
|
logger.log("Dashdash command parts:", dashdashCommandParts);
|
|
1709
|
-
const runWithWrapper = (await import("./wrapper-
|
|
1709
|
+
const runWithWrapper = (await import("./wrapper-HH2NJLIH.js")).default;
|
|
1710
1710
|
const exitCode = await runWithWrapper(
|
|
1711
1711
|
dashdashCommandParts,
|
|
1712
1712
|
config,
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./chunk-ML3Z5Z22.js";
|
|
5
5
|
import {
|
|
6
6
|
makeHappoAPIRequest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4LR77I43.js";
|
|
8
8
|
import {
|
|
9
9
|
ErrorWithStatusCode
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-RK77B2CV.js";
|
|
11
|
+
import "./chunk-HCZZJ6R6.js";
|
|
12
12
|
|
|
13
13
|
// src/network/prepareSnapRequests.ts
|
|
14
14
|
import fs5 from "node:fs";
|
|
@@ -1033,4 +1033,4 @@ async function prepareSnapRequests(config, skip, only) {
|
|
|
1033
1033
|
export {
|
|
1034
1034
|
prepareSnapRequests as default
|
|
1035
1035
|
};
|
|
1036
|
-
//# sourceMappingURL=prepareSnapRequests-
|
|
1036
|
+
//# sourceMappingURL=prepareSnapRequests-LSGTNPWS.js.map
|
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
} from "./chunk-X4TE2VNY.js";
|
|
4
4
|
import {
|
|
5
5
|
cancelJob
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7HMFLTG3.js";
|
|
7
7
|
import {
|
|
8
8
|
startServer
|
|
9
9
|
} from "./chunk-JTRP4JVC.js";
|
|
10
10
|
import {
|
|
11
11
|
startJob
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GD7KRJOO.js";
|
|
13
13
|
import {
|
|
14
14
|
createAsyncComparison
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-G7ULHRHU.js";
|
|
16
16
|
import {
|
|
17
17
|
makeHappoAPIRequest
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-4LR77I43.js";
|
|
19
|
+
import "./chunk-RK77B2CV.js";
|
|
20
|
+
import "./chunk-HCZZJ6R6.js";
|
|
21
21
|
|
|
22
22
|
// src/e2e/wrapper.ts
|
|
23
23
|
import { spawn } from "node:child_process";
|
|
@@ -235,4 +235,4 @@ export {
|
|
|
235
235
|
runWithWrapper as default,
|
|
236
236
|
finalizeAll
|
|
237
237
|
};
|
|
238
|
-
//# sourceMappingURL=wrapper-
|
|
238
|
+
//# sourceMappingURL=wrapper-HH2NJLIH.js.map
|
package/dist/custom/index.js
CHANGED
|
@@ -53,6 +53,13 @@ var happoStatic = {
|
|
|
53
53
|
...win.happo,
|
|
54
54
|
init: ({ targetName, chunk, only }) => {
|
|
55
55
|
currentIndex = 0;
|
|
56
|
+
const happoSkippedEl = typeof document === "undefined" ? null : document.getElementById("happo-skipped");
|
|
57
|
+
const skipSet = toSkipSet(
|
|
58
|
+
parseSkip(happoSkippedEl?.textContent ?? void 0)
|
|
59
|
+
);
|
|
60
|
+
examples = examples.filter(
|
|
61
|
+
(e) => !isInSkipSet(skipSet, e.component, e.variant)
|
|
62
|
+
);
|
|
56
63
|
if (only) {
|
|
57
64
|
examples = examples.filter(
|
|
58
65
|
(e) => e.component === only.component && e.variant === only.variant
|
|
@@ -73,31 +80,20 @@ var happoStatic = {
|
|
|
73
80
|
}
|
|
74
81
|
},
|
|
75
82
|
nextExample: async () => {
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (!example) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
if (isInSkipSet(skipSet, example.component, example.variant)) {
|
|
86
|
-
currentIndex++;
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
if (example.render) {
|
|
90
|
-
await example.render();
|
|
91
|
-
}
|
|
92
|
-
currentIndex++;
|
|
93
|
-
const clone = {
|
|
94
|
-
component: example.component,
|
|
95
|
-
variant: example.variant,
|
|
96
|
-
targets: example.targets,
|
|
97
|
-
waitForContent: example.waitForContent
|
|
98
|
-
};
|
|
99
|
-
return clone;
|
|
83
|
+
const example = examples[currentIndex];
|
|
84
|
+
if (!example) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (example.render) {
|
|
88
|
+
await example.render();
|
|
100
89
|
}
|
|
90
|
+
currentIndex++;
|
|
91
|
+
return {
|
|
92
|
+
component: example.component,
|
|
93
|
+
variant: example.variant,
|
|
94
|
+
targets: example.targets,
|
|
95
|
+
waitForContent: example.waitForContent
|
|
96
|
+
};
|
|
101
97
|
}
|
|
102
98
|
};
|
|
103
99
|
},
|
package/dist/custom/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/isomorphic/parseSkip.ts", "../../src/custom/index.ts"],
|
|
4
|
-
"sourcesContent": ["import type { SkipItem } from './types.ts';\n\n/**\n * A pair of Sets used for O(1) skip lookups.\n * - [0]: component-only skips (match all variants of the component)\n * - [1]: component+variant skips (match a specific variant, keyed as \"component\\0variant\")\n */\nexport type SkipSet = readonly [componentOnly: Set<string>, componentVariant: Set<string>];\n\nfunction isSkipItem(item: unknown): item is SkipItem {\n if (typeof item !== 'object' || item === null) return false;\n const record = item as Record<string, unknown>;\n const hasComponent = typeof record['component'] === 'string';\n const hasStoryFile = typeof record['storyFile'] === 'string';\n if (hasComponent && hasStoryFile) return false;\n if (hasStoryFile) return record['variant'] === undefined;\n if (hasComponent) return record['variant'] === undefined || typeof record['variant'] === 'string';\n return false;\n}\n\n/**\n * Parses and validates a JSON string, returning an array of SkipItems.\n * Throws a TypeError if the JSON is invalid or not an array of SkipItems.\n */\nexport function validateSkip(json: string): Array<SkipItem> {\n const parsed: unknown = JSON.parse(json);\n if (!Array.isArray(parsed) || !parsed.every(isSkipItem)) {\n throw new TypeError(\n '--skip must be a JSON array of {component, variant?} or {storyFile} objects',\n );\n }\n return parsed;\n}\n\n/**\n * Parses a JSON string into an array of SkipItems. Returns an empty array on\n * any parse error or if the value is not a valid array of SkipItems.\n */\nexport function parseSkip(json?: string): Array<SkipItem> {\n if (!json) return [];\n try {\n return validateSkip(json);\n } catch {\n return [];\n }\n}\n\n/**\n * Converts an array of SkipItems into a SkipSet for efficient lookups.\n * Items with a `storyFile` key (unresolved) are silently ignored.\n */\nexport function toSkipSet(items: Array<SkipItem>): SkipSet {\n const componentOnly = new Set<string>();\n const componentVariant = new Set<string>();\n for (const item of items) {\n if (!('component' in item)) continue;\n const { component, variant } = item;\n if (variant === undefined) {\n componentOnly.add(component);\n } else {\n componentVariant.add(`${component}\\0${variant}`);\n }\n }\n return [componentOnly, componentVariant];\n}\n\n/**\n * Returns true if the given component+variant should be skipped according to\n * the SkipSet.\n */\nexport function isInSkipSet(\n [componentOnly, componentVariant]: SkipSet,\n component: string,\n variant: string,\n): boolean {\n return componentOnly.has(component) || componentVariant.has(`${component}\\0${variant}`);\n}\n", "import {\n isInSkipSet,\n parseSkip,\n toSkipSet,\n} from '../isomorphic/parseSkip.ts';\nimport type { NextExampleResult, WindowWithHappo } from '../isomorphic/types.ts';\n\ninterface HappoStaticExample extends NextExampleResult {\n component: Required<NextExampleResult>['component'];\n variant: Required<NextExampleResult>['variant'];\n render: Required<NextExampleResult>['render'];\n targets?: Array<string>;\n}\n\nlet examples: Array<HappoStaticExample> = [];\nlet currentIndex = 0;\n\nconst happoStatic = {\n init(win: WindowWithHappo = globalThis.window): void {\n win.happo = {\n ...win.happo,\n\n init: ({ targetName, chunk, only }) => {\n currentIndex = 0;\n\n if (only) {\n examples = examples.filter(\n (e) => e.component === only.component && e.variant === only.variant,\n );\n } else if (chunk) {\n const examplesPerChunk = Math.ceil(examples.length / chunk.total);\n const startIndex = chunk.index * examplesPerChunk;\n const endIndex = startIndex + examplesPerChunk;\n examples = examples.slice(startIndex, endIndex);\n }\n\n if (targetName) {\n examples = examples.filter((example) => {\n if (!example.targets || !Array.isArray(example.targets)) {\n // This story hasn't been filtered for specific targets\n return true;\n }\n\n return example.targets.includes(targetName);\n });\n }\n },\n\n nextExample: async () => {\n const
|
|
5
|
-
"mappings": ";AASA,SAAS,WAAW,MAAiC;AACnD,MAAI,OAAO,SAAS,YAAY,SAAS,KAAM,QAAO;AACtD,QAAM,SAAS;AACf,QAAM,eAAe,OAAO,OAAO,WAAW,MAAM;AACpD,QAAM,eAAe,OAAO,OAAO,WAAW,MAAM;AACpD,MAAI,gBAAgB,aAAc,QAAO;AACzC,MAAI,aAAc,QAAO,OA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A pair of Sets used for O(1) skip lookups.\n * - [0]: component-only skips (match all variants of the component)\n * - [1]: component+variant skips (match a specific variant, keyed as \"component\\0variant\")\n */\nexport type SkipSet = readonly [componentOnly: Set<string>, componentVariant: Set<string>];\n\nfunction isSkipItem(item: unknown): item is SkipItem {\n if (typeof item !== 'object' || item === null) return false;\n const record = item as Record<string, unknown>;\n const hasComponent = typeof record['component'] === 'string';\n const hasStoryFile = typeof record['storyFile'] === 'string';\n if (hasComponent && hasStoryFile) return false;\n if (hasStoryFile) return record['variant'] === undefined;\n if (hasComponent) return record['variant'] === undefined || typeof record['variant'] === 'string';\n return false;\n}\n\n/**\n * Parses and validates a JSON string, returning an array of SkipItems.\n * Throws a TypeError if the JSON is invalid or not an array of SkipItems.\n */\nexport function validateSkip(json: string): Array<SkipItem> {\n const parsed: unknown = JSON.parse(json);\n if (!Array.isArray(parsed) || !parsed.every(isSkipItem)) {\n throw new TypeError(\n '--skip must be a JSON array of {component, variant?} or {storyFile} objects',\n );\n }\n return parsed;\n}\n\n/**\n * Parses a JSON string into an array of SkipItems. Returns an empty array on\n * any parse error or if the value is not a valid array of SkipItems.\n */\nexport function parseSkip(json?: string): Array<SkipItem> {\n if (!json) return [];\n try {\n return validateSkip(json);\n } catch {\n return [];\n }\n}\n\n/**\n * Converts an array of SkipItems into a SkipSet for efficient lookups.\n * Items with a `storyFile` key (unresolved) are silently ignored.\n */\nexport function toSkipSet(items: Array<SkipItem>): SkipSet {\n const componentOnly = new Set<string>();\n const componentVariant = new Set<string>();\n for (const item of items) {\n if (!('component' in item)) continue;\n const { component, variant } = item;\n if (variant === undefined) {\n componentOnly.add(component);\n } else {\n componentVariant.add(`${component}\\0${variant}`);\n }\n }\n return [componentOnly, componentVariant];\n}\n\n/**\n * Returns true if the given component+variant should be skipped according to\n * the SkipSet.\n */\nexport function isInSkipSet(\n [componentOnly, componentVariant]: SkipSet,\n component: string,\n variant: string,\n): boolean {\n return componentOnly.has(component) || componentVariant.has(`${component}\\0${variant}`);\n}\n", "import {\n isInSkipSet,\n parseSkip,\n toSkipSet,\n} from '../isomorphic/parseSkip.ts';\nimport type { NextExampleResult, WindowWithHappo } from '../isomorphic/types.ts';\n\ninterface HappoStaticExample extends NextExampleResult {\n component: Required<NextExampleResult>['component'];\n variant: Required<NextExampleResult>['variant'];\n render: Required<NextExampleResult>['render'];\n targets?: Array<string>;\n}\n\nlet examples: Array<HappoStaticExample> = [];\nlet currentIndex = 0;\n\nconst happoStatic = {\n init(win: WindowWithHappo = globalThis.window): void {\n win.happo = {\n ...win.happo,\n\n init: ({ targetName, chunk, only }) => {\n currentIndex = 0;\n\n // Read the skip set from the DOM and filter `examples` once, here\n // at init time. An example's `render` may replace the entire\n // document (e.g. `document.open()`/`write()`/`close()`), which\n // would destroy the `<script id=\"happo-skipped\">` tag injected\n // into iframe.html. Filtering up front means the skip list is\n // robust against any DOM mutation an example might perform.\n const happoSkippedEl =\n typeof document === 'undefined'\n ? null\n : document.getElementById('happo-skipped');\n const skipSet = toSkipSet(\n parseSkip(happoSkippedEl?.textContent ?? undefined),\n );\n examples = examples.filter(\n (e) => !isInSkipSet(skipSet, e.component, e.variant),\n );\n\n if (only) {\n examples = examples.filter(\n (e) => e.component === only.component && e.variant === only.variant,\n );\n } else if (chunk) {\n const examplesPerChunk = Math.ceil(examples.length / chunk.total);\n const startIndex = chunk.index * examplesPerChunk;\n const endIndex = startIndex + examplesPerChunk;\n examples = examples.slice(startIndex, endIndex);\n }\n\n if (targetName) {\n examples = examples.filter((example) => {\n if (!example.targets || !Array.isArray(example.targets)) {\n // This story hasn't been filtered for specific targets\n return true;\n }\n\n return example.targets.includes(targetName);\n });\n }\n },\n\n nextExample: async () => {\n const example = examples[currentIndex];\n\n if (!example) {\n // we're done\n return;\n }\n\n if (example.render) {\n await example.render();\n }\n currentIndex++;\n\n return {\n component: example.component,\n variant: example.variant,\n targets: example.targets,\n waitForContent: example.waitForContent,\n };\n },\n };\n },\n\n registerExample(props: HappoStaticExample): void {\n if (!props.component) {\n throw new Error('Missing `component` property');\n }\n if (!props.variant) {\n throw new Error('Missing `variant` property');\n }\n if (!props.render) {\n throw new Error('Missing `render` property');\n }\n\n const compType = typeof props.component;\n if (compType !== 'string') {\n throw new Error(`Property \\`component\\` must be a string. Got \"${compType}\".`);\n }\n\n const varType = typeof props.variant;\n if (varType !== 'string') {\n throw new Error(`Property \\`variant\\` must be a string. Got \"${varType}\".`);\n }\n\n const rendType = typeof props.render;\n if (rendType !== 'function') {\n throw new Error(`Property \\`render\\` must be a function. Got \"${rendType}\".`);\n }\n\n examples.push(props);\n },\n\n reset(): void {\n examples = [];\n currentIndex = 0;\n },\n};\n\nexport default happoStatic;\n"],
|
|
5
|
+
"mappings": ";AASA,SAAS,WAAW,MAAiC;AACnD,MAAI,OAAO,SAAS,YAAY,SAAS,KAAM,QAAO;AACtD,QAAM,SAAS;AACf,QAAM,eAAe,OAAO,OAAO,WAAW,MAAM;AACpD,QAAM,eAAe,OAAO,OAAO,WAAW,MAAM;AACpD,MAAI,gBAAgB,aAAc,QAAO;AACzC,MAAI,aAAc,QAAO,OAAO,SAAS,MAAM;AAC/C,MAAI,aAAc,QAAO,OAAO,SAAS,MAAM,UAAa,OAAO,OAAO,SAAS,MAAM;AACzF,SAAO;AACT;AAMO,SAAS,aAAa,MAA+B;AAC1D,QAAM,SAAkB,KAAK,MAAM,IAAI;AACvC,MAAI,CAAC,MAAM,QAAQ,MAAM,KAAK,CAAC,OAAO,MAAM,UAAU,GAAG;AACvD,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAMO,SAAS,UAAU,MAAgC;AACxD,MAAI,CAAC,KAAM,QAAO,CAAC;AACnB,MAAI;AACF,WAAO,aAAa,IAAI;AAAA,EAC1B,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACF;AAMO,SAAS,UAAU,OAAiC;AACzD,QAAM,gBAAgB,oBAAI,IAAY;AACtC,QAAM,mBAAmB,oBAAI,IAAY;AAC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
|
package/dist/cypress/task.js
CHANGED
|
@@ -23,7 +23,7 @@ import asyncRetry from "async-retry";
|
|
|
23
23
|
// package.json
|
|
24
24
|
var package_default = {
|
|
25
25
|
name: "happo",
|
|
26
|
-
version: "6.10.
|
|
26
|
+
version: "6.10.8",
|
|
27
27
|
description: "Catch unexpected visual and accessibility changes and UI bugs",
|
|
28
28
|
license: "MIT",
|
|
29
29
|
repository: {
|
|
@@ -93,6 +93,7 @@ var package_default = {
|
|
|
93
93
|
"storybook:dev": "storybook dev --config-dir src/storybook/__tests__/storybook-app -p ${PORT:-6007}",
|
|
94
94
|
test: "node --env-file-if-exists=.env.local ./scripts/test.ts",
|
|
95
95
|
"test:custom": "pnpm build:dist && pnpm build:custom && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.custom.config.ts",
|
|
96
|
+
"test:custom:skipped": 'pnpm build:dist && pnpm build:custom && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.custom.config.ts --project custom-skipped --skip "$(node ./scripts/getCustomSkip.ts)"',
|
|
96
97
|
"test:cypress": "pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.cypress.config.ts e2e -- cypress run -C src/cypress/__cypress__/cypress.config.ts",
|
|
97
98
|
"test:cypress:open": "cypress open -C src/cypress/__cypress__/cypress.config.ts",
|
|
98
99
|
"test:playwright": "pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright.config.ts e2e -- playwright test",
|