Skip to content

Commit

Permalink
chore(deps): update all non-major dependencies (#5025)
Browse files Browse the repository at this point in the history
* chore(deps): update all non-major dependencies

* chore(dependencies): updated changesets for modified dependencies

* Go

* Go

* chore(dependencies): updated changesets for modified dependencies

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arda TANRIKULU <[email protected]>
  • Loading branch information
3 people authored Feb 6, 2023
1 parent b5c8f64 commit b09ea28
Show file tree
Hide file tree
Showing 25 changed files with 226 additions and 126 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-tools/apollo-engine-loader': patch
---
dependencies updates:
- Updated dependency [`@ardatan/sync-fetch@^0.0.1` ↗︎](https://www.npmjs.com/package/@ardatan/sync-fetch/v/0.0.1) (from `0.0.1`, in `dependencies`)
- Updated dependency [`@graphql-tools/utils@^9.2.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/9.2.0) (from `9.2.0`, in `dependencies`)
- Updated dependency [`@whatwg-node/fetch@^0.6.9` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.6.9) (from `^0.6.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphql-tools_batch-delegate-5025-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-tools/batch-delegate': patch
---
dependencies updates:
- Updated dependency [`[email protected]` ↗︎](https://www.npmjs.com/package/dataloader/v/2.2.1) (from `2.1.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphql-tools_batch-execute-5025-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-tools/batch-execute': patch
---
dependencies updates:
- Updated dependency [`[email protected]` ↗︎](https://www.npmjs.com/package/dataloader/v/2.2.1) (from `2.1.0`, in `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphql-tools_delegate-5025-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-tools/delegate': patch
---
dependencies updates:
- Updated dependency [`[email protected]` ↗︎](https://www.npmjs.com/package/dataloader/v/2.2.1) (from `2.1.0`, in `dependencies`)
10 changes: 10 additions & 0 deletions .changeset/@graphql-tools_executor-http-5025-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@graphql-tools/executor-http': patch
---
dependencies updates:
- Updated dependency [`@graphql-tools/utils@^9.2.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/9.2.0) (from `9.2.0`, in `dependencies`)
- Updated dependency [`value-or-promise@^1.0.12` ↗︎](https://www.npmjs.com/package/value-or-promise/v/1.0.12) (from `1.0.12`, in `dependencies`)
- Updated dependency [`@whatwg-node/fetch@^0.6.9` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.6.9) (from `0.6.5`, in `dependencies`)
- Updated dependency [`@repeaterjs/repeater@^3.0.4` ↗︎](https://www.npmjs.com/package/@repeaterjs/repeater/v/3.0.4) (from `3.0.4`, in `dependencies`)
- Updated dependency [`dset@^3.1.2` ↗︎](https://www.npmjs.com/package/dset/v/3.1.2) (from `3.1.2`, in `dependencies`)
- Updated dependency [`meros@^1.2.1` ↗︎](https://www.npmjs.com/package/meros/v/1.2.1) (from `1.2.1`, in `dependencies`)
8 changes: 8 additions & 0 deletions .changeset/@graphql-tools_github-loader-5025-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@graphql-tools/github-loader': patch
---
dependencies updates:
- Updated dependency [`@ardatan/sync-fetch@^0.0.1` ↗︎](https://www.npmjs.com/package/@ardatan/sync-fetch/v/0.0.1) (from `0.0.1`, in `dependencies`)
- Updated dependency [`@graphql-tools/utils@^9.2.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/9.2.0) (from `9.2.0`, in `dependencies`)
- Updated dependency [`@graphql-tools/graphql-tag-pluck@^7.4.4` ↗︎](https://www.npmjs.com/package/@graphql-tools/graphql-tag-pluck/v/7.4.4) (from `7.4.4`, in `dependencies`)
- Updated dependency [`@whatwg-node/fetch@^0.6.9` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.6.9) (from `^0.6.0`, in `dependencies`)
14 changes: 14 additions & 0 deletions .changeset/@graphql-tools_url-loader-5025-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@graphql-tools/url-loader': patch
---
dependencies updates:
- Updated dependency [`@graphql-tools/delegate@^9.0.25` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/9.0.25) (from `9.0.25`, in `dependencies`)
- Updated dependency [`@graphql-tools/executor-http@^0.1.4` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor-http/v/0.1.4) (from `0.1.4`, in `dependencies`)
- Updated dependency [`@graphql-tools/executor-graphql-ws@^0.0.9` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor-graphql-ws/v/0.0.9) (from `0.0.9`, in `dependencies`)
- Updated dependency [`@graphql-tools/executor-legacy-ws@^0.0.7` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor-legacy-ws/v/0.0.7) (from `0.0.7`, in `dependencies`)
- Updated dependency [`@graphql-tools/utils@^9.2.0` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/9.2.0) (from `9.2.0`, in `dependencies`)
- Updated dependency [`@graphql-tools/wrap@^9.3.4` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/9.3.4) (from `9.3.4`, in `dependencies`)
- Updated dependency [`@ardatan/sync-fetch@^0.0.1` ↗︎](https://www.npmjs.com/package/@ardatan/sync-fetch/v/0.0.1) (from `0.0.1`, in `dependencies`)
- Updated dependency [`@whatwg-node/fetch@^0.6.9` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.6.9) (from `^0.6.0`, in `dependencies`)
- Updated dependency [`ws@^8.12.0` ↗︎](https://www.npmjs.com/package/ws/v/8.12.0) (from `8.12.0`, in `dependencies`)
- Updated dependency [`isomorphic-ws@^5.0.0` ↗︎](https://www.npmjs.com/package/isomorphic-ws/v/5.0.0) (from `5.0.0`, in `dependencies`)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@changesets/changelog-github": "0.4.8",
"@types/debug": "4.1.7",
"@types/jest": "29.4.0",
"@types/node": "18.11.18",
"@types/node": "18.11.19",
"@typescript-eslint/eslint-plugin": "5.50.0",
"@typescript-eslint/parser": "5.50.0",
"babel-jest": "29.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/batch-delegate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"dependencies": {
"@graphql-tools/delegate": "9.0.25",
"@graphql-tools/utils": "9.2.0",
"dataloader": "2.1.0",
"dataloader": "2.2.1",
"tslib": "^2.4.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/batch-execute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"dependencies": {
"@graphql-tools/utils": "9.2.0",
"dataloader": "2.1.0",
"dataloader": "2.2.1",
"tslib": "^2.4.0",
"value-or-promise": "1.0.12"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/delegate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@graphql-tools/executor": "0.0.13",
"@graphql-tools/schema": "9.0.15",
"@graphql-tools/utils": "9.2.0",
"dataloader": "2.1.0",
"dataloader": "2.2.1",
"tslib": "~2.5.0",
"value-or-promise": "1.0.12"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/executors/apollo-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"tslib": "^2.3.1"
},
"devDependencies": {
"@apollo/client": "3.7.6"
"@apollo/client": "3.7.7"
},
"peerDependencies": {
"graphql": "^15.2.0 || ^16.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ApolloClient, FetchResult, InMemoryCache } from '@apollo/client/core';
import { createYoga, createSchema } from 'graphql-yoga';
import { parse } from 'graphql';
import { ExecutorLink } from '../src/index.js';
import { File } from '@whatwg-node/fetch';
import { buildHTTPExecutor } from '@graphql-tools/executor-http';

describe('Apollo Link', () => {
Expand Down Expand Up @@ -51,7 +50,9 @@ describe('Apollo Link', () => {
const client = new ApolloClient({
link: new ExecutorLink(
buildHTTPExecutor({
fetch: yoga.fetch as any,
fetch: yoga.fetch,
File: yoga.fetchAPI.File,
FormData: yoga.fetchAPI.FormData,
})
),
cache: new InMemoryCache(),
Expand Down Expand Up @@ -107,7 +108,7 @@ describe('Apollo Link', () => {
}
`),
variables: {
file: new File(['Hello World'], 'file.txt', { type: 'text/plain' }),
file: new yoga.fetchAPI.File(['Hello World'], 'file.txt', { type: 'text/plain' }),
},
});
expect(result.errors?.length).toBeFalsy();
Expand Down
12 changes: 6 additions & 6 deletions packages/executors/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
},
"dependencies": {
"@graphql-tools/utils": "9.2.0",
"value-or-promise": "1.0.12",
"@whatwg-node/fetch": "0.6.5",
"@repeaterjs/repeater": "3.0.4",
"dset": "3.1.2",
"meros": "1.2.1",
"@graphql-tools/utils": "^9.2.0",
"value-or-promise": "^1.0.12",
"@whatwg-node/fetch": "^0.6.9",
"@repeaterjs/repeater": "^3.0.4",
"dset": "^3.1.2",
"meros": "^1.2.1",
"extract-files": "^11.0.0",
"tslib": "^2.4.0"
},
Expand Down
39 changes: 24 additions & 15 deletions packages/executors/http/src/createFormDataFromVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@ import { isAsyncIterable, isPromise } from '@graphql-tools/utils';
import { extractFiles, isExtractableFile } from 'extract-files';
import { isGraphQLUpload } from './isGraphQLUpload.js';
import { ValueOrPromise } from 'value-or-promise';
import { FormData, File } from '@whatwg-node/fetch';
import { FormData as DefaultFormData, File as DefaultFile } from '@whatwg-node/fetch';

export function createFormDataFromVariables<TVariables>({
query,
variables,
operationName,
extensions,
}: {
query: string;
variables: TVariables;
operationName?: string;
extensions?: any;
}) {
export function createFormDataFromVariables<TVariables>(
{
query,
variables,
operationName,
extensions,
}: {
query: string;
variables: TVariables;
operationName?: string;
extensions?: any;
},
{
File: FileCtor = DefaultFile,
FormData: FormDataCtor = DefaultFormData,
}: {
File?: typeof File;
FormData?: typeof DefaultFormData;
}
) {
const vars = Object.assign({}, variables);
const { clone, files } = extractFiles(
vars,
Expand Down Expand Up @@ -42,7 +51,7 @@ export function createFormDataFromVariables<TVariables>({
uploads[currIndex] = file;
currIndex++;
}
const form = new FormData();
const form = new FormDataCtor();
form.append(
'operations',
JSON.stringify({
Expand Down Expand Up @@ -72,10 +81,10 @@ export function createFormDataFromVariables<TVariables>({
}
}
const blobPart = new Uint8Array(chunks);
form.append(indexStr, new File([blobPart], filename, { type: upload.mimetype }), filename);
form.append(indexStr, new FileCtor([blobPart], filename, { type: upload.mimetype }), filename);
});
} else {
form.append(indexStr, new File([upload], filename), filename);
form.append(indexStr, new FileCtor([upload], filename), filename);
}
}
}
Expand Down
17 changes: 16 additions & 1 deletion packages/executors/http/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ export interface HTTPExecutorOptions {
* Retry attempts
*/
retry?: number;
/**
* WHATWG compatible File implementation
* @see https://developer.mozilla.org/en-US/docs/Web/API/File
*/
File?: typeof File;
/**
* WHATWG compatible FormData implementation
* @see https://developer.mozilla.org/en-US/docs/Web/API/FormData
*/
FormData?: typeof FormData;
}

export type HeadersConfig = Record<string, string>;
Expand Down Expand Up @@ -150,7 +160,12 @@ export function buildHTTPExecutor(options?: HTTPExecutorOptions): Executor<any,
);
}
case 'POST':
return new ValueOrPromise(() => createFormDataFromVariables(requestBody))
return new ValueOrPromise(() =>
createFormDataFromVariables(requestBody, {
File: options?.File,
FormData: options?.FormData,
})
)
.then(
body =>
fetchFn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { createClient } from '@urql/core';
import { executorExchange } from '../src/index.js';
import { pipe, toObservable } from 'wonka';
import { createYoga, createSchema } from 'graphql-yoga';
import { File } from '@whatwg-node/fetch';
import { buildHTTPExecutor } from '@graphql-tools/executor-http';

describe('URQL Yoga Exchange', () => {
Expand Down Expand Up @@ -53,7 +52,9 @@ describe('URQL Yoga Exchange', () => {
exchanges: [
executorExchange(
buildHTTPExecutor({
fetch: yoga.fetch as any,
fetch: yoga.fetch,
File: yoga.fetchAPI.File,
FormData: yoga.fetchAPI.FormData,
})
),
],
Expand Down Expand Up @@ -123,7 +124,7 @@ describe('URQL Yoga Exchange', () => {
`;
const result = await client
.mutation(query, {
file: new File(['Hello World'], 'file.txt', { type: 'text/plain' }),
file: new yoga.fetchAPI.File(['Hello World'], 'file.txt', { type: 'text/plain' }),
})
.toPromise();
expect(result.error).toBeFalsy();
Expand Down
6 changes: 3 additions & 3 deletions packages/graphql-tag-pluck/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
"tslib": "^2.4.0"
},
"devDependencies": {
"@babel/parser": "7.20.13",
"@babel/parser": "7.20.15",
"@babel/traverse": "7.20.13",
"@babel/types": "7.20.7",
"@types/babel__traverse": "7.18.3",
"@vue/compiler-sfc": "3.2.45",
"@vue/compiler-sfc": "3.2.47",
"svelte": "3.55.1",
"svelte2tsx": "0.6.0"
"svelte2tsx": "0.6.1"
},
"buildOptions": {
"external": [
Expand Down
2 changes: 1 addition & 1 deletion packages/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
]
},
"devDependencies": {
"@apollo/client": "3.7.6",
"@apollo/client": "3.7.7",
"@types/apollo-upload-client": "17.0.2",
"graphql-upload": "16.0.2"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/loaders/apollo-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
},
"dependencies": {
"@ardatan/sync-fetch": "0.0.1",
"@graphql-tools/utils": "9.2.0",
"@whatwg-node/fetch": "^0.6.0",
"@ardatan/sync-fetch": "^0.0.1",
"@graphql-tools/utils": "^9.2.0",
"@whatwg-node/fetch": "^0.6.9",
"tslib": "^2.4.0"
},
"publishConfig": {
Expand Down
8 changes: 4 additions & 4 deletions packages/loaders/github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
},
"dependencies": {
"@ardatan/sync-fetch": "0.0.1",
"@graphql-tools/utils": "9.2.0",
"@graphql-tools/graphql-tag-pluck": "7.4.4",
"@whatwg-node/fetch": "^0.6.0",
"@ardatan/sync-fetch": "^0.0.1",
"@graphql-tools/utils": "^9.2.0",
"@graphql-tools/graphql-tag-pluck": "^7.4.4",
"@whatwg-node/fetch": "^0.6.9",
"tslib": "^2.4.0"
},
"publishConfig": {
Expand Down
22 changes: 11 additions & 11 deletions packages/loaders/url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@envelop/live-query": "5.0.4",
"@types/express": "4.17.16",
"@types/express": "4.17.17",
"@types/extract-files": "8.1.1",
"@types/valid-url": "1.0.3",
"babel-loader": "9.1.2",
Expand All @@ -66,17 +66,17 @@
"webpack": "5.75.0"
},
"dependencies": {
"@graphql-tools/delegate": "9.0.25",
"@graphql-tools/executor-http": "0.1.4",
"@graphql-tools/executor-graphql-ws": "0.0.9",
"@graphql-tools/executor-legacy-ws": "0.0.7",
"@graphql-tools/utils": "9.2.0",
"@graphql-tools/wrap": "9.3.4",
"@ardatan/sync-fetch": "0.0.1",
"@whatwg-node/fetch": "^0.6.0",
"@graphql-tools/delegate": "^9.0.25",
"@graphql-tools/executor-http": "^0.1.4",
"@graphql-tools/executor-graphql-ws": "^0.0.9",
"@graphql-tools/executor-legacy-ws": "^0.0.7",
"@graphql-tools/utils": "^9.2.0",
"@graphql-tools/wrap": "^9.3.4",
"@ardatan/sync-fetch": "^0.0.1",
"@whatwg-node/fetch": "^0.6.9",
"@types/ws": "^8.0.0",
"ws": "8.12.0",
"isomorphic-ws": "5.0.0",
"ws": "^8.12.0",
"isomorphic-ws": "^5.0.0",
"tslib": "^2.4.0",
"value-or-promise": "^1.0.11"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/stitch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"input": "./src/index.ts"
},
"devDependencies": {
"dataloader": "2.1.0",
"dataloader": "2.2.1",
"value-or-promise": "1.0.12"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"@theguild/algolia": "1.1.2",
"@theguild/tailwind-config": "0.2.1",
"@types/node": "18.11.18",
"@types/node": "18.11.19",
"@types/react": "18.0.27",
"typescript": "4.9.5"
},
Expand Down
Loading

0 comments on commit b09ea28

Please sign in to comment.