Skip to content

Commit

Permalink
[Cypress] Augment types to better support TypeScript Cypress configur…
Browse files Browse the repository at this point in the history
…ations (#147)

Co-authored-by: Logan Graham <logan.graham@saucelabs.com>
  • Loading branch information
omacranger and Logan Graham authored Oct 4, 2024
1 parent 4b4a709 commit 704c8a3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
5 changes: 5 additions & 0 deletions visual-js/.changeset/tricky-pandas-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@saucelabs/cypress-visual-plugin": patch
---

update types, fix devdep
4 changes: 2 additions & 2 deletions visual-js/visual-cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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": {
Expand Down
4 changes: 4 additions & 0 deletions visual-js/visual-cypress/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import {
PlainRegion,
ResolvedVisualRegion,
SauceConfig,
SauceVisualViewport,
ScreenshotMetadata,
VisualCheckOptions,
Expand All @@ -34,6 +35,9 @@ declare global {

sauceVisualResults(): Chainable<Subject>;
}
interface EndToEndConfigOptions {
saucelabs: SauceConfig;
}
}
}

Expand Down
16 changes: 8 additions & 8 deletions visual-js/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 704c8a3

Please sign in to comment.