Skip to content

Commit

Permalink
use vitest in workspace folders
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Nov 22, 2022
1 parent 71f3754 commit 571f13e
Show file tree
Hide file tree
Showing 21 changed files with 18 additions and 87 deletions.
5 changes: 1 addition & 4 deletions exchanges/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist extras",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"dependencies": {
"@urql/core": ">=3.0.0",
"wonka": "^6.0.0"
Expand Down
5 changes: 1 addition & 4 deletions exchanges/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist extras",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"dependencies": {
"@urql/core": ">=2.3.6",
"wonka": "^6.0.0"
Expand Down
5 changes: 1 addition & 4 deletions exchanges/execute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist extras",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"dependencies": {
"@urql/core": ">=3.0.0",
"wonka": "^6.0.0"
Expand Down
5 changes: 1 addition & 4 deletions exchanges/graphcache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,14 @@
"default-storage/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist extras",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"dependencies": {
"@urql/core": ">=3.0.5",
"wonka": "^6.0.0"
Expand Down
5 changes: 1 addition & 4 deletions exchanges/multipart-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,14 @@
"extras/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist extras",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"dependencies": {
"@urql/core": ">=3.0.0",
"extract-files": "^11.0.0",
Expand Down
5 changes: 1 addition & 4 deletions exchanges/persisted-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist extras",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"dependencies": {
"@urql/core": ">=3.0.0",
"wonka": "^6.0.0"
Expand Down
5 changes: 1 addition & 4 deletions exchanges/populate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,14 @@
"extras/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist extras",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"dependencies": {
"@urql/core": ">=3.0.0",
"wonka": "^6.0.0"
Expand Down
5 changes: 1 addition & 4 deletions exchanges/refocus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"devDependencies": {
"@types/react": "^17.0.4",
"graphql": "^16.0.0"
Expand Down
5 changes: 1 addition & 4 deletions exchanges/request-policy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"devDependencies": {
"graphql": "^16.0.0"
},
Expand Down
5 changes: 1 addition & 4 deletions exchanges/retry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"devDependencies": {
"graphql": "^16.0.0"
},
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-es5": "^1.5.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
Expand Down
5 changes: 1 addition & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,14 @@
"internal/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"devDependencies": {
"graphql": "^16.0.0"
},
Expand Down
5 changes: 1 addition & 4 deletions packages/introspection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"devDependencies": {
"graphql": "^16.0.0"
},
Expand Down
6 changes: 1 addition & 5 deletions packages/next-urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset",
"testEnvironment": "node"
},
"devDependencies": {
"@types/enzyme": "^3.10.3",
"@types/enzyme-adapter-react-16": "^1.0.5",
Expand Down
5 changes: 1 addition & 4 deletions packages/preact-urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"devDependencies": {
"@testing-library/preact": "^2.0.0",
"graphql": "^16.0.0",
Expand Down
5 changes: 1 addition & 4 deletions packages/react-urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"devDependencies": {
"@cypress/react": "^7.0.1",
"@cypress/vite-dev-server": "^4.0.1",
Expand Down
3 changes: 0 additions & 3 deletions packages/storage-rn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"devDependencies": {
"@react-native-async-storage/async-storage": "^1.15.5",
"@react-native-community/netinfo": "^6.0.0",
Expand Down
5 changes: 1 addition & 4 deletions packages/svelte-urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"peerDependencies": {
"graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
"svelte": "^3.0.0"
Expand Down
5 changes: 1 addition & 4 deletions packages/vue-urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,14 @@
"dist/"
],
"scripts": {
"test": "jest",
"test": "vitest --config ../../vitest.config.ts",
"clean": "rimraf dist",
"check": "tsc --noEmit",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "rollup -c ../../scripts/rollup/config.mjs",
"prepare": "node ../../scripts/prepare/index.js",
"prepublishOnly": "run-s clean build"
},
"jest": {
"preset": "../../scripts/jest/preset"
},
"devDependencies": {
"graphql": "^16.0.0",
"vue": "^3.0.11"
Expand Down
6 changes: 0 additions & 6 deletions scripts/eslint/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ module.exports = {
plugins: [
'react-hooks',
'prettier',
'jest',
'es5',
],
rules: {
Expand Down Expand Up @@ -58,11 +57,6 @@ module.exports = {
'es5/no-for-of': 'off',
'es5/no-generators': 'off',
'es5/no-typeof-symbol': 'off',

'jest/no-disabled-tests': 'error',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'warn',
'jest/consistent-test-it': ['warn', { fn: 'it' }],
}
}
],
Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2870,7 +2870,7 @@
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/[email protected]", "@typescript-eslint/experimental-utils@^4.0.1":
"@typescript-eslint/[email protected]":
version "4.22.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz#68765167cca531178e7b650a53456e6e0bef3b1f"
integrity sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg==
Expand Down Expand Up @@ -6875,13 +6875,6 @@ eslint-plugin-import@^2.22.0:
resolve "^1.17.0"
tsconfig-paths "^3.9.0"

eslint-plugin-jest@^24.3.6:
version "24.3.6"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173"
integrity sha512-WOVH4TIaBLIeCX576rLcOgjNXqP+jNlCiEmRgFTfQtJ52DpwnIQKAVGlGPAN7CZ33bW6eNfHD6s8ZbEUTQubJg==
dependencies:
"@typescript-eslint/experimental-utils" "^4.0.1"

eslint-plugin-prettier@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz#cdbad3bf1dbd2b177e9825737fe63b476a08f0c7"
Expand Down

0 comments on commit 571f13e

Please sign in to comment.