Skip to content

Commit

Permalink
chore(workspace): Bump vitest individually and change command (#3679)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock authored Sep 22, 2024
1 parent f26a346 commit 6373f52
Show file tree
Hide file tree
Showing 27 changed files with 513 additions and 1,032 deletions.
3 changes: 1 addition & 2 deletions exchanges/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
},
"devDependencies": {
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"vitest": "^0.30.1"
"graphql": "^16.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
3 changes: 1 addition & 2 deletions exchanges/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
},
"devDependencies": {
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"vitest": "^0.30.1"
"graphql": "^16.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
3 changes: 1 addition & 2 deletions exchanges/execute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
},
"devDependencies": {
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"vitest": "^0.30.1"
"graphql": "^16.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
7 changes: 3 additions & 4 deletions exchanges/graphcache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,15 @@
"wonka": "^6.3.2"
},
"devDependencies": {
"@cypress/react": "^7.0.2",
"@cypress/react": "^8.0.2",
"@urql/core": "workspace:*",
"@urql/exchange-execute": "workspace:*",
"@urql/introspection": "workspace:*",
"cypress": "^12.8.1",
"cypress": "^13.14.0",
"graphql": "^16.6.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"urql": "workspace:*",
"vitest": "^0.30.1"
"urql": "workspace:*"
},
"publishConfig": {
"access": "public",
Expand Down
14 changes: 7 additions & 7 deletions exchanges/graphcache/src/store/__snapshots__/store.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

exports[`Store with storage > should be able to persist embedded data 1`] = `
{
"Query%2eappointment({\\"id\\":\\"1\\"}).__typename": "\\"Appointment\\"",
"Query%2eappointment({\\"id\\":\\"1\\"}).info": "\\"urql meeting\\"",
"Query.appointment({\\"id\\":\\"1\\"})": ":\\"Query.appointment({\\\\\\"id\\\\\\":\\\\\\"1\\\\\\"})\\"",
"Query%2eappointment({"id":"1"}).__typename": ""Appointment"",
"Query%2eappointment({"id":"1"}).info": ""urql meeting"",
"Query.appointment({"id":"1"})": ":"Query.appointment({\\"id\\":\\"1\\"})"",
}
`;

exports[`Store with storage > should be able to store and rehydrate data 1`] = `
{
"Appointment:1.__typename": "\\"Appointment\\"",
"Appointment:1.id": "\\"1\\"",
"Appointment:1.info": "\\"urql meeting\\"",
"Query.appointment({\\"id\\":\\"1\\"})": ":\\"Appointment:1\\"",
"Appointment:1.__typename": ""Appointment"",
"Appointment:1.id": ""1"",
"Appointment:1.info": ""urql meeting"",
"Query.appointment({"id":"1"})": ":"Appointment:1"",
}
`;
4 changes: 2 additions & 2 deletions exchanges/graphcache/src/store/data.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('inspectFields', () => {
"arguments": {
"id": "1",
},
"fieldKey": "todo({\\"id\\":\\"1\\"})",
"fieldKey": "todo({"id":"1"})",
"fieldName": "todo",
},
{
Expand All @@ -166,7 +166,7 @@ describe('inspectFields', () => {
"arguments": {
"id": "1",
},
"fieldKey": "hasTodo({\\"id\\":\\"1\\"})",
"fieldKey": "hasTodo({"id":"1"})",
"fieldName": "hasTodo",
},
]
Expand Down
3 changes: 1 addition & 2 deletions exchanges/persisted/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
},
"devDependencies": {
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"vitest": "^0.30.1"
"graphql": "^16.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
3 changes: 1 addition & 2 deletions exchanges/populate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
},
"devDependencies": {
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"vitest": "^0.30.1"
"graphql": "^16.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion exchanges/populate/src/populateExchange.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ describe('on query -> mutation', () => {
__typename
id
text
createdAt(timezone: \\"GMT+1\\")
createdAt(timezone: "GMT+1")
}
}"
`);
Expand Down
3 changes: 1 addition & 2 deletions exchanges/refocus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
"devDependencies": {
"@types/react": "^17.0.4",
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"vitest": "^0.30.1"
"graphql": "^16.0.0"
},
"peerDependencies": {
"@urql/core": "^5.0.0"
Expand Down
3 changes: 1 addition & 2 deletions exchanges/request-policy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
},
"devDependencies": {
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"vitest": "^0.30.1"
"graphql": "^16.0.0"
},
"peerDependencies": {
"@urql/core": "^5.0.0"
Expand Down
3 changes: 1 addition & 2 deletions exchanges/retry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
},
"devDependencies": {
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"vitest": "^0.30.1"
"graphql": "^16.0.0"
},
"peerDependencies": {
"@urql/core": "^5.0.0"
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"test": "test -z $CI && vitest || pnpm -r --parallel run test run",
"test": "test -z $CI && vitest || vitest",
"check": "tsc",
"lint": "eslint --ext=js,jsx,ts,tsx .",
"build": "node ./scripts/actions/build-all.mjs",
Expand Down Expand Up @@ -52,7 +52,6 @@
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"styled-components": "^5.2.3",
"vite": "^3.2.4",
"wonka": "^6.3.2"
}
},
Expand Down
3 changes: 0 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,5 @@
"publishConfig": {
"access": "public",
"provenance": true
},
"devDependencies": {
"vitest": "^0.30.1"
}
}
2 changes: 1 addition & 1 deletion packages/core/src/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ describe('executeQuery', () => {
expect(true).toBeFalsy();
} catch (e: any) {
expect(e.message).toMatchInlineSnapshot(
`"Expected operation of type \\"query\\" but found \\"mutation\\""`
`"Expected operation of type "query" but found "mutation""`
);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,4 +460,4 @@ exports[`on success > returns response data 1`] = `
}
`;

exports[`on success > returns response data 2`] = `"{\\"operationName\\":\\"getUser\\",\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}"`;
exports[`on success > returns response data 2`] = `"{"operationName":"getUser","query":"query getUser($name: String) {\\n user(name: $name) {\\n id\\n firstName\\n lastName\\n }\\n}","variables":{"name":"Clara"}}"`;
4 changes: 2 additions & 2 deletions packages/core/src/gql.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { parse, print } from '@0no-co/graphql.web';
import { vi, expect, it, beforeEach, SpyInstance } from 'vitest';
import { vi, expect, it, beforeEach, MockInstance } from 'vitest';

import { gql } from './gql';
import { keyDocument } from './utils';

let warn: SpyInstance;
let warn: MockInstance;

beforeEach(() => {
warn = vi.spyOn(console, 'warn');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -758,23 +758,7 @@ exports[`on success > uses the mock fetch if given 1`] = `
"results": [
{
"type": "return",
"value": {
"headers": {
"get": [Function],
},
"status": 200,
"text": [MockFunction spy] {
"calls": [
[],
],
"results": [
{
"type": "return",
"value": "{\\"status\\":200,\\"data\\":{\\"data\\":{\\"user\\":1200}}}",
},
],
},
},
"value": Promise {},
},
],
},
Expand Down
10 changes: 4 additions & 6 deletions packages/core/src/internal/fetchOptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('makeFetchOptions', () => {
const body = makeFetchBody(queryOperation);
expect(makeFetchOptions(queryOperation, body)).toMatchInlineSnapshot(`
{
"body": "{\\"operationName\\":\\"getUser\\",\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}",
"body": "{"operationName":"getUser","query":"query getUser($name: String) {\\n user(name: $name) {\\n id\\n firstName\\n lastName\\n }\\n}","variables":{"name":"Clara"}}",
"headers": {
"accept": "application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed",
"content-type": "application/json",
Expand All @@ -158,7 +158,7 @@ describe('makeFetchOptions', () => {

expect(makeFetchOptions(operation, body)).toMatchInlineSnapshot(`
{
"body": "{\\"operationName\\":\\"getUser\\",\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}",
"body": "{"operationName":"getUser","query":"query getUser($name: String) {\\n user(name: $name) {\\n id\\n firstName\\n lastName\\n }\\n}","variables":{"name":"Clara"}}",
"headers": {
"accept": "application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed",
"content-type": "application/json",
Expand All @@ -180,7 +180,7 @@ describe('makeFetchOptions', () => {

expect(makeFetchOptions(operation, body)).toMatchInlineSnapshot(`
{
"body": "{\\"operationName\\":\\"getUser\\",\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}",
"body": "{"operationName":"getUser","query":"query getUser($name: String) {\\n user(name: $name) {\\n id\\n firstName\\n lastName\\n }\\n}","variables":{"name":"Clara"}}",
"headers": {
"accept": "application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed",
"content-type": "application/json",
Expand Down Expand Up @@ -239,9 +239,7 @@ describe('makeFetchOptions', () => {
},
});

expect(form.get('map')).toMatchInlineSnapshot(
'"{\\"0\\":[\\"variables.file\\"]}"'
);
expect(form.get('map')).toMatchInlineSnapshot(`"{"0":["variables.file"]}"`);
expect(form.get('0')).toBeInstanceOf(Blob);
});
});
6 changes: 3 additions & 3 deletions packages/core/src/utils/request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe('stringifyDocument ', () => {
.toMatchInlineSnapshot(`
"{
field(arg:
\\"test #1\\")
"test #1")
}"
`);
});
Expand All @@ -197,10 +197,10 @@ describe('stringifyDocument ', () => {
.toMatchInlineSnapshot(`
"{
field(arg:
\\"\\"\\"
"""
hello
#hello
\\"\\"\\")
""")
}"
`);
});
Expand Down
3 changes: 1 addition & 2 deletions packages/preact-urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
"@testing-library/preact": "^2.0.0",
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"preact": "^10.13.0",
"vitest": "^0.30.1"
"preact": "^10.13.0"
},
"peerDependencies": {
"@urql/core": "^5.0.0",
Expand Down
8 changes: 3 additions & 5 deletions packages/react-urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,20 @@
"prepublishOnly": "run-s clean build"
},
"devDependencies": {
"@cypress/react": "^7.0.2",
"@cypress/react": "^8.0.2",
"@cypress/vite-dev-server": "^5.0.4",
"@testing-library/react": "^11.1.1",
"@testing-library/react-hooks": "^5.1.2",
"@types/react": "^17.0.4",
"@types/react-test-renderer": "^17.0.1",
"@urql/core": "workspace:*",
"cypress": "^12.8.1",
"cypress": "^13.14.0",
"graphql": "^16.6.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-is": "^17.0.1",
"react-ssr-prepass": "^1.1.2",
"react-test-renderer": "^17.0.1",
"vite": "^3.2.4",
"vitest": "^0.30.1"
"react-test-renderer": "^17.0.1"
},
"peerDependencies": {
"@urql/core": "^5.0.0",
Expand Down
4 changes: 1 addition & 3 deletions packages/solid-urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"jsdom": "^22.1.0",
"vite-plugin-solid": "^2.7.0",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^0.30.1"
"vite-plugin-solid": "^2.7.0"
},
"peerDependencies": {
"@urql/core": "^5.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/storage-rn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
"@react-native-async-storage/async-storage": "^1.21.0",
"@react-native-community/netinfo": "^11.2.1",
"@urql/core": "workspace:*",
"@urql/exchange-graphcache": "workspace:*",
"vitest": "^0.30.1"
"@urql/exchange-graphcache": "workspace:*"
},
"publishConfig": {
"access": "public",
Expand Down
3 changes: 1 addition & 2 deletions packages/svelte-urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
"devDependencies": {
"@urql/core": "workspace:*",
"graphql": "^16.0.0",
"svelte": "^3.20.0",
"vitest": "^0.30.1"
"svelte": "^3.20.0"
},
"publishConfig": {
"access": "public",
Expand Down
1 change: 0 additions & 1 deletion packages/vue-urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"@urql/core": "workspace:*",
"@vue/test-utils": "^2.3.0",
"graphql": "^16.0.0",
"vitest": "^0.30.1",
"vue": "^3.2.47"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit 6373f52

Please sign in to comment.