-
Notifications
You must be signed in to change notification settings - Fork 2
Migrate js clients #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
a2ffe1c
init
kb-kerem b3f2c06
init
kb-kerem 8bb7a53
init
kb-kerem 84a9fef
Merge branch 'main' into migrate-js-clients
kb-kerem b5d3151
Merge branch 'main' into migrate-js-clients
kb-kerem cc0c359
js setup
kb-kerem c4ab48b
js setup
kb-kerem 9d5440a
fix js tests
kb-kerem e6b8ea9
remove unused
kb-kerem a68aaff
update to latest src
kb-kerem fbd52bb
update to latest src
kb-kerem d7d57a7
update to latest src
kb-kerem e626ea4
fix wdio build
kb-kerem 7519f3d
fix storybook build
kb-kerem 610e532
cleanup yarn workspace
kb-kerem b59b67a
latest from iris
kb-kerem ec9011a
Merge branch 'main' into migrate-js-clients
kb-kerem dbc3c15
newline
kb-kerem 12b5de3
docs(changeset): migrate source to github
kb-kerem ffd5564
use snapshots
kb-kerem 0bb9563
update to latest src
kb-kerem a851bad
update to latest src
kb-kerem b058188
Merge branch 'main' into migrate-js-clients
kb-kerem b1cc9f3
drop lerna in favour of npm workspaces
kb-kerem ad705e7
remove husky
kb-kerem ea43933
update yarn.lock
kb-kerem e7bc858
Merge branch 'main' into migrate-js-clients
kb-kerem 85adbe7
update src
kb-kerem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: JS (build) | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'visual-js/**' | ||
- .github/workflows/js-build.yml | ||
pull_request: | ||
paths: | ||
- 'visual-js/**' | ||
- .github/workflows/js-build.yml | ||
|
||
defaults: | ||
run: | ||
working-directory: visual-js | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
- name: Build with lerna | ||
run: | | ||
corepack enable | ||
yarn install | ||
npx lerna run lint | ||
npx lerna run build | ||
npx lerna run test | ||
env: | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: JS (release) | ||
|
||
on: | ||
workflow_dispatch: {} | ||
|
||
defaults: | ||
run: | ||
working-directory: visual-js | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
- name: Setup Git | ||
if: ${{ steps.prep.outputs.tag_name == '' }} | ||
run: | | ||
git config --global user.name "sauce-visual-bot" | ||
git config --global user.email "[email protected]" | ||
- name: Build | ||
run: | | ||
corepack enable | ||
yarn install | ||
npx lerna run build | ||
- name: upgrade & publish version(s) | ||
## TODO version and publish commands need to be adjusted when we're confident with the pipeline | ||
run: | | ||
npx changeset version --snapshot migration | ||
npx changeset publish --no-git-tag --snapshot | ||
## TODO enable the git tagging when we're confident with the pipeline | ||
##- name: Push to git | ||
## run: | | ||
## git push --follow-tags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": true, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [], | ||
"changedFilePatterns": [ | ||
"visual*/**", | ||
"package.json" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@saucelabs/nightwatch-sauce-visual-service": patch | ||
"@saucelabs/visual-storybook": patch | ||
"@saucelabs/cypress-visual-plugin": patch | ||
"@saucelabs/wdio-sauce-visual-service": patch | ||
"@saucelabs/visual": patch | ||
--- | ||
|
||
migrate source to github |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
node_modules | ||
.DS_Store | ||
yarn-error.log | ||
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored (not using zero install yet) | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
( | ||
cd js | ||
npx lint-staged | ||
) | ||
|
||
( | ||
cd js-wdio | ||
npx lint-staged | ||
) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs | ||
spec: '@yarnpkg/plugin-version' | ||
|
||
pnpMode: loose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "node_modules/lerna/schemas/lerna-schema.json", | ||
"version": "0.0.0", | ||
"npmClient": "yarn" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "visual-clients-workspace", | ||
"private": true, | ||
"workspaces": [ | ||
"visual", | ||
"visual-storybook", | ||
"visual-wdio", | ||
"visual-cypress", | ||
"visual-nightwatch" | ||
], | ||
"devDependencies": { | ||
"husky": "8.0.0", | ||
"lerna": "^8.1.2" | ||
}, | ||
"scripts": { | ||
"prepare": "cd ../.. && husky install clients/js/.husky" | ||
kb-kerem marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
"lint-staged": { | ||
"**/*.{js,jsx,ts,tsx}": [ | ||
"yarn lint" | ||
] | ||
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"@changesets/cli": "^2.27.1" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "./tsconfig.prod.json", | ||
"compilerOptions": { | ||
"inlineSourceMap": true, | ||
"esModuleInterop": true | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"extends": "@tsconfig/node18/tsconfig.json", | ||
|
||
"compilerOptions": { | ||
"outDir": "./build", | ||
"allowJs": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"resolveJsonModule": true, | ||
"removeComments": false, | ||
"strictFunctionTypes": false, | ||
"experimentalDecorators": true, | ||
"esModuleInterop": true, | ||
"moduleResolution": "Node", | ||
"module": "ESNext", | ||
"lib": ["dom", "es2021"], | ||
"types": ["node"] | ||
}, | ||
|
||
"exclude": [ | ||
"../node_modules", | ||
"__mocks__", | ||
"packages/**/node_modules", | ||
"coverage", | ||
"examples", | ||
"/*.js" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module.exports = { | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.cjs', 'build'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
|
||
// Allow unused vars that start with _ | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_", | ||
"caughtErrorsIgnorePattern": "^_" | ||
} | ||
], | ||
}, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
.work | ||
build/ | ||
coverage/ | ||
yarn.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Sauce Labs Visual for Cypress | ||
|
||
This package is Sauce Labs Visual integration for Cypress.<br /> | ||
It comes as both a plugin and commands that will be made available for your tests. | ||
|
||
## Installation & Usage | ||
|
||
View installation and usage instructions on the [Sauce Docs website](https://docs.saucelabs.com/visual-testing/integrations/cypress/). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"name": "@saucelabs/cypress-visual-plugin", | ||
"version": "0.3.0", | ||
"description": "Cypress plugin for Sauce Visual Testing", | ||
"main": "build/index.cjs", | ||
"module": "build/index.js", | ||
"types": "build/index.d.ts", | ||
"type": "module", | ||
"license": "MIT", | ||
"files": [ | ||
"build", | ||
"README.md" | ||
], | ||
"engines": { | ||
"node": "^16.13 || >=18" | ||
}, | ||
"typeScriptVersion": "5.1.6", | ||
"keywords": [ | ||
"cypress", | ||
"saucelabs", | ||
"visual" | ||
], | ||
"exports": { | ||
".": { | ||
"require": "./build/index.cjs", | ||
"import": "./build/index.js", | ||
"types": "./build/index.d.ts" | ||
}, | ||
"./commands": { | ||
"require": "./build/commands.cjs", | ||
"import": "./build/commands.js", | ||
"types": "./build/commands.d.ts" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"peerDependencies": { | ||
"cypress": "^12.0.0 || ^13.0.0" | ||
}, | ||
"dependencies": { | ||
"@saucelabs/visual": "0.3.0", | ||
"chalk": "^5.3.0", | ||
"exponential-backoff": "^3.1.1", | ||
"macos-release": "^3.2.0", | ||
"node-fetch": "^3.3.1", | ||
"tsup": "^7.2.0" | ||
}, | ||
"tsup": { | ||
"entry": [ | ||
"./src/commands.ts", | ||
"./src/index.ts" | ||
], | ||
"dts": true, | ||
"outDir": "./build", | ||
"format": [ | ||
"cjs", | ||
"esm" | ||
], | ||
"noExternal": [ | ||
"chalk", | ||
"macos-release" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@tsconfig/node18": "^2.0.1", | ||
"@types/cypress": "^1.1.3", | ||
"@types/node": "^20.4.4", | ||
"@typescript-eslint/eslint-plugin": "^5.59.1", | ||
"@typescript-eslint/parser": "^5.59.1", | ||
"eslint": "^8.0.1", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"jest": "^29.5.0", | ||
"jest-junit-reporter": "^1.1.0", | ||
"prettier": "^2.8.8", | ||
"ts-node": "^10.9.1", | ||
"tsc-watch": "^6.0.4", | ||
"typescript": "^5.1.6" | ||
}, | ||
"scripts": { | ||
"build": "tsup", | ||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"", | ||
"test-ignored": "jest --collect-coverage", | ||
"watch": "tsc-watch --declaration -p .", | ||
"test": "node ./test-cjs.cjs" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.