From fadd50fdbd2e76fd317fce5165668465333c09c8 Mon Sep 17 00:00:00 2001 From: Logan Graham Date: Fri, 4 Oct 2024 13:57:36 -0400 Subject: [PATCH 1/3] Augment cypress E2E options with sauce config for better TypeScript support move devdependency into proper location --- visual-js/visual-cypress/package.json | 4 ++-- visual-js/visual-cypress/src/commands.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/visual-js/visual-cypress/package.json b/visual-js/visual-cypress/package.json index 5ec566e2..331510db 100644 --- a/visual-js/visual-cypress/package.json +++ b/visual-js/visual-cypress/package.json @@ -41,8 +41,7 @@ "chalk": "^5.3.0", "exponential-backoff": "^3.1.1", "macos-release": "^3.2.0", - "node-fetch": "^3.3.1", - "tsup": "^7.2.0" + "node-fetch": "^3.3.1" }, "tsup": { "entry": [ @@ -74,6 +73,7 @@ "prettier": "^2.8.8", "ts-node": "^10.9.1", "tsc-watch": "^6.0.4", + "tsup": "^7.2.0", "typescript": "^5.1.6" }, "scripts": { diff --git a/visual-js/visual-cypress/src/commands.ts b/visual-js/visual-cypress/src/commands.ts index 4288dd52..5c17e105 100644 --- a/visual-js/visual-cypress/src/commands.ts +++ b/visual-js/visual-cypress/src/commands.ts @@ -10,6 +10,7 @@ import { PlainRegion, ResolvedVisualRegion, + SauceConfig, SauceVisualViewport, ScreenshotMetadata, VisualCheckOptions, @@ -34,6 +35,9 @@ declare global { sauceVisualResults(): Chainable; } + interface EndToEndConfigOptions { + saucelabs: SauceConfig; + } } } From e1ba9350eaeff9b0bd2663249d2658f1b25e1b8f Mon Sep 17 00:00:00 2001 From: Logan Graham Date: Fri, 4 Oct 2024 14:04:34 -0400 Subject: [PATCH 2/3] docs(changeset): update types, fix devdep --- visual-js/.changeset/tricky-pandas-doubt.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 visual-js/.changeset/tricky-pandas-doubt.md diff --git a/visual-js/.changeset/tricky-pandas-doubt.md b/visual-js/.changeset/tricky-pandas-doubt.md new file mode 100644 index 00000000..9cafec10 --- /dev/null +++ b/visual-js/.changeset/tricky-pandas-doubt.md @@ -0,0 +1,5 @@ +--- +"@saucelabs/cypress-visual-plugin": patch +--- + +update types, fix devdep From 3fc647e83d168d92dcb754b78ea01313e672cc22 Mon Sep 17 00:00:00 2001 From: Logan Graham Date: Fri, 4 Oct 2024 14:11:03 -0400 Subject: [PATCH 3/3] update yarn.lock --- visual-js/yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/visual-js/yarn.lock b/visual-js/yarn.lock index 45cae758..1703f527 100644 --- a/visual-js/yarn.lock +++ b/visual-js/yarn.lock @@ -3532,7 +3532,7 @@ __metadata: version: 0.0.0-use.local resolution: "@saucelabs/cypress-visual-plugin@workspace:visual-cypress" dependencies: - "@saucelabs/visual": ^0.8.3 + "@saucelabs/visual": ^0.9.0 "@tsconfig/node18": ^2.0.1 "@types/cypress": ^1.1.3 "@types/node": ^20.4.4 @@ -3561,7 +3561,7 @@ __metadata: version: 0.0.0-use.local resolution: "@saucelabs/nightwatch-sauce-visual-service@workspace:visual-nightwatch" dependencies: - "@saucelabs/visual": ^0.8.3 + "@saucelabs/visual": ^0.9.0 "@types/mocha": ^10.0.6 "@typescript-eslint/parser": ^7.11.0 chalk: ^4.1.2 @@ -3577,13 +3577,13 @@ __metadata: languageName: unknown linkType: soft -"@saucelabs/visual-playwright@^0.1.3, @saucelabs/visual-playwright@workspace:visual-playwright": +"@saucelabs/visual-playwright@^0.1.4, @saucelabs/visual-playwright@workspace:visual-playwright": version: 0.0.0-use.local resolution: "@saucelabs/visual-playwright@workspace:visual-playwright" dependencies: "@jest/globals": ^28.0.0 || ^29.0.0 "@playwright/test": ^1.42.1 - "@saucelabs/visual": ^0.8.3 + "@saucelabs/visual": ^0.9.0 "@storybook/types": ^8.0.2 "@tsconfig/node18": ^2.0.0 "@types/node": ^18.13.0 @@ -3612,8 +3612,8 @@ __metadata: resolution: "@saucelabs/visual-storybook@workspace:visual-storybook" dependencies: "@jest/globals": ^28.0.0 || ^29.0.0 - "@saucelabs/visual": ^0.8.3 - "@saucelabs/visual-playwright": ^0.1.3 + "@saucelabs/visual": ^0.9.0 + "@saucelabs/visual-playwright": ^0.1.4 "@storybook/test-runner": ">=0.13.0" "@storybook/types": ^8.0.2 "@tsconfig/node18": ^2.0.0 @@ -3642,7 +3642,7 @@ __metadata: languageName: unknown linkType: soft -"@saucelabs/visual@^0.8.3, @saucelabs/visual@workspace:visual": +"@saucelabs/visual@^0.9.0, @saucelabs/visual@workspace:visual": version: 0.0.0-use.local resolution: "@saucelabs/visual@workspace:visual" dependencies: @@ -3688,7 +3688,7 @@ __metadata: resolution: "@saucelabs/wdio-sauce-visual-service@workspace:visual-wdio" dependencies: "@jest/globals": ^29.7.0 - "@saucelabs/visual": ^0.8.3 + "@saucelabs/visual": ^0.9.0 "@tsconfig/node18": ^2.0.0 "@types/jest": ^29.5.6 "@typescript-eslint/eslint-plugin": ^5.59.1