From 067872ea652c36f0b893e996ef070f0bc9cee7a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20S=C3=A1ez?= Date: Sun, 9 Oct 2022 00:12:09 -0300 Subject: [PATCH] update deps (#925) * update deps * altair unpkg cross-fetch conditional imports * update sveltekit example * update sveltekit tests * koa changeset --- .changeset/bright-tables-wonder.md | 6 + .changeset/grumpy-pumas-carry.md | 5 + .changeset/quick-melons-wonder.md | 5 + .changeset/twelve-bananas-guess.md | 8 + .github/workflows/main.yml | 2 +- .github/workflows/release.yml | 2 +- .../apis/envelop-fastify-raw/package.json | 8 +- benchmarks/apis/express-graphql/package.json | 8 +- benchmarks/apis/ez-express/package.json | 8 +- benchmarks/apis/ez-fastify/package.json | 8 +- benchmarks/apis/ez-hapi/package.json | 6 +- benchmarks/apis/ez-http/package.json | 6 +- benchmarks/apis/ez-koa/package.json | 10 +- benchmarks/apis/graphql-helix/package.json | 8 +- benchmarks/apis/mercurius/package.json | 10 +- benchmarks/bench/package.json | 18 +- examples/cloudflare/package.json | 10 +- examples/express/complete/package.json | 8 +- examples/fastify/basic/package.json | 8 +- examples/fastify/complete/package.json | 8 +- examples/fastify/nexus/package.json | 8 +- examples/fastify/pothos/package.json | 10 +- examples/fastify/type-graphql/package.json | 8 +- examples/hapi/complete/package.json | 6 +- examples/http/complete/package.json | 6 +- examples/koa/complete/package.json | 10 +- examples/nextjs/complete/package.json | 10 +- .../.svelte-kit/generated/client-manifest.js | 14 + .../.svelte-kit/types/route_meta_data.json | 3 + .../.svelte-kit/types/src/routes/$types.d.ts | 13 + examples/sveltekit/.gitignore | 3 + examples/sveltekit/README.md | 14 +- examples/sveltekit/package.json | 38 +- examples/sveltekit/schema.gql | 7 - examples/sveltekit/src/app.d.ts | 9 + examples/sveltekit/src/app.html | 8 +- examples/sveltekit/src/ez.generated.ts | 118 - examples/sveltekit/src/global.d.ts | 1 - .../src/routes/{index.svelte => +page.svelte} | 0 .../api/{[...any].ts => [...any]/+server.ts} | 12 +- examples/sveltekit/svelte.config.js | 8 +- examples/sveltekit/tsconfig.json | 36 +- examples/sveltekit/vite.config.ts | 8 + examples/vercel/package.json | 6 +- integration/gql-15-interop/package.json | 8 +- .../gql-15-stream-defer-interop/package.json | 8 +- integration/gql-16-esm/package.json | 8 +- integration/gql-16-interop/package.json | 10 +- .../gql-16-stream-defer-interop/package.json | 8 +- integration/gql-17/package.json | 10 +- internal/testing/package.json | 34 +- internal/testing/src/jestConfig.ts | 7 +- internal/website/package.json | 30 +- package.json | 33 +- packages/client/main/package.json | 14 +- packages/cloudflare/main/package.json | 12 +- packages/core/main/package.json | 12 +- packages/core/main/src/smart-cache.ts | 2 +- packages/core/utils/package.json | 6 +- packages/express/main/package.json | 12 +- packages/express/main/test/main.test.ts | 18 +- packages/express/testing/package.json | 10 +- packages/fastify/main/package.json | 12 +- packages/fastify/main/test/main.test.ts | 18 +- packages/fastify/testing/package.json | 10 +- packages/hapi/main/package.json | 10 +- packages/hapi/main/test/main.test.ts | 18 +- packages/hapi/testing/package.json | 8 +- packages/helix/core/package.json | 6 +- packages/helix/graphiql/package.json | 18 +- packages/http/main/package.json | 10 +- packages/http/main/test/main.test.ts | 18 +- packages/http/testing/package.json | 8 +- packages/koa/main/package.json | 16 +- packages/koa/main/test/main.test.ts | 18 +- packages/koa/testing/package.json | 10 +- packages/nextjs/main/package.json | 16 +- packages/nextjs/testing/package.json | 8 +- packages/nextjs/testing/test/main.test.ts | 18 +- packages/plugin/altair/package.json | 14 +- .../altair/src/integrations/sveltekit.ts | 11 +- packages/plugin/altair/src/render/unpkg.ts | 15 +- packages/plugin/altair/test/main.test.ts | 50 +- .../automatic-persisted-queries/package.json | 12 +- .../automatic-persisted-queries/src/store.ts | 4 +- packages/plugin/codegen/package.json | 20 +- packages/plugin/codegen/test/main.test.ts | 42 +- packages/plugin/dataloader/package.json | 12 +- packages/plugin/graphiql/package.json | 12 +- .../graphiql/src/integrations/sveltekit.ts | 5 +- packages/plugin/graphiql/test/main.test.ts | 12 +- packages/plugin/graphiql/test/static.test.ts | 192 +- packages/plugin/modules/package.json | 12 +- packages/plugin/modules/test/main.test.ts | 2 +- packages/plugin/scalars/package.json | 12 +- packages/plugin/scalars/test/main.test.ts | 262 +- packages/plugin/schema/package.json | 14 +- packages/plugin/schema/test/main.test.ts | 18 +- packages/plugin/sse/package.json | 8 +- packages/plugin/upload/package.json | 10 +- packages/plugin/upload/test/main.test.ts | 4 +- packages/plugin/voyager/package.json | 12 +- packages/plugin/voyager/src/index.ts | 5 +- packages/plugin/voyager/test/main.test.ts | 128 +- packages/plugin/websockets/package.json | 14 +- packages/sveltekit/main/package.json | 22 +- packages/sveltekit/main/src/index.ts | 25 +- packages/sveltekit/main/test/main.test.ts | 45 +- .../main/test/test-example/.gitignore | 10 +- .../sveltekit/main/test/test-example/.npmrc | 1 + .../main/test/test-example/README.md | 38 + .../main/test/test-example/src/app.d.ts | 9 + .../main/test/test-example/src/app.html | 8 +- .../main/test/test-example/src/global.d.ts | 1 - .../test/test-example/src/routes/+page.svelte | 2 + .../{[...any].ts => [...any]/+server.ts} | 8 +- .../main/test/test-example/static/favicon.png | Bin 0 -> 1571 bytes .../main/test/test-example/svelte.config.js | 8 +- .../main/test/test-example/tsconfig.json | 36 +- .../main/test/test-example/vite.config.ts | 8 + packages/vercel/main/package.json | 8 +- pnpm-lock.yaml | 6022 +++++++++-------- 122 files changed, 4282 insertions(+), 3843 deletions(-) create mode 100644 .changeset/bright-tables-wonder.md create mode 100644 .changeset/grumpy-pumas-carry.md create mode 100644 .changeset/quick-melons-wonder.md create mode 100644 .changeset/twelve-bananas-guess.md create mode 100644 examples/sveltekit-new/.svelte-kit/generated/client-manifest.js create mode 100644 examples/sveltekit-new/.svelte-kit/types/route_meta_data.json create mode 100644 examples/sveltekit-new/.svelte-kit/types/src/routes/$types.d.ts delete mode 100644 examples/sveltekit/schema.gql create mode 100644 examples/sveltekit/src/app.d.ts delete mode 100644 examples/sveltekit/src/ez.generated.ts delete mode 100644 examples/sveltekit/src/global.d.ts rename examples/sveltekit/src/routes/{index.svelte => +page.svelte} (100%) rename examples/sveltekit/src/routes/api/{[...any].ts => [...any]/+server.ts} (85%) create mode 100644 examples/sveltekit/vite.config.ts create mode 100644 packages/sveltekit/main/test/test-example/.npmrc create mode 100644 packages/sveltekit/main/test/test-example/README.md create mode 100644 packages/sveltekit/main/test/test-example/src/app.d.ts delete mode 100644 packages/sveltekit/main/test/test-example/src/global.d.ts create mode 100644 packages/sveltekit/main/test/test-example/src/routes/+page.svelte rename packages/sveltekit/main/test/test-example/src/routes/{[...any].ts => [...any]/+server.ts} (85%) create mode 100644 packages/sveltekit/main/test/test-example/static/favicon.png create mode 100644 packages/sveltekit/main/test/test-example/vite.config.ts diff --git a/.changeset/bright-tables-wonder.md b/.changeset/bright-tables-wonder.md new file mode 100644 index 000000000..8024c9fdd --- /dev/null +++ b/.changeset/bright-tables-wonder.md @@ -0,0 +1,6 @@ +--- +'graphql-ez': patch +'@graphql-ez/plugin-automatic-persisted-queries': patch +--- + +Update tiny-lru to v9 diff --git a/.changeset/grumpy-pumas-carry.md b/.changeset/grumpy-pumas-carry.md new file mode 100644 index 000000000..2a43e66cb --- /dev/null +++ b/.changeset/grumpy-pumas-carry.md @@ -0,0 +1,5 @@ +--- +'@graphql-ez/plugin-altair': patch +--- + +cross-undici-fetch over cross-fetch and import conditionally diff --git a/.changeset/quick-melons-wonder.md b/.changeset/quick-melons-wonder.md new file mode 100644 index 000000000..a24175183 --- /dev/null +++ b/.changeset/quick-melons-wonder.md @@ -0,0 +1,5 @@ +--- +'@graphql-ez/koa': patch +--- + +Update @koa/cors to v4 diff --git a/.changeset/twelve-bananas-guess.md b/.changeset/twelve-bananas-guess.md new file mode 100644 index 000000000..3c22324d4 --- /dev/null +++ b/.changeset/twelve-bananas-guess.md @@ -0,0 +1,8 @@ +--- +'@graphql-ez/sveltekit': minor +'@graphql-ez/plugin-altair': patch +'@graphql-ez/plugin-graphiql': patch +'@graphql-ez/plugin-voyager': patch +--- + +Update for Sveltekit>=1.0.0-next.511 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b93bc2006..501f4f735 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - node_version: [14, 16] + node_version: [16] steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8db274f8c..3c346e99b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - name: Use Node uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '16 .x' - name: Cache pnpm modules uses: actions/cache@v3 env: diff --git a/benchmarks/apis/envelop-fastify-raw/package.json b/benchmarks/apis/envelop-fastify-raw/package.json index f244f6cec..4d311091e 100644 --- a/benchmarks/apis/envelop-fastify-raw/package.json +++ b/benchmarks/apis/envelop-fastify-raw/package.json @@ -16,14 +16,14 @@ "@envelop/types": "^2.4.0", "@envelop/validation-cache": "*", "benchmark-bench": "workspace:1.0.0", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "16.1.0-experimental-stream-defer.6", "require-env-variable": "^4.0.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/benchmarks/apis/express-graphql/package.json b/benchmarks/apis/express-graphql/package.json index d5f08724a..601a2889e 100644 --- a/benchmarks/apis/express-graphql/package.json +++ b/benchmarks/apis/express-graphql/package.json @@ -17,10 +17,10 @@ "require-env-variable": "^4.0.1" }, "devDependencies": { - "@types/express": "^4.17.13", - "@types/node": "^18.7.14", + "@types/express": "^4.17.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/benchmarks/apis/ez-express/package.json b/benchmarks/apis/ez-express/package.json index 063d417c9..f3aba6349 100644 --- a/benchmarks/apis/ez-express/package.json +++ b/benchmarks/apis/ez-express/package.json @@ -12,7 +12,7 @@ "dependencies": { "@envelop/graphql-jit": "^4.6.0", "@graphql-ez/express": "workspace:^0.9.8", - "@types/express": "^4.17.13", + "@types/express": "^4.17.14", "benchmark-bench": "workspace:1.0.0", "cross-env": "^7.0.3", "express": "^4.18.1", @@ -21,9 +21,9 @@ "require-env-variable": "^4.0.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/benchmarks/apis/ez-fastify/package.json b/benchmarks/apis/ez-fastify/package.json index 2e050bf9f..825c6e6d9 100644 --- a/benchmarks/apis/ez-fastify/package.json +++ b/benchmarks/apis/ez-fastify/package.json @@ -14,15 +14,15 @@ "@graphql-ez/fastify": "workspace:^0.11.0", "benchmark-bench": "workspace:1.0.0", "cross-env": "^7.0.3", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", "require-env-variable": "^4.0.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/benchmarks/apis/ez-hapi/package.json b/benchmarks/apis/ez-hapi/package.json index b0b7f055c..eeddbb6f2 100644 --- a/benchmarks/apis/ez-hapi/package.json +++ b/benchmarks/apis/ez-hapi/package.json @@ -21,9 +21,9 @@ "require-env-variable": "^4.0.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/benchmarks/apis/ez-http/package.json b/benchmarks/apis/ez-http/package.json index e80d8c3b8..8e4f921dc 100644 --- a/benchmarks/apis/ez-http/package.json +++ b/benchmarks/apis/ez-http/package.json @@ -19,9 +19,9 @@ "require-env-variable": "^4.0.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/benchmarks/apis/ez-koa/package.json b/benchmarks/apis/ez-koa/package.json index 338105d46..e28c45997 100644 --- a/benchmarks/apis/ez-koa/package.json +++ b/benchmarks/apis/ez-koa/package.json @@ -22,11 +22,11 @@ }, "devDependencies": { "@types/koa": "^2.13.5", - "@types/koa-bodyparser": "^4.3.7", - "@types/koa__router": "^8.0.11", - "@types/node": "^18.7.14", + "@types/koa-bodyparser": "^4.3.8", + "@types/koa__router": "^12.0.0", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/benchmarks/apis/graphql-helix/package.json b/benchmarks/apis/graphql-helix/package.json index 63826de04..b22d245ed 100644 --- a/benchmarks/apis/graphql-helix/package.json +++ b/benchmarks/apis/graphql-helix/package.json @@ -11,15 +11,15 @@ }, "dependencies": { "benchmark-bench": "workspace:1.0.0", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-helix": "^1.13.0", "require-env-variable": "^4.0.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/benchmarks/apis/mercurius/package.json b/benchmarks/apis/mercurius/package.json index 4f76063fc..ada582481 100644 --- a/benchmarks/apis/mercurius/package.json +++ b/benchmarks/apis/mercurius/package.json @@ -12,16 +12,16 @@ "dependencies": { "benchmark-bench": "workspace:1.0.0", "cross-env": "^7.0.3", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "^16.6.0", - "mercurius": "^11.0.0", + "mercurius": "^11.0.1", "require-env-variable": "^4.0.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" }, "dependenciesMeta": { "benchmark-bench": { diff --git a/benchmarks/bench/package.json b/benchmarks/bench/package.json index 5cba76507..ceb2005e8 100644 --- a/benchmarks/bench/package.json +++ b/benchmarks/bench/package.json @@ -12,11 +12,11 @@ }, "dependencies": { "@faker-js/faker": "^7.5.0", - "@graphql-tools/schema": "^9.0.2", - "autocannon": "^7.9.0", - "chalk": "^5.0.1", + "@graphql-tools/schema": "^9.0.4", + "autocannon": "^7.10.0", + "chalk": "^5.1.0", "cli-table": "^0.3.11", - "concurrently": "^7.3.0", + "concurrently": "^7.4.0", "cross-env": "^7.0.3", "kill-port": "^2.0.1", "md5": "^2.3.0", @@ -27,17 +27,17 @@ "wait-on": "^6.0.1" }, "devDependencies": { - "@types/autocannon": "^7.6.1", - "@types/cli-table": "^0.3.0", + "@types/autocannon": "^7.9.0", + "@types/cli-table": "^0.3.1", "@types/md5": "^2.3.2", "@types/mkdirp": "^1.0.2", - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "@types/rimraf": "^3.0.2", "@types/wait-on": "^5.3.1", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", - "typescript": "^4.8.2" + "typescript": "^4.8.4" }, "peerDependencies": { "graphql": "*" diff --git a/examples/cloudflare/package.json b/examples/cloudflare/package.json index 8036c4337..988143f15 100644 --- a/examples/cloudflare/package.json +++ b/examples/cloudflare/package.json @@ -19,11 +19,11 @@ "worktop": "^0.7.3" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "clipboardy": "^3.0.0", - "concurrently": "^7.3.0", - "esbuild": "^0.15.6", - "miniflare": "^2.7.1", - "typescript": "^4.8.2" + "concurrently": "^7.4.0", + "esbuild": "^0.15.10", + "miniflare": "^2.9.0", + "typescript": "^4.8.4" } } diff --git a/examples/express/complete/package.json b/examples/express/complete/package.json index 3d7632783..235d11b6b 100644 --- a/examples/express/complete/package.json +++ b/examples/express/complete/package.json @@ -25,10 +25,10 @@ "graphql-ez": "workspace:^0.15.1" }, "devDependencies": { - "@types/express": "^4.17.13", - "@types/node": "^18.7.14", + "@types/express": "^4.17.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/examples/fastify/basic/package.json b/examples/fastify/basic/package.json index c770c6b17..afe0b8200 100644 --- a/examples/fastify/basic/package.json +++ b/examples/fastify/basic/package.json @@ -13,14 +13,14 @@ "@graphql-ez/fastify": "workspace:^0.11.0", "@graphql-ez/plugin-codegen": "workspace:^0.7.11", "@graphql-ez/plugin-schema": "workspace:^0.8.5", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/examples/fastify/complete/package.json b/examples/fastify/complete/package.json index fc21644e4..22749871b 100644 --- a/examples/fastify/complete/package.json +++ b/examples/fastify/complete/package.json @@ -22,15 +22,15 @@ "@graphql-ez/plugin-voyager": "workspace:^0.9.4", "@graphql-ez/plugin-websockets": "workspace:^0.10.5", "@types/graphql-upload": "^8.0.11", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", "graphql-upload": "^13.0.0" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/examples/fastify/nexus/package.json b/examples/fastify/nexus/package.json index 56feb446f..cb3df72a0 100644 --- a/examples/fastify/nexus/package.json +++ b/examples/fastify/nexus/package.json @@ -10,15 +10,15 @@ "start": "bob-tsm src/index.ts" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" }, "dependencies": { "@graphql-ez/fastify": "workspace:^0.11.0", "@graphql-ez/plugin-altair": "workspace:^0.9.11", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", "nexus": "^1.3.0" diff --git a/examples/fastify/pothos/package.json b/examples/fastify/pothos/package.json index 82c14f76c..7f8c046c7 100644 --- a/examples/fastify/pothos/package.json +++ b/examples/fastify/pothos/package.json @@ -12,15 +12,15 @@ "dependencies": { "@graphql-ez/fastify": "workspace:^0.11.0", "@graphql-ez/plugin-graphiql": "workspace:^0.11.5", - "@pothos/core": "^3.19.1", - "fastify": "^4.5.3", + "@pothos/core": "^3.22.5", + "fastify": "^4.7.0", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/examples/fastify/type-graphql/package.json b/examples/fastify/type-graphql/package.json index d9b0c600c..2fb4261e7 100644 --- a/examples/fastify/type-graphql/package.json +++ b/examples/fastify/type-graphql/package.json @@ -10,17 +10,17 @@ "@graphql-ez/fastify": "workspace:^0.11.0", "@graphql-ez/plugin-altair": "workspace:^0.9.11", "class-validator": "^0.13.2", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "^15.8.0", "graphql-ez": "workspace:^0.15.1", "reflect-metadata": "^0.1.13", "type-graphql": "^1.1.1" }, "devDependencies": { - "@types/node": "^18.7.14", - "esbuild": "^0.15.6", + "@types/node": "^18.8.3", + "esbuild": "^0.15.10", "tsc-watch": "^5.0.3", - "typescript": "^4.8.2" + "typescript": "^4.8.4" }, "dependenciesMeta": { "graphql-ez": { diff --git a/examples/hapi/complete/package.json b/examples/hapi/complete/package.json index bfbfcbb8c..ab2a4cb9a 100644 --- a/examples/hapi/complete/package.json +++ b/examples/hapi/complete/package.json @@ -26,9 +26,9 @@ }, "devDependencies": { "@types/hapi__hapi": "20.0.12", - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/examples/http/complete/package.json b/examples/http/complete/package.json index 07cb038d4..2f953d23a 100644 --- a/examples/http/complete/package.json +++ b/examples/http/complete/package.json @@ -24,9 +24,9 @@ "graphql-ez": "workspace:^0.15.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/examples/koa/complete/package.json b/examples/koa/complete/package.json index 492f3f6bd..ea68b4dcc 100644 --- a/examples/koa/complete/package.json +++ b/examples/koa/complete/package.json @@ -29,11 +29,11 @@ }, "devDependencies": { "@types/koa": "^2.13.5", - "@types/koa-bodyparser": "^4.3.7", - "@types/koa__router": "^8.0.11", - "@types/node": "^18.7.14", + "@types/koa-bodyparser": "^4.3.8", + "@types/koa__router": "^12.0.0", + "@types/node": "^18.8.3", "bob-tsm": "^1.1.2", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/examples/nextjs/complete/package.json b/examples/nextjs/complete/package.json index 6c4f99cdc..628b48cdd 100644 --- a/examples/nextjs/complete/package.json +++ b/examples/nextjs/complete/package.json @@ -21,16 +21,16 @@ "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", "graphql-request": "^5.0.0", - "next": "^12.2.5", + "next": "^12.3.1", "react": "^17.0.2", "react-dom": "^17.0.2", "react-query": "^3.39.2" }, "devDependencies": { - "@types/node": "^18.7.14", - "@types/react": "^17.0.49", + "@types/node": "^18.8.3", + "@types/react": "^17.0.50", "@types/react-dom": "^18.0.6", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/examples/sveltekit-new/.svelte-kit/generated/client-manifest.js b/examples/sveltekit-new/.svelte-kit/generated/client-manifest.js new file mode 100644 index 000000000..d8dbfd086 --- /dev/null +++ b/examples/sveltekit-new/.svelte-kit/generated/client-manifest.js @@ -0,0 +1,14 @@ +export { matchers } from './client-matchers.js'; + + export const nodes = [() => import('./nodes/0'), + () => import('./nodes/1')]; + + export const server_loads = []; + + export const dictionary = { + +}; + + export const hooks = { + handleError: (({ error }) => { console.error(error) }), + }; \ No newline at end of file diff --git a/examples/sveltekit-new/.svelte-kit/types/route_meta_data.json b/examples/sveltekit-new/.svelte-kit/types/route_meta_data.json new file mode 100644 index 000000000..9c0a27d67 --- /dev/null +++ b/examples/sveltekit-new/.svelte-kit/types/route_meta_data.json @@ -0,0 +1,3 @@ +{ + "": [] +} \ No newline at end of file diff --git a/examples/sveltekit-new/.svelte-kit/types/src/routes/$types.d.ts b/examples/sveltekit-new/.svelte-kit/types/src/routes/$types.d.ts new file mode 100644 index 000000000..e57454181 --- /dev/null +++ b/examples/sveltekit-new/.svelte-kit/types/src/routes/$types.d.ts @@ -0,0 +1,13 @@ +import type * as Kit from '@sveltejs/kit'; + +type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never; +type RouteParams = { } +type MaybeWithVoid = {} extends T ? T | void : T; +export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T]; +type OutputDataShape = MaybeWithVoid> & Partial> & Record> +type EnsureDefined = T extends null | undefined ? {} : T; +type LayoutParams = RouteParams & { } +type LayoutParentData = EnsureDefined<{}>; + +export type LayoutServerData = null; +export type LayoutData = Expand; \ No newline at end of file diff --git a/examples/sveltekit/.gitignore b/examples/sveltekit/.gitignore index dad6f805d..f4401a32d 100644 --- a/examples/sveltekit/.gitignore +++ b/examples/sveltekit/.gitignore @@ -3,3 +3,6 @@ node_modules /build /.svelte-kit /package +.env +.env.* +!.env.example diff --git a/examples/sveltekit/README.md b/examples/sveltekit/README.md index 82510ca06..5c91169b0 100644 --- a/examples/sveltekit/README.md +++ b/examples/sveltekit/README.md @@ -1,6 +1,6 @@ # create-svelte -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte); +Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). ## Creating a project @@ -8,14 +8,12 @@ If you're seeing this, you've probably already done this step. Congrats! ```bash # create a new project in the current directory -npm init svelte@next +npm create svelte@latest # create a new project in my-app -npm init svelte@next my-app +npm create svelte@latest my-app ``` -> Note: the `@next` is temporary - ## Developing Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: @@ -29,10 +27,12 @@ npm run dev -- --open ## Building -Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then: +To create a production version of your app: ```bash npm run build ``` -> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production. +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/examples/sveltekit/package.json b/examples/sveltekit/package.json index 9e09da1fb..a1aedd007 100644 --- a/examples/sveltekit/package.json +++ b/examples/sveltekit/package.json @@ -2,35 +2,27 @@ "name": "example-sveltekit-playground", "version": "0.0.1", "private": true, - "type": "module", "scripts": { - "build": "svelte-kit build", - "check": "svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", - "dev": "svelte-kit dev", - "preview": "svelte-kit preview" + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" }, - "dependencies": { + "devDependencies": { "@graphql-ez/plugin-altair": "workspace:^0.9.11", - "@graphql-ez/plugin-codegen": "workspace:^0.7.11", "@graphql-ez/plugin-graphiql": "workspace:^0.11.5", "@graphql-ez/plugin-schema": "workspace:^0.8.5", "@graphql-ez/plugin-voyager": "workspace:^0.9.4", "@graphql-ez/sveltekit": "workspace:^0.4.2", - "@graphql-tools/schema": "^9.0.2", - "@sveltejs/adapter-node": "^1.0.0-next.88", - "altair-static-slim": "4.5.4", - "graphql": "16.1.0-experimental-stream-defer.6", - "graphql-ez": "workspace:^0.15.1" + "@sveltejs/adapter-auto": "1.0.0-next.80", + "@sveltejs/kit": "1.0.0-next.511", + "svelte": "^3.44.0", + "svelte-check": "^2.7.1", + "svelte-preprocess": "^4.10.6", + "tslib": "^2.3.1", + "typescript": "^4.7.4", + "vite": "^3.1.0" }, - "devDependencies": { - "@sveltejs/kit": "1.0.0-next.336", - "@types/node": "^18.7.14", - "esbuild": "^0.15.6", - "svelte": "^3.50.0", - "svelte-check": "^2.9.0", - "svelte-preprocess": "^4.10.7", - "tslib": "^2.4.0", - "typescript": "^4.8.2" - } + "type": "module" } diff --git a/examples/sveltekit/schema.gql b/examples/sveltekit/schema.gql deleted file mode 100644 index 98655dd9f..000000000 --- a/examples/sveltekit/schema.gql +++ /dev/null @@ -1,7 +0,0 @@ -schema { - query: Query -} - -type Query { - hello: String! -} diff --git a/examples/sveltekit/src/app.d.ts b/examples/sveltekit/src/app.d.ts new file mode 100644 index 000000000..3e4ed2057 --- /dev/null +++ b/examples/sveltekit/src/app.d.ts @@ -0,0 +1,9 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +// and what to do when importing types +declare namespace App { + // interface Locals {} + // interface PageData {} + // interface Error {} + // interface Platform {} +} diff --git a/examples/sveltekit/src/app.html b/examples/sveltekit/src/app.html index 5317e0cdb..4e53b26cd 100644 --- a/examples/sveltekit/src/app.html +++ b/examples/sveltekit/src/app.html @@ -2,11 +2,11 @@ - - - %svelte.head% + + + %sveltekit.head% -
%svelte.body%
+
%sveltekit.body%
diff --git a/examples/sveltekit/src/ez.generated.ts b/examples/sveltekit/src/ez.generated.ts deleted file mode 100644 index 3c5e7567d..000000000 --- a/examples/sveltekit/src/ez.generated.ts +++ /dev/null @@ -1,118 +0,0 @@ -import type { GraphQLResolveInfo } from 'graphql'; -import type { EZContext } from 'graphql-ez'; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type ResolverFn = ( - parent: TParent, - args: TArgs, - context: TContext, - info: GraphQLResolveInfo -) => Promise> | import('graphql-ez').DeepPartial; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; -}; - -export type Query = { - __typename?: 'Query'; - hello: Scalars['String']; -}; - -export type ResolverTypeWrapper = Promise | T; - -export type ResolverWithResolve = { - resolve: ResolverFn; -}; -export type Resolver = - | ResolverFn - | ResolverWithResolve; - -export type SubscriptionSubscribeFn = ( - parent: TParent, - args: TArgs, - context: TContext, - info: GraphQLResolveInfo -) => AsyncIterable | Promise>; - -export type SubscriptionResolveFn = ( - parent: TParent, - args: TArgs, - context: TContext, - info: GraphQLResolveInfo -) => TResult | Promise; - -export interface SubscriptionSubscriberObject { - subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>; - resolve?: SubscriptionResolveFn; -} - -export interface SubscriptionResolverObject { - subscribe: SubscriptionSubscribeFn; - resolve: SubscriptionResolveFn; -} - -export type SubscriptionObject = - | SubscriptionSubscriberObject - | SubscriptionResolverObject; - -export type SubscriptionResolver = - | ((...args: any[]) => SubscriptionObject) - | SubscriptionObject; - -export type TypeResolveFn = ( - parent: TParent, - context: TContext, - info: GraphQLResolveInfo -) => Maybe | Promise>; - -export type IsTypeOfResolverFn = ( - obj: T, - context: TContext, - info: GraphQLResolveInfo -) => boolean | Promise; - -export type NextResolverFn = () => Promise; - -export type DirectiveResolverFn = ( - next: NextResolverFn, - parent: TParent, - args: TArgs, - context: TContext, - info: GraphQLResolveInfo -) => TResult | Promise; - -/** Mapping between all available schema types and the resolvers types */ -export type ResolversTypes = { - Query: ResolverTypeWrapper<{}>; - String: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; -}; - -/** Mapping between all available schema types and the resolvers parents */ -export type ResolversParentTypes = { - Query: {}; - String: Scalars['String']; - Boolean: Scalars['Boolean']; -}; - -export type QueryResolvers< - ContextType = EZContext, - ParentType extends ResolversParentTypes['Query'] = ResolversParentTypes['Query'] -> = { - hello?: Resolver; -}; - -export type Resolvers = { - Query?: QueryResolvers; -}; - -declare module 'graphql-ez' { - interface EZResolvers extends Resolvers {} -} diff --git a/examples/sveltekit/src/global.d.ts b/examples/sveltekit/src/global.d.ts deleted file mode 100644 index 63908c66c..000000000 --- a/examples/sveltekit/src/global.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/examples/sveltekit/src/routes/index.svelte b/examples/sveltekit/src/routes/+page.svelte similarity index 100% rename from examples/sveltekit/src/routes/index.svelte rename to examples/sveltekit/src/routes/+page.svelte diff --git a/examples/sveltekit/src/routes/api/[...any].ts b/examples/sveltekit/src/routes/api/[...any]/+server.ts similarity index 85% rename from examples/sveltekit/src/routes/api/[...any].ts rename to examples/sveltekit/src/routes/api/[...any]/+server.ts index b82f0c3db..026b99d4c 100644 --- a/examples/sveltekit/src/routes/api/[...any].ts +++ b/examples/sveltekit/src/routes/api/[...any]/+server.ts @@ -1,9 +1,8 @@ import { CreateApp, type SvelteKitContextArgs } from '@graphql-ez/sveltekit'; import { ezSchema, gql } from '@graphql-ez/plugin-schema'; +import { ezVoyager } from '@graphql-ez/plugin-voyager'; import { ezGraphiQLIDE } from '@graphql-ez/plugin-graphiql'; import { ezUnpkgAltairIDE } from '@graphql-ez/plugin-altair/unpkg'; -import { ezVoyager } from '@graphql-ez/plugin-voyager'; -import { ezCodegen } from '@graphql-ez/plugin-codegen'; const buildContext = ({ sveltekit }: SvelteKitContextArgs) => { console.log(sveltekit); @@ -14,10 +13,9 @@ const ezApp = CreateApp({ path: '/api/graphql', ez: { plugins: [ - ezCodegen({ - outputSchema: true, + ezVoyager({ + path: '/api/voyager', }), - ezVoyager(), ezUnpkgAltairIDE({ path: '/api/altair', instanceStorageNamespace: 'sveltekit', @@ -46,6 +44,6 @@ const ezApp = CreateApp({ const { handler } = ezApp.buildApp(); -export const get = handler; +export const GET = handler; -export const post = handler; +export const POST = handler; diff --git a/examples/sveltekit/svelte.config.js b/examples/sveltekit/svelte.config.js index 29583927f..1a210095e 100644 --- a/examples/sveltekit/svelte.config.js +++ b/examples/sveltekit/svelte.config.js @@ -1,5 +1,5 @@ +import adapter from '@sveltejs/adapter-auto'; import preprocess from 'svelte-preprocess'; -import adapter from '@sveltejs/adapter-node'; /** @type {import('@sveltejs/kit').Config} */ const config = { @@ -8,11 +8,7 @@ const config = { preprocess: preprocess(), kit: { - adapter: adapter({ - // default options are shown - out: 'build', - precompress: false, - }), + adapter: adapter(), }, }; diff --git a/examples/sveltekit/tsconfig.json b/examples/sveltekit/tsconfig.json index 566946c7a..794b95b64 100644 --- a/examples/sveltekit/tsconfig.json +++ b/examples/sveltekit/tsconfig.json @@ -1,33 +1,17 @@ { "extends": "./.svelte-kit/tsconfig.json", "compilerOptions": { - "moduleResolution": "node", - "module": "es2020", - "lib": ["es2020", "DOM", "DOM.Iterable"], - "target": "es2019", - /** - svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript - to enforce using \`import type\` instead of \`import\` for Types. - */ - "importsNotUsedAsValues": "error", - "isolatedModules": true, - "resolveJsonModule": true, - /** - To have warnings/errors of the Svelte compiler at the correct position, - enable source maps by default. - */ - "sourceMap": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "baseUrl": ".", "allowJs": true, "checkJs": true, - "paths": { - "$lib": ["src/lib"], - "$lib/*": ["src/lib/*"] - }, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, "strict": true - }, - "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"] + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in } diff --git a/examples/sveltekit/vite.config.ts b/examples/sveltekit/vite.config.ts new file mode 100644 index 000000000..b45399c1a --- /dev/null +++ b/examples/sveltekit/vite.config.ts @@ -0,0 +1,8 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import type { UserConfig } from 'vite'; + +const config: UserConfig = { + plugins: [sveltekit()], +}; + +export default config; diff --git a/examples/vercel/package.json b/examples/vercel/package.json index ee04c5967..4426f22f5 100644 --- a/examples/vercel/package.json +++ b/examples/vercel/package.json @@ -16,8 +16,8 @@ "graphql-ez": "workspace:^0.15.1" }, "devDependencies": { - "@types/node": "^18.7.14", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "@types/node": "^18.8.3", + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/integration/gql-15-interop/package.json b/integration/gql-15-interop/package.json index 569328da5..cedf3eefb 100644 --- a/integration/gql-15-interop/package.json +++ b/integration/gql-15-interop/package.json @@ -12,7 +12,7 @@ "@graphql-ez/plugin-schema": "workspace:^0.8.5", "c8": "^7.12.0", "chai": "^4.3.6", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "15.8.0", "graphql-ez": "workspace:^0.15.1", "mocha": "^10.0.0" @@ -32,8 +32,8 @@ } }, "devDependencies": { - "@types/node": "^18.7.14", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "@types/node": "^18.8.3", + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/integration/gql-15-stream-defer-interop/package.json b/integration/gql-15-stream-defer-interop/package.json index c21b95496..842cad69f 100644 --- a/integration/gql-15-stream-defer-interop/package.json +++ b/integration/gql-15-stream-defer-interop/package.json @@ -12,7 +12,7 @@ "@graphql-ez/plugin-schema": "workspace:^0.8.5", "c8": "^7.12.0", "chai": "^4.3.6", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "15.4.0-experimental-stream-defer.1", "graphql-ez": "workspace:^0.15.1", "mocha": "^10.0.0" @@ -32,8 +32,8 @@ } }, "devDependencies": { - "@types/node": "^18.7.14", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "@types/node": "^18.8.3", + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/integration/gql-16-esm/package.json b/integration/gql-16-esm/package.json index 1a3372cac..79a15e97c 100644 --- a/integration/gql-16-esm/package.json +++ b/integration/gql-16-esm/package.json @@ -10,7 +10,7 @@ "@graphql-ez/plugin-schema": "workspace:^0.8.5", "c8": "^7.12.0", "chai": "^4.3.6", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "npm:graphql-esm@^16.5.0", "graphql-ez": "workspace:^0.15.1", "mocha": "^10.0.0" @@ -30,8 +30,8 @@ } }, "devDependencies": { - "@types/node": "^18.7.14", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "@types/node": "^18.8.3", + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/integration/gql-16-interop/package.json b/integration/gql-16-interop/package.json index d92b218d2..7f32c2e8b 100644 --- a/integration/gql-16-interop/package.json +++ b/integration/gql-16-interop/package.json @@ -12,8 +12,8 @@ "@graphql-ez/plugin-schema": "workspace:^0.8.5", "c8": "^7.12.0", "chai": "^4.3.6", - "fastify": "^4.5.3", - "graphql": "16.5.0", + "fastify": "^4.7.0", + "graphql": "16.6.0", "graphql-ez": "workspace:^0.15.1", "mocha": "^10.0.0" }, @@ -32,8 +32,8 @@ } }, "devDependencies": { - "@types/node": "^18.7.14", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "@types/node": "^18.8.3", + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/integration/gql-16-stream-defer-interop/package.json b/integration/gql-16-stream-defer-interop/package.json index c4ed0ca11..066e47d37 100644 --- a/integration/gql-16-stream-defer-interop/package.json +++ b/integration/gql-16-stream-defer-interop/package.json @@ -12,7 +12,7 @@ "@graphql-ez/plugin-schema": "workspace:^0.8.5", "c8": "^7.12.0", "chai": "^4.3.6", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", "mocha": "^10.0.0" @@ -32,8 +32,8 @@ } }, "devDependencies": { - "@types/node": "^18.7.14", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "@types/node": "^18.8.3", + "esbuild": "^0.15.10", + "typescript": "^4.8.4" } } diff --git a/integration/gql-17/package.json b/integration/gql-17/package.json index 0d464e5c1..22c57672a 100644 --- a/integration/gql-17/package.json +++ b/integration/gql-17/package.json @@ -7,18 +7,18 @@ "dependencies": { "@graphql-ez/fastify": "workspace:^0.11.0", "@graphql-ez/fastify-testing": "workspace:^0.3.0", - "@pothos/core": "^3.19.1", + "@pothos/core": "^3.22.5", "c8": "^7.12.0", "chai": "^4.3.6", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "graphql": "17.0.0-alpha.1", "graphql-ez": "workspace:^0.15.1", "mocha": "^10.0.0" }, "devDependencies": { - "@types/node": "^18.7.14", - "esbuild": "^0.15.6", - "typescript": "^4.8.2" + "@types/node": "^18.8.3", + "esbuild": "^0.15.10", + "typescript": "^4.8.4" }, "dependenciesMeta": { "@graphql-ez/fastify": { diff --git a/internal/testing/package.json b/internal/testing/package.json index b83629246..5d8f0078c 100644 --- a/internal/testing/package.json +++ b/internal/testing/package.json @@ -25,44 +25,44 @@ "devDependencies": { "@fastify/nextjs": "^9.1.1", "@graphql-ez/utils": "workspace:^0.1.4", - "@graphql-tools/schema": "^9.0.2", - "@graphql-tools/utils": "^8.10.1", + "@graphql-tools/schema": "^9.0.4", + "@graphql-tools/utils": "^8.12.0", "@graphql-typed-document-node/core": "^3.1.1", "@hapi/hapi": "^20.2.2", - "@jest/types": "^28.1.3", + "@jest/types": "^29.1.2", "@koa/router": "^12.0.0", "@types/eventsource": "^1.1.9", - "@types/express": "^4.17.13", - "@types/express-serve-static-core": "^4.17.30", + "@types/express": "^4.17.14", + "@types/express-serve-static-core": "^4.17.31", "@types/fs-extra": "^9.0.13", "@types/hapi__hapi": "20.0.12", - "@types/jest": "^27.5.2", + "@types/jest": "^29.1.2", "@types/koa": "^2.13.5", - "@types/koa__router": "^8.0.11", - "@types/lodash": "^4.14.184", - "@types/node": "^18.7.14", + "@types/koa__router": "^12.0.0", + "@types/lodash": "^4.14.186", + "@types/node": "^18.8.3", "@types/ws": "^8.5.3", "bob-esbuild-cli": "^4.0.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "eventsource": "^2.0.2", "express": "^4.18.1", "fast-safe-stringify": "^2.1.1", - "fastify": "^4.5.3", + "fastify": "^4.7.0", "form-data": "^4.0.0", "fs-extra": "^10.1.0", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:0.15.1", "graphql-modules": "^2.1.0", - "graphql-ws": "^5.10.1", - "jest": "^28.1.3", + "graphql-ws": "^5.11.2", + "jest": "^29.1.2", "koa": "^2.13.4", "lodash": "^4.17.21", "subscriptions-transport-ws-envelop": "^2.0.2", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2", - "undici": "^5.10.0", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4", + "undici": "^5.11.0", "wait-for-expect": "^3.0.2", - "ws": "^8.8.1" + "ws": "^8.9.0" }, "peerDependencies": { "@graphql-ez/express": "workspace:*", diff --git a/internal/testing/src/jestConfig.ts b/internal/testing/src/jestConfig.ts index 60cd95038..2592983fa 100644 --- a/internal/testing/src/jestConfig.ts +++ b/internal/testing/src/jestConfig.ts @@ -38,12 +38,7 @@ export function getConfig({ const config: Config.InitialOptions = { testMatch: [process.cwd().replace(/\\/g, '/') + '/test/**/*.test.ts'], testEnvironment: 'node', - transform: { '\\.[jt]sx?$': 'ts-jest' }, - globals: { - 'ts-jest': { - isolatedModules: true, - }, - }, + transform: { '\\.[jt]sx?$': ['ts-jest', { isolatedModules: true }] }, modulePathIgnorePatterns: ['/dist/'], testPathIgnorePatterns: ['/node_modules/', '/dist/', '/.next'], coveragePathIgnorePatterns: ['node_modules', '/.next'], diff --git a/internal/website/package.json b/internal/website/package.json index ae1a603e8..2fd6b1564 100644 --- a/internal/website/package.json +++ b/internal/website/package.json @@ -12,41 +12,41 @@ }, "dependencies": { "@chakra-ui/icons": "^1.1.7", - "@chakra-ui/react": "^1.8.8", + "@chakra-ui/react": "^1.8.9", "@chakra-ui/theme-tools": "^1.3.6", "@chakra-ui/utils": "^1.10.4", "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", "@guild-docs/client": "2.1.1", "@guild-docs/server": "3.0.1", - "@mdx-js/react": "^2.1.3", + "@mdx-js/react": "^2.1.4", "@theguild/components": "^1.12.0", - "date-fns": "^2.29.2", + "date-fns": "^2.29.3", "framer-motion": "^6.5.1", - "next": "^12.2.5", - "next-i18next": "^11.3.0", + "next": "^12.3.1", + "next-i18next": "^12.1.0", "next-seo": "^5.5.0", "react": "^17.0.2", "react-dom": "^17.0.2", "react-icons": "^4.4.0", "react-use": "^17.4.0", - "sharp": "~0.30.7", - "shiki": "^0.10.1" + "sharp": "~0.31.1", + "shiki": "^0.11.1" }, "devDependencies": { - "@next/bundle-analyzer": "^12.2.5", + "@next/bundle-analyzer": "^12.3.1", "@types/mdx-js__react": "^1.5.5", - "@types/node": "^18.7.14", - "@types/react": "^17.0.49", + "@types/node": "^18.8.3", + "@types/react": "^17.0.50", "@types/react-dom": "^18.0.6", "@types/wait-on": "^5.3.1", "bob-tsm": "^1.1.2", - "concurrently": "^7.3.0", + "concurrently": "^7.4.0", "cross-env": "^7.0.3", - "esbuild": "^0.15.6", - "next-remote-watch": "^1.0.0", - "open-cli": "^7.0.1", - "typescript": "^4.8.2", + "esbuild": "^0.15.10", + "next-remote-watch": "^2.0.0", + "open-cli": "^7.1.0", + "typescript": "^4.8.4", "wait-on": "^6.0.1" } } diff --git a/package.json b/package.json index 8a4c6f585..522c3026a 100644 --- a/package.json +++ b/package.json @@ -41,31 +41,31 @@ "typecheck": "bob-esbuild tsc" }, "devDependencies": { - "@changesets/assemble-release-plan": "^5.2.1", - "@changesets/cli": "^2.24.4", + "@changesets/assemble-release-plan": "^5.2.2", + "@changesets/cli": "^2.25.0", "@types/chai": "^4.3.3", - "@types/express-serve-static-core": "^4.17.30", - "@types/jest": "^27.5.2", - "@types/mocha": "^9.1.1", - "@types/node": "^18.7.14", + "@types/express-serve-static-core": "^4.17.31", + "@types/jest": "^29.1.2", + "@types/mocha": "^10.0.0", + "@types/node": "^18.8.3", "bob-esbuild": "^4.0.3", "bob-esbuild-cli": "^4.0.0", "bob-tsm": "^1.1.2", - "chalk": "^5.0.1", + "chalk": "^5.1.0", "changesets-github-release": "^0.1.0", - "concurrently": "^7.3.0", + "concurrently": "^7.4.0", "cross-env": "^7.0.3", - "esbuild": "^0.15.6", - "fastify": "^4.5.3", + "esbuild": "^0.15.10", + "fastify": "^4.7.0", "globby": "^13.1.2", "graphql-ez-testing": "workspace:^1.0.0", "husky": "8.0.1", - "jest": "^28.1.3", + "jest": "^29.1.2", "mocha": "^10.0.0", "prettier": "^2.7.1", "pretty-quick": "^3.1.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "engines": { "node": ">=14.13.1", @@ -73,14 +73,14 @@ }, "pnpm": { "overrides": { - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "trim@<0.0.3": ">=0.0.3", "glob-parent@<5.1.2": ">=5.1.2", "set-value@<4.0.1": ">=4.0.1", "axios@<=0.21.1": ">=0.21.2", "ansi-regex@>2.1.1 <5.0.1": "^5.0.1", "json-schema@<0.4.0": ">=0.4.0", - "@types/react": "^17.0.44", + "@types/react": "^17.0.50", "@types/hapi__hapi": "20.0.12" }, "peerDependencyRules": { @@ -104,7 +104,8 @@ "graphql": "*", "framer-motion": "*", "next": "*", - "react": "*" + "react": "*", + "shiki": "*" } } } diff --git a/packages/client/main/package.json b/packages/client/main/package.json index 105e36db2..64da766ad 100644 --- a/packages/client/main/package.json +++ b/packages/client/main/package.json @@ -30,30 +30,30 @@ }, "dependencies": { "@graphql-ez/utils": "workspace:^0.1.4", - "undici": "^5.10.0" + "undici": "^5.11.0" }, "devDependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@types/eventsource": "^1.1.9", "@types/extract-files": "^8.1.1", - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "@types/node-fetch": "^2.6.2", "@types/rimraf": "^3.0.2", "@types/ws": "^8.5.3", "bob-ts": "^4.1.1", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "eventsource": "^2.0.2", "extract-files": "^11.0.0", "form-data": "^4.0.0", "graphql": "16.1.0-experimental-stream-defer.6", - "graphql-ws": "^5.10.1", - "jest": "^28.1.3", + "graphql-ws": "^5.11.2", + "jest": "^29.1.2", "node-fetch": "^2.6.7", "rimraf": "^3.0.2", "subscriptions-transport-ws-envelop": "^2.0.2", - "typescript": "^4.8.2", - "ws": "^8.8.1" + "typescript": "^4.8.4", + "ws": "^8.9.0" }, "peerDependencies": { "@graphql-typed-document-node/core": "*", diff --git a/packages/cloudflare/main/package.json b/packages/cloudflare/main/package.json index a5af33c5a..118b56a15 100644 --- a/packages/cloudflare/main/package.json +++ b/packages/cloudflare/main/package.json @@ -33,19 +33,19 @@ "@graphql-ez/utils": "workspace:^0.1.4" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "@types/wait-on": "^5.3.1", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "execa": "^5.1.1", "get-port": "^5.1.1", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "miniflare": "^2.7.1", - "typescript": "^4.8.2", - "undici": "^5.10.0", + "jest": "^29.1.2", + "miniflare": "^2.9.0", + "typescript": "^4.8.4", + "undici": "^5.11.0", "wait-on": "^6.0.1", "worktop": "^0.7.3" }, diff --git a/packages/core/main/package.json b/packages/core/main/package.json index 62f43e8a2..83ec27b5c 100644 --- a/packages/core/main/package.json +++ b/packages/core/main/package.json @@ -38,17 +38,17 @@ "@envelop/types": "^2.4.0", "@graphql-ez/utils": "workspace:^0.1.4", "@pablosz/graphql-helix": "workspace:^2.0.3", - "tiny-lru": "8.0.2" + "tiny-lru": "9.0.3" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", - "jest": "^28.1.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "graphql": "*" diff --git a/packages/core/main/src/smart-cache.ts b/packages/core/main/src/smart-cache.ts index a36170eec..055fb82ae 100644 --- a/packages/core/main/src/smart-cache.ts +++ b/packages/core/main/src/smart-cache.ts @@ -2,7 +2,7 @@ import type { Plugin, ValidateFunctionParameter } from '@envelop/types'; import { getObjectValue } from '@graphql-ez/utils/object'; import type { DocumentNode, GraphQLError } from 'graphql'; import { NoSchemaIntrospectionCustomRule, print } from 'graphql'; -import lru from 'tiny-lru'; +import { lru } from 'tiny-lru'; import type { EZContext } from './index'; import type { EZPlugin } from './types'; diff --git a/packages/core/utils/package.json b/packages/core/utils/package.json index d748aff92..2b7146d98 100644 --- a/packages/core/utils/package.json +++ b/packages/core/utils/package.json @@ -27,11 +27,11 @@ "prepack": "bob-esbuild build" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", - "typescript": "^4.8.2" + "typescript": "^4.8.4" }, "peerDependencies": { "@types/node": "*", diff --git a/packages/express/main/package.json b/packages/express/main/package.json index e19aca63b..4e6e0b3ff 100644 --- a/packages/express/main/package.json +++ b/packages/express/main/package.json @@ -36,17 +36,17 @@ "cors": "^2.8.5" }, "devDependencies": { - "@types/express": "^4.17.13", - "@types/node": "^18.7.14", + "@types/express": "^4.17.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "express": "^4.18.1", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "@types/node": "*", diff --git a/packages/express/main/test/main.test.ts b/packages/express/main/test/main.test.ts index 09988b804..360cdcd04 100644 --- a/packages/express/main/test/main.test.ts +++ b/packages/express/main/test/main.test.ts @@ -133,28 +133,28 @@ test('basic', async () => { `); expect(printSchema(ezApp.getEnveloped().schema)).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD diff --git a/packages/express/testing/package.json b/packages/express/testing/package.json index 6142f5e85..37958eea2 100644 --- a/packages/express/testing/package.json +++ b/packages/express/testing/package.json @@ -34,16 +34,16 @@ }, "devDependencies": { "@graphql-ez/express": "workspace:^0.9.8", - "@types/express": "^4.17.13", - "@types/node": "^18.7.14", + "@types/express": "^4.17.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "express": "^4.18.1", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "typescript": "^4.8.4" }, "peerDependencies": { "@graphql-ez/express": "workspace:^0.9.8", diff --git a/packages/fastify/main/package.json b/packages/fastify/main/package.json index 77c12ab1c..b9c6f779d 100644 --- a/packages/fastify/main/package.json +++ b/packages/fastify/main/package.json @@ -34,16 +34,16 @@ "@graphql-ez/utils": "workspace:^0.1.4" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", - "fastify": "^4.5.3", + "esbuild": "^0.15.10", + "fastify": "^4.7.0", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "@types/node": "*", diff --git a/packages/fastify/main/test/main.test.ts b/packages/fastify/main/test/main.test.ts index 7ce128ebb..fb995191e 100644 --- a/packages/fastify/main/test/main.test.ts +++ b/packages/fastify/main/test/main.test.ts @@ -132,28 +132,28 @@ test('basic', async () => { `); expect(printSchema((await ezApp.getEnveloped)().schema)).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD diff --git a/packages/fastify/testing/package.json b/packages/fastify/testing/package.json index f09c18a92..181bf0ec9 100644 --- a/packages/fastify/testing/package.json +++ b/packages/fastify/testing/package.json @@ -34,15 +34,15 @@ }, "devDependencies": { "@graphql-ez/fastify": "workspace:^0.11.0", - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", - "fastify": "^4.5.3", + "esbuild": "^0.15.10", + "fastify": "^4.7.0", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "typescript": "^4.8.4" }, "peerDependencies": { "@graphql-ez/fastify": "workspace:^0.11.0", diff --git a/packages/hapi/main/package.json b/packages/hapi/main/package.json index f9a2e19e7..463ebb559 100644 --- a/packages/hapi/main/package.json +++ b/packages/hapi/main/package.json @@ -31,15 +31,15 @@ }, "devDependencies": { "@types/hapi__hapi": "20.0.12", - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "@hapi/hapi": "^20.2.2", diff --git a/packages/hapi/main/test/main.test.ts b/packages/hapi/main/test/main.test.ts index ab77ef915..99b3b6c7a 100644 --- a/packages/hapi/main/test/main.test.ts +++ b/packages/hapi/main/test/main.test.ts @@ -133,28 +133,28 @@ test('basic', async () => { `); expect(printSchema(ezApp.getEnveloped().schema)).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD diff --git a/packages/hapi/testing/package.json b/packages/hapi/testing/package.json index fa3a2bb85..e8fd3ac4e 100644 --- a/packages/hapi/testing/package.json +++ b/packages/hapi/testing/package.json @@ -36,14 +36,14 @@ "@graphql-ez/hapi": "workspace:^0.8.10", "@hapi/hapi": "^20.2.2", "@types/hapi__hapi": "20.0.12", - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "typescript": "^4.8.4" }, "peerDependencies": { "@graphql-ez/hapi": "workspace:^0.8.10", diff --git a/packages/helix/core/package.json b/packages/helix/core/package.json index f13ead1f0..144d6048e 100644 --- a/packages/helix/core/package.json +++ b/packages/helix/core/package.json @@ -31,12 +31,12 @@ "prepack": "bob-esbuild build" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", - "typescript": "^4.8.2" + "typescript": "^4.8.4" }, "publishConfig": { "directory": "dist" diff --git a/packages/helix/graphiql/package.json b/packages/helix/graphiql/package.json index 462798d4d..f87bb4bc0 100644 --- a/packages/helix/graphiql/package.json +++ b/packages/helix/graphiql/package.json @@ -36,30 +36,30 @@ }, "devDependencies": { "@graphiql/toolkit": "0.4.5", - "@graphql-tools/url-loader": "^7.14.2", - "@graphql-tools/utils": "^8.10.1", + "@graphql-tools/url-loader": "^7.16.4", + "@graphql-tools/utils": "^8.12.0", "@n1ru4l/graphql-live-query": "^0.9.0", - "@types/node": "^18.7.14", - "@types/prettier": "^2.7.0", + "@types/node": "^18.8.3", + "@types/prettier": "^2.7.1", "@types/prop-types": "^15.7.5", - "@types/react": "^17.0.49", + "@types/react": "^17.0.50", "@types/react-dom": "^18.0.6", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "concurrently": "^7.3.0", + "concurrently": "^7.4.0", "copy-to-clipboard": "^3.3.2", "cpy": "^9.0.1", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphiql": "^1.11.5", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", "graphql-language-service-interface": "^2.10.2", - "graphql-ws": "^5.10.1", + "graphql-ws": "^5.11.2", "prettier": "^2.7.1", "prop-types": "^15.8.1", "react": "^17.0.2", "react-dom": "^17.0.2", - "typescript": "^4.8.2" + "typescript": "^4.8.4" }, "publishConfig": { "directory": "dist" diff --git a/packages/http/main/package.json b/packages/http/main/package.json index bb3caa019..39e4f8736 100644 --- a/packages/http/main/package.json +++ b/packages/http/main/package.json @@ -35,15 +35,15 @@ "cors": "^2.8.5" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "@types/node": "*", diff --git a/packages/http/main/test/main.test.ts b/packages/http/main/test/main.test.ts index 16ec28a07..8cc8af44a 100644 --- a/packages/http/main/test/main.test.ts +++ b/packages/http/main/test/main.test.ts @@ -133,28 +133,28 @@ test('basic', async () => { `); expect(printSchema((await ezApp.getEnveloped)().schema)).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD diff --git a/packages/http/testing/package.json b/packages/http/testing/package.json index eb7b9852c..cb11574e2 100644 --- a/packages/http/testing/package.json +++ b/packages/http/testing/package.json @@ -34,14 +34,14 @@ }, "devDependencies": { "@graphql-ez/http": "workspace:^0.10.4", - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "typescript": "^4.8.4" }, "peerDependencies": { "@graphql-ez/http": "workspace:^0.10.4", diff --git a/packages/koa/main/package.json b/packages/koa/main/package.json index c9d03d472..4e8798c6f 100644 --- a/packages/koa/main/package.json +++ b/packages/koa/main/package.json @@ -30,25 +30,25 @@ "test": "jest" }, "dependencies": { - "@koa/cors": "^3.4.1", - "@types/koa-bodyparser": "^4.3.7", + "@koa/cors": "^4.0.0", + "@types/koa-bodyparser": "^4.3.8", "@types/koa__cors": "^3.3.0", "koa-bodyparser": "^4.3.0" }, "devDependencies": { "@koa/router": "^12.0.0", "@types/koa": "^2.13.5", - "@types/koa__router": "^8.0.11", - "@types/node": "^18.7.14", + "@types/koa__router": "^12.0.0", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", + "jest": "^29.1.2", "koa": "^2.13.4", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "@koa/router": "^10.1.1", diff --git a/packages/koa/main/test/main.test.ts b/packages/koa/main/test/main.test.ts index 0d7eb7a8c..ba7d8a1e9 100644 --- a/packages/koa/main/test/main.test.ts +++ b/packages/koa/main/test/main.test.ts @@ -133,28 +133,28 @@ test('basic', async () => { `); expect(printSchema(ezApp.getEnveloped().schema)).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD diff --git a/packages/koa/testing/package.json b/packages/koa/testing/package.json index 3a8db81bd..638004959 100644 --- a/packages/koa/testing/package.json +++ b/packages/koa/testing/package.json @@ -36,16 +36,16 @@ "@graphql-ez/koa": "workspace:^0.8.11", "@koa/router": "^12.0.0", "@types/koa": "^2.13.5", - "@types/koa__router": "^8.0.11", - "@types/node": "^18.7.14", + "@types/koa__router": "^12.0.0", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", + "jest": "^29.1.2", "koa": "^2.13.4", - "typescript": "^4.8.2" + "typescript": "^4.8.4" }, "peerDependencies": { "@graphql-ez/koa": "workspace:^0.8.11", diff --git a/packages/nextjs/main/package.json b/packages/nextjs/main/package.json index 2a076d68e..8e76b56ab 100644 --- a/packages/nextjs/main/package.json +++ b/packages/nextjs/main/package.json @@ -34,22 +34,22 @@ "cors": "^2.8.5" }, "devDependencies": { - "@graphql-tools/schema": "^9.0.2", - "@types/node": "^18.7.14", - "@types/react": "^17.0.49", + "@graphql-tools/schema": "^9.0.4", + "@types/node": "^18.8.3", + "@types/react": "^17.0.50", "@types/react-dom": "^18.0.6", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "next": "^12.2.5", + "jest": "^29.1.2", + "next": "^12.3.1", "next-test-api-route-handler": "^3.1.7", "react": "^17.0.2", "react-dom": "^17.0.2", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "@types/node": "*", diff --git a/packages/nextjs/testing/package.json b/packages/nextjs/testing/package.json index ba34116b9..8f775393e 100644 --- a/packages/nextjs/testing/package.json +++ b/packages/nextjs/testing/package.json @@ -35,13 +35,13 @@ }, "devDependencies": { "@graphql-ez/nextjs": "workspace:^0.10.2", - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "next": "^12.2.5", - "typescript": "^4.8.2" + "next": "^12.3.1", + "typescript": "^4.8.4" }, "peerDependencies": { "@graphql-ez/nextjs": "workspace:^0.10.2", diff --git a/packages/nextjs/testing/test/main.test.ts b/packages/nextjs/testing/test/main.test.ts index f4034b8e5..f4c1dd778 100644 --- a/packages/nextjs/testing/test/main.test.ts +++ b/packages/nextjs/testing/test/main.test.ts @@ -22,28 +22,28 @@ test('from preset', async () => { `); expect(schemaString).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD diff --git a/packages/plugin/altair/package.json b/packages/plugin/altair/package.json index 7bc6f4bed..f23da1cc6 100644 --- a/packages/plugin/altair/package.json +++ b/packages/plugin/altair/package.json @@ -32,20 +32,20 @@ "dependencies": { "@graphql-ez/utils": "workspace:^0.1.4", "altair-static-slim": "4.5.4", - "cross-fetch": "^3.1.5", + "cross-undici-fetch": "^0.4.14", "mime-types": "^2.1.35" }, "devDependencies": { "@types/mime-types": "^2.1.1", - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "next": "^12.2.5", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "next": "^12.3.1", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "@types/node": "*", diff --git a/packages/plugin/altair/src/integrations/sveltekit.ts b/packages/plugin/altair/src/integrations/sveltekit.ts index 9c6e6fafd..042e12a37 100644 --- a/packages/plugin/altair/src/integrations/sveltekit.ts +++ b/packages/plugin/altair/src/integrations/sveltekit.ts @@ -34,11 +34,14 @@ export const handleSvelteKit: IntegrationRegisterHandler<'sveltekit'> = async ({ }, url: req.url.pathname, }).then(({ status, content, contentType }) => { - return { - headers: contentType ? { 'content-type': contentType } : ({} as {}), + return new Response(content, { + headers: contentType + ? { + 'content-type': contentType, + } + : {}, status, - body: content, - }; + }); }); } diff --git a/packages/plugin/altair/src/render/unpkg.ts b/packages/plugin/altair/src/render/unpkg.ts index 0bc0f3661..4de266b67 100644 --- a/packages/plugin/altair/src/render/unpkg.ts +++ b/packages/plugin/altair/src/render/unpkg.ts @@ -1,10 +1,17 @@ import { withoutTrailingSlash, withTrailingSlash } from '@graphql-ez/utils/url'; import type { AltairConfigOptions, RenderOptions } from 'altair-static-slim'; -import crossFetch from 'cross-fetch'; import type { AltairRender } from '../types'; export const altairUnpkgDist = 'https://unpkg.com/altair-static@4.3.1/build/dist/'; +let fetchFn: Promise | typeof fetch; + +if (typeof fetch !== 'undefined') { + fetchFn = fetch; +} else { + fetchFn = import('cross-undici-fetch').then(v => v.fetch); +} + function getObjectPropertyForOption(option: any, propertyName: keyof AltairConfigOptions) { if (option) { switch (typeof option) { @@ -49,14 +56,14 @@ export const renderInitialOptions = (options: RenderOptions = {}) => { `; }; -const fetchFn = typeof fetch !== 'undefined' ? fetch : crossFetch; +// const fetchFn = typeof fetch !== 'undefined' ? fetch : crossFetch; /** * Render Altair as a string using the provided renderOptions * @param renderOptions */ export const renderAltair = async (options: RenderOptions = {}) => { - const altairHtml = await (await fetchFn(altairUnpkgDist + 'index.html')).text(); + const altairHtml = await (await (await fetchFn)(altairUnpkgDist + 'index.html')).text(); const initialOptions = renderInitialOptions(options); const baseURL = options.baseURL || './'; @@ -86,7 +93,7 @@ export const UnpkgRender: AltairRender = async ({ baseURL, url, altairPath, rend const resolvedPath = altairUnpkgDist + url.slice(baseURL.length); - const fetchResult = await fetchFn(resolvedPath).catch(() => null); + const fetchResult = await (await fetchFn)(resolvedPath).catch(() => null); if (!fetchResult) return { status: 404, isBasePath: false }; diff --git a/packages/plugin/altair/test/main.test.ts b/packages/plugin/altair/test/main.test.ts index 179c7501d..0ea64b59c 100644 --- a/packages/plugin/altair/test/main.test.ts +++ b/packages/plugin/altair/test/main.test.ts @@ -36,12 +36,12 @@ test('fastify', async () => { - + Altair - - - - + + + + @@ -82,12 +82,12 @@ test('express', async () => { - + Altair - - - - + + + + @@ -128,12 +128,12 @@ test('http', async () => { - + Altair - - - - + + + + @@ -174,12 +174,12 @@ test('hapi', async () => { - + Altair - - - - + + + + @@ -220,12 +220,12 @@ test('koa', async () => { - + Altair - - - - + + + + diff --git a/packages/plugin/automatic-persisted-queries/package.json b/packages/plugin/automatic-persisted-queries/package.json index f6235bffb..0ca553c75 100644 --- a/packages/plugin/automatic-persisted-queries/package.json +++ b/packages/plugin/automatic-persisted-queries/package.json @@ -31,18 +31,18 @@ }, "dependencies": { "@graphql-ez/utils": "workspace:^0.1.4", - "tiny-lru": "^8.0.2" + "tiny-lru": "^9.0.3" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "graphql": "*", diff --git a/packages/plugin/automatic-persisted-queries/src/store.ts b/packages/plugin/automatic-persisted-queries/src/store.ts index 261084ea5..014050cea 100644 --- a/packages/plugin/automatic-persisted-queries/src/store.ts +++ b/packages/plugin/automatic-persisted-queries/src/store.ts @@ -1,4 +1,4 @@ -import LRU from 'tiny-lru'; +import { lru } from 'tiny-lru'; import type { PromiseOrValue } from 'graphql-ez'; export interface PersistedQueryStore { @@ -28,7 +28,7 @@ export const createLRUStore = (maxSize?: number, ttl?: number): PersistedQuerySt // Initialize a LRU cache in the local scope. // LRU is used to prevent DoS attacks. - const cache = LRU(maxSize, ttl); + const cache = lru(maxSize, ttl); return { async get(hash: string) { return cache.get(hash) ?? null; diff --git a/packages/plugin/codegen/package.json b/packages/plugin/codegen/package.json index 72038a17d..53fd2d620 100644 --- a/packages/plugin/codegen/package.json +++ b/packages/plugin/codegen/package.json @@ -31,32 +31,32 @@ }, "dependencies": { "@graphql-codegen/core": "^2.6.2", - "@graphql-codegen/plugin-helpers": "^2.7.0", + "@graphql-codegen/plugin-helpers": "^2.7.1", "@graphql-codegen/typed-document-node": "^2.3.3", "@graphql-codegen/typescript": "^2.7.3", "@graphql-codegen/typescript-operations": "^2.5.3", "@graphql-codegen/typescript-resolvers": "^2.7.3", "@graphql-ez/utils": "workspace:^0.1.4", - "@graphql-tools/graphql-file-loader": "^7.5.3", - "@graphql-tools/load": "^7.7.5", - "@graphql-tools/utils": "^8.10.1", + "@graphql-tools/graphql-file-loader": "^7.5.5", + "@graphql-tools/load": "^7.7.7", + "@graphql-tools/utils": "^8.12.0", "mkdirp": "^1.0.4", "prettier": "^2.7.1" }, "devDependencies": { "@types/fs-extra": "^9.0.13", "@types/mkdirp": "^1.0.2", - "@types/node": "^18.7.14", - "@types/prettier": "^2.7.0", + "@types/node": "^18.8.3", + "@types/prettier": "^2.7.1", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", + "jest": "^29.1.2", "tmp-promise": "^3.0.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "graphql": "*", diff --git a/packages/plugin/codegen/test/main.test.ts b/packages/plugin/codegen/test/main.test.ts index a00a80f26..cfb02ab73 100644 --- a/packages/plugin/codegen/test/main.test.ts +++ b/packages/plugin/codegen/test/main.test.ts @@ -260,28 +260,28 @@ test('typescript resolvers', async () => { expect(Object.keys(introspectionJson)).toStrictEqual(['__schema']); expect(printSchema(buildClientSchema(introspectionJson))).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD @@ -306,31 +306,31 @@ test('typescript resolvers', async () => { query: Query } - \\"Directs the executor to defer this fragment when the \`if\` argument is true or undefined.\\" + "Directs the executor to defer this fragment when the \`if\` argument is true or undefined." directive @defer( - \\"\\"\\" + """ Deferred when true or undefined. - \\"\\"\\" + """ if: Boolean - \\"\\"\\" + """ Unique name - \\"\\"\\" + """ label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"Directs the executor to stream plural fields when the \`if\` argument is true or undefined.\\" + "Directs the executor to stream plural fields when the \`if\` argument is true or undefined." directive @stream( - \\"\\"\\" + """ Stream when true or undefined. - \\"\\"\\" + """ if: Boolean - \\"\\"\\" + """ Unique name - \\"\\"\\" + """ label: String - \\"\\"\\" + """ Number of items to return immediately - \\"\\"\\" + """ initialCount: Int = 0 ) on FIELD diff --git a/packages/plugin/dataloader/package.json b/packages/plugin/dataloader/package.json index b47d6a607..f79212fcf 100644 --- a/packages/plugin/dataloader/package.json +++ b/packages/plugin/dataloader/package.json @@ -36,16 +36,16 @@ }, "devDependencies": { "@envelop/core": "^2.6.0", - "@pothos/core": "^3.19.1", - "@types/node": "^18.7.14", + "@pothos/core": "^3.22.5", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "graphql-ez": "workspace:^0.15.1" diff --git a/packages/plugin/graphiql/package.json b/packages/plugin/graphiql/package.json index d64fadacc..973b8997e 100644 --- a/packages/plugin/graphiql/package.json +++ b/packages/plugin/graphiql/package.json @@ -34,15 +34,15 @@ "@pablosz/graphql-helix-graphiql": "workspace:^4.2.1" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "next": "^12.2.5", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "next": "^12.3.1", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "graphql-ez": "workspace:^0.15.0" diff --git a/packages/plugin/graphiql/src/integrations/sveltekit.ts b/packages/plugin/graphiql/src/integrations/sveltekit.ts index ca1f7bffb..69afe9220 100644 --- a/packages/plugin/graphiql/src/integrations/sveltekit.ts +++ b/packages/plugin/graphiql/src/integrations/sveltekit.ts @@ -8,13 +8,12 @@ export const handleSvelteKit: IntegrationRegisterHandler<'sveltekit'> = async ({ const path = ctx.graphiql.path; - const objResponse = { + const objResponse = new Response(html, { status: 200, headers: { 'content-type': 'text/html', }, - body: html, - }; + }); // If no root path is specific, the expected behavior is // to render graphiql only if the method is GET and no query params are specified diff --git a/packages/plugin/graphiql/test/main.test.ts b/packages/plugin/graphiql/test/main.test.ts index 09779f67b..2bdb1fe96 100644 --- a/packages/plugin/graphiql/test/main.test.ts +++ b/packages/plugin/graphiql/test/main.test.ts @@ -40,14 +40,14 @@ test.only('fastify', async () => { - + GraphiQL - - - + + + { - + GraphiQL - - - + + + { - + GraphiQL - - - + + + { - + GraphiQL - - - + + + { - + GraphiQL - - - + + + { @@ -230,14 +230,14 @@ test('http', async () => { - + GraphiQL - - - + + + { - + GraphiQL - - - + + + { - + GraphiQL - - - + + + { @@ -363,14 +363,14 @@ test('hapi-same-path', async () => { - + GraphiQL - - - + + + { - + GraphiQL - - - + + + { @@ -458,14 +458,14 @@ test('koa-same-path', async () => { - + GraphiQL - - - + + + { - + GraphiQL - - - + + + { ).text() ).slice(0, 300) ).toMatchInlineSnapshot(` - " - - - - - GraphiQL - - - - + + + + GraphiQL + + + + { `); expect(printSchema(buildClientSchema((await query(getIntrospectionQuery())).data!))).toMatchInlineSnapshot(` - "\\"\\"\\"The \`Upload\` scalar type represents a file upload.\\"\\"\\" + """"The \`Upload\` scalar type represents a file upload.""" scalar Upload type Query { diff --git a/packages/plugin/scalars/package.json b/packages/plugin/scalars/package.json index 93b1a9614..0a594c6e8 100644 --- a/packages/plugin/scalars/package.json +++ b/packages/plugin/scalars/package.json @@ -31,19 +31,19 @@ }, "dependencies": { "@graphql-ez/utils": "workspace:^0.1.4", - "@graphql-tools/utils": "^8.10.1", + "@graphql-tools/utils": "^8.12.0", "graphql-scalars": "^1.18.0" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "graphql": "*", diff --git a/packages/plugin/scalars/test/main.test.ts b/packages/plugin/scalars/test/main.test.ts index acb0edc11..f6a08ccba 100644 --- a/packages/plugin/scalars/test/main.test.ts +++ b/packages/plugin/scalars/test/main.test.ts @@ -15,28 +15,28 @@ test('all scalars', async () => { }); expect(printSchema(buildClientSchema((await query(getIntrospectionQuery())).data!))).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD @@ -51,263 +51,263 @@ test('all scalars', async () => { id: Int! } - \\"\\"\\" + """ A date string, such as 2007-12-03, compliant with the \`full-date\` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. - \\"\\"\\" + """ scalar Date - \\"\\"\\" + """ A time string at UTC, such as 10:15:30Z, compliant with the \`full-time\` format outlined in section 5.6 of the RFC 3339profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. - \\"\\"\\" + """ scalar Time - \\"\\"\\" + """ A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the \`date-time\` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. - \\"\\"\\" + """ scalar DateTime - \\"\\"\\" + """ The javascript \`Date\` as integer. Type represents date and time as number of milliseconds from start of UNIX epoch. - \\"\\"\\" + """ scalar Timestamp - \\"\\"\\" + """ A field whose value exists in the standard IANA Time Zone Database: https://www.iana.org/time-zones - \\"\\"\\" + """ scalar TimeZone - \\"\\"\\" + """ A field whose value is a UTC Offset: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - \\"\\"\\" + """ scalar UtcOffset - \\"\\\\n A string representing a duration conforming to the ISO8601 standard,\\\\n such as: P1W1DT13H23M34S\\\\n P is the duration designator (for period) placed at the start of the duration representation.\\\\n Y is the year designator that follows the value for the number of years.\\\\n M is the month designator that follows the value for the number of months.\\\\n W is the week designator that follows the value for the number of weeks.\\\\n D is the day designator that follows the value for the number of days.\\\\n T is the time designator that precedes the time components of the representation.\\\\n H is the hour designator that follows the value for the number of hours.\\\\n M is the minute designator that follows the value for the number of minutes.\\\\n S is the second designator that follows the value for the number of seconds.\\\\n\\\\n Note the time designator, T, that precedes the time value.\\\\n\\\\n Matches moment.js, Luxon and DateFns implementations\\\\n ,/. is valid for decimal places and +/- is a valid prefix\\\\n \\" + "\\n A string representing a duration conforming to the ISO8601 standard,\\n such as: P1W1DT13H23M34S\\n P is the duration designator (for period) placed at the start of the duration representation.\\n Y is the year designator that follows the value for the number of years.\\n M is the month designator that follows the value for the number of months.\\n W is the week designator that follows the value for the number of weeks.\\n D is the day designator that follows the value for the number of days.\\n T is the time designator that precedes the time components of the representation.\\n H is the hour designator that follows the value for the number of hours.\\n M is the minute designator that follows the value for the number of minutes.\\n S is the second designator that follows the value for the number of seconds.\\n\\n Note the time designator, T, that precedes the time value.\\n\\n Matches moment.js, Luxon and DateFns implementations\\n ,/. is valid for decimal places and +/- is a valid prefix\\n " scalar Duration - \\"\\\\n A string representing a duration conforming to the ISO8601 standard,\\\\n such as: P1W1DT13H23M34S\\\\n P is the duration designator (for period) placed at the start of the duration representation.\\\\n Y is the year designator that follows the value for the number of years.\\\\n M is the month designator that follows the value for the number of months.\\\\n W is the week designator that follows the value for the number of weeks.\\\\n D is the day designator that follows the value for the number of days.\\\\n T is the time designator that precedes the time components of the representation.\\\\n H is the hour designator that follows the value for the number of hours.\\\\n M is the minute designator that follows the value for the number of minutes.\\\\n S is the second designator that follows the value for the number of seconds.\\\\n\\\\n Note the time designator, T, that precedes the time value.\\\\n\\\\n Matches moment.js, Luxon and DateFns implementations\\\\n ,/. is valid for decimal places and +/- is a valid prefix\\\\n \\" + "\\n A string representing a duration conforming to the ISO8601 standard,\\n such as: P1W1DT13H23M34S\\n P is the duration designator (for period) placed at the start of the duration representation.\\n Y is the year designator that follows the value for the number of years.\\n M is the month designator that follows the value for the number of months.\\n W is the week designator that follows the value for the number of weeks.\\n D is the day designator that follows the value for the number of days.\\n T is the time designator that precedes the time components of the representation.\\n H is the hour designator that follows the value for the number of hours.\\n M is the minute designator that follows the value for the number of minutes.\\n S is the second designator that follows the value for the number of seconds.\\n\\n Note the time designator, T, that precedes the time value.\\n\\n Matches moment.js, Luxon and DateFns implementations\\n ,/. is valid for decimal places and +/- is a valid prefix\\n " scalar ISO8601Duration - \\"\\"\\" + """ A local date string (i.e., with no associated timezone) in \`YYYY-MM-DD\` format, e.g. \`2020-01-01\`. - \\"\\"\\" + """ scalar LocalDate - \\"\\"\\" + """ A local time string (i.e., with no associated timezone) in 24-hr \`HH:mm[:ss[.SSS]]\` format, e.g. \`14:25\` or \`14:25:06\` or \`14:25:06.123\`. - \\"\\"\\" + """ scalar LocalTime - \\"\\"\\" + """ A local time string (i.e., with no associated timezone) in 24-hr \`HH:mm[:ss[.SSS]]\` format, e.g. \`14:25\` or \`14:25:06\` or \`14:25:06.123\`. This scalar is very similar to the \`LocalTime\`, with the only difference being that \`LocalEndTime\` also allows \`24:00\` as a valid value to indicate midnight of the following day. This is useful when using the scalar to represent the exclusive upper bound of a time block. - \\"\\"\\" + """ scalar LocalEndTime - \\"\\"\\" + """ A field whose value conforms to the standard internet email address format as specified in RFC822: https://www.w3.org/Protocols/rfc822/. - \\"\\"\\" + """ scalar EmailAddress - \\"\\"\\"Floats that will have a value less than 0.\\"\\"\\" + """Floats that will have a value less than 0.""" scalar NegativeFloat - \\"\\"\\"Integers that will have a value less than 0.\\"\\"\\" + """Integers that will have a value less than 0.""" scalar NegativeInt - \\"\\"\\"A string that cannot be passed as an empty value\\"\\"\\" + """A string that cannot be passed as an empty value""" scalar NonEmptyString - \\"\\"\\"Floats that will have a value of 0 or more.\\"\\"\\" + """Floats that will have a value of 0 or more.""" scalar NonNegativeFloat - \\"\\"\\"Integers that will have a value of 0 or more.\\"\\"\\" + """Integers that will have a value of 0 or more.""" scalar NonNegativeInt - \\"\\"\\"Floats that will have a value of 0 or less.\\"\\"\\" + """Floats that will have a value of 0 or less.""" scalar NonPositiveFloat - \\"\\"\\"Integers that will have a value of 0 or less.\\"\\"\\" + """Integers that will have a value of 0 or less.""" scalar NonPositiveInt - \\"\\"\\" + """ A field whose value conforms to the standard E.164 format as specified in: https://en.wikipedia.org/wiki/E.164. Basically this is +17895551234. - \\"\\"\\" + """ scalar PhoneNumber - \\"\\"\\"Floats that will have a value greater than 0.\\"\\"\\" + """Floats that will have a value greater than 0.""" scalar PositiveFloat - \\"\\"\\"Integers that will have a value greater than 0.\\"\\"\\" + """Integers that will have a value greater than 0.""" scalar PositiveInt - \\"\\"\\" + """ A field whose value conforms to the standard postal code formats for United States, United Kingdom, Germany, Canada, France, Italy, Australia, Netherlands, Spain, Denmark, Sweden, Belgium, India, Austria, Portugal, Switzerland or Luxembourg. - \\"\\"\\" + """ scalar PostalCode - \\"\\"\\"Floats that will have a value of 0 or more.\\"\\"\\" + """Floats that will have a value of 0 or more.""" scalar UnsignedFloat - \\"\\"\\"Integers that will have a value of 0 or more.\\"\\"\\" + """Integers that will have a value of 0 or more.""" scalar UnsignedInt - \\"\\"\\" + """ A field whose value conforms to the standard URL format as specified in RFC3986: https://www.ietf.org/rfc/rfc3986.txt. - \\"\\"\\" + """ scalar URL - \\"\\"\\" + """ The \`BigInt\` scalar type represents non-fractional signed whole numeric values. - \\"\\"\\" + """ scalar BigInt - \\"\\"\\" + """ The \`BigInt\` scalar type represents non-fractional signed whole numeric values. - \\"\\"\\" + """ scalar Long - \\"\\"\\"The \`Byte\` scalar type represents byte value as a Buffer\\"\\"\\" + """The \`Byte\` scalar type represents byte value as a Buffer""" scalar Byte - \\"\\"\\" + """ A field whose value is a generic Universally Unique Identifier: https://en.wikipedia.org/wiki/Universally_unique_identifier. - \\"\\"\\" + """ scalar UUID - \\"\\"\\" + """ A field whose value is a generic Universally Unique Identifier: https://en.wikipedia.org/wiki/Universally_unique_identifier. - \\"\\"\\" + """ scalar GUID - \\"\\"\\" + """ A field whose value is a hexadecimal: https://en.wikipedia.org/wiki/Hexadecimal. - \\"\\"\\" + """ scalar Hexadecimal - \\"\\"\\" + """ A field whose value is a hex color code: https://en.wikipedia.org/wiki/Web_colors. - \\"\\"\\" + """ scalar HexColorCode - \\"\\"\\" + """ A field whose value is a CSS HSL color: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#hsl()_and_hsla(). - \\"\\"\\" + """ scalar HSL - \\"\\"\\" + """ A field whose value is a CSS HSLA color: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#hsl()_and_hsla(). - \\"\\"\\" + """ scalar HSLA - \\"\\"\\" + """ A field whose value is a IPv4 address: https://en.wikipedia.org/wiki/IPv4. - \\"\\"\\" + """ scalar IPv4 - \\"\\"\\" + """ A field whose value is a IPv6 address: https://en.wikipedia.org/wiki/IPv6. - \\"\\"\\" + """ scalar IPv6 - \\"\\"\\" + """ A field whose value is a ISBN-10 or ISBN-13 number: https://en.wikipedia.org/wiki/International_Standard_Book_Number. - \\"\\"\\" + """ scalar ISBN - \\"\\"\\" + """ A field whose value is a JSON Web Token (JWT): https://jwt.io/introduction. - \\"\\"\\" + """ scalar JWT - \\"\\"\\" + """ A field whose value is a valid decimal degrees latitude number (53.471): https://en.wikipedia.org/wiki/Latitude - \\"\\"\\" + """ scalar Latitude - \\"\\"\\" + """ A field whose value is a valid decimal degrees longitude number (53.471): https://en.wikipedia.org/wiki/Longitude - \\"\\"\\" + """ scalar Longitude - \\"\\"\\" + """ A field whose value is a IEEE 802 48-bit MAC address: https://en.wikipedia.org/wiki/MAC_address. - \\"\\"\\" + """ scalar MAC - \\"\\"\\" + """ A field whose value is a valid TCP port within the range of 0 to 65535: https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_ports - \\"\\"\\" + """ scalar Port - \\"\\"\\" + """ A field whose value is a CSS RGB color: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgb()_and_rgba(). - \\"\\"\\" + """ scalar RGB - \\"\\"\\" + """ A field whose value is a CSS RGBA color: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgb()_and_rgba(). - \\"\\"\\" + """ scalar RGBA - \\"\\"\\" + """ The \`SafeInt\` scalar type represents non-fractional signed whole numeric values that are considered safe as defined by the ECMAScript specification. - \\"\\"\\" + """ scalar SafeInt - \\"\\"\\"A currency string, such as $21.25\\"\\"\\" + """A currency string, such as $21.25""" scalar USCurrency - \\"\\"\\" + """ A field whose value is a Currency: https://en.wikipedia.org/wiki/ISO_4217. - \\"\\"\\" + """ scalar Currency - \\"\\"\\" + """ The \`JSON\` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). - \\"\\"\\" + """ scalar JSON - \\"\\"\\" + """ The \`JSONObject\` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). - \\"\\"\\" + """ scalar JSONObject - \\"\\"\\" + """ A field whose value is an International Bank Account Number (IBAN): https://en.wikipedia.org/wiki/International_Bank_Account_Number. - \\"\\"\\" + """ scalar IBAN - \\"\\"\\" + """ A field whose value conforms with the standard mongodb object ID as described here: https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId. Example: 5e5677d71bdc2ae76344968c - \\"\\"\\" + """ scalar ObjectID - \\"\\"\\"Represents NULL values\\"\\"\\" + """Represents NULL values""" scalar Void - \\"\\"\\" + """ A field whose value conforms to the standard DID format as specified in did-core: https://www.w3.org/TR/did-core/. - \\"\\"\\" + """ scalar DID - \\"\\"\\"A country code as defined by ISO 3166-1 alpha-2\\"\\"\\" + """A country code as defined by ISO 3166-1 alpha-2""" scalar CountryCode - \\"\\"\\"The locale in the format of a BCP 47 (RFC 5646) standard string\\"\\"\\" + """The locale in the format of a BCP 47 (RFC 5646) standard string""" scalar Locale - \\"\\"\\" + """ In the US, an ABA routing transit number (\`ABA RTN\`) is a nine-digit code to identify the financial institution. - \\"\\"\\" + """ scalar RoutingNumber - \\"\\"\\" + """ Banking account number is a string of 5 to 17 alphanumeric values for representing an generic account number - \\"\\"\\" + """ scalar AccountNumber - \\"\\"\\" + """ A field whose value conforms to the standard cuid format as specified in https://github.com/ericelliott/cuid#broken-down - \\"\\"\\" + """ scalar Cuid" `); }); @@ -323,28 +323,28 @@ test('scalars in list', async () => { }); expect(printSchema(buildClientSchema((await query(getIntrospectionQuery())).data!))).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD @@ -359,9 +359,9 @@ test('scalars in list', async () => { id: Int! } - \\"\\"\\" + """ A field whose value is a Currency: https://en.wikipedia.org/wiki/ISO_4217. - \\"\\"\\" + """ scalar Currency" `); }); @@ -382,28 +382,28 @@ test('scalars in object', async () => { }); expect(printSchema(buildClientSchema((await query(getIntrospectionQuery())).data!))).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD @@ -418,9 +418,9 @@ test('scalars in object', async () => { id: Int! } - \\"\\"\\" + """ A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the \`date-time\` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. - \\"\\"\\" + """ scalar DateTime" `); }); diff --git a/packages/plugin/schema/package.json b/packages/plugin/schema/package.json index 14c65b29d..4aefbdaeb 100644 --- a/packages/plugin/schema/package.json +++ b/packages/plugin/schema/package.json @@ -30,19 +30,19 @@ }, "dependencies": { "@graphql-ez/utils": "workspace:^0.1.4", - "@graphql-tools/schema": "^9.0.2", - "@graphql-tools/utils": "^8.10.1" + "@graphql-tools/schema": "^9.0.4", + "@graphql-tools/utils": "^8.12.0" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild": "^4.0.3", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "graphql": "*", diff --git a/packages/plugin/schema/test/main.test.ts b/packages/plugin/schema/test/main.test.ts index 300dce69e..269651767 100644 --- a/packages/plugin/schema/test/main.test.ts +++ b/packages/plugin/schema/test/main.test.ts @@ -456,28 +456,28 @@ test('adds the specified graphql schema config', async () => { expect(schemaString).toContain('@defer'); expect(schemaString).toMatchInlineSnapshot(` - "\\"\\"\\" + """" Directs the executor to defer this fragment when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @defer( - \\"\\"\\"Deferred when true or undefined.\\"\\"\\" + """Deferred when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String ) on FRAGMENT_SPREAD | INLINE_FRAGMENT - \\"\\"\\" + """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. - \\"\\"\\" + """ directive @stream( - \\"\\"\\"Stream when true or undefined.\\"\\"\\" + """Stream when true or undefined.""" if: Boolean - \\"\\"\\"Unique name\\"\\"\\" + """Unique name""" label: String - \\"\\"\\"Number of items to return immediately\\"\\"\\" + """Number of items to return immediately""" initialCount: Int = 0 ) on FIELD diff --git a/packages/plugin/sse/package.json b/packages/plugin/sse/package.json index 0b4b9210f..c29571f89 100644 --- a/packages/plugin/sse/package.json +++ b/packages/plugin/sse/package.json @@ -29,14 +29,14 @@ "postpublish": "gh-release" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "typescript": "^4.8.4" }, "peerDependencies": { "@types/node": "*", diff --git a/packages/plugin/upload/package.json b/packages/plugin/upload/package.json index 7774824d8..9744ca08b 100644 --- a/packages/plugin/upload/package.json +++ b/packages/plugin/upload/package.json @@ -31,18 +31,18 @@ }, "devDependencies": { "@types/graphql-upload": "^8.0.11", - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "@types/node-fetch": "^2.6.2", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql": "16.1.0-experimental-stream-defer.6", "graphql-ez": "workspace:^0.15.1", "graphql-upload": "^13.0.0", - "jest": "^28.1.3", + "jest": "^29.1.2", "node-fetch": "^2.6.7", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "@types/graphql-upload": "*", diff --git a/packages/plugin/upload/test/main.test.ts b/packages/plugin/upload/test/main.test.ts index 825574582..82752b913 100644 --- a/packages/plugin/upload/test/main.test.ts +++ b/packages/plugin/upload/test/main.test.ts @@ -131,7 +131,7 @@ test('express', async () => { headers: body.getHeaders(), }); - expect(await response.clone().text()).toMatchInlineSnapshot(`"{\\"data\\":{\\"uploadFileToBase64\\":\\"aGVsbG8td29ybGQ=\\"}}"`); + expect(await response.clone().text()).toMatchInlineSnapshot(`"{"data":{"uploadFileToBase64":"aGVsbG8td29ybGQ="}}"`); expect(response.status).toBe(200); @@ -169,7 +169,7 @@ test('koa', async () => { headers: body.getHeaders(), }); - expect(await response.clone().text()).toMatchInlineSnapshot(`"{\\"data\\":{\\"uploadFileToBase64\\":\\"aGVsbG8td29ybGQ=\\"}}"`); + expect(await response.clone().text()).toMatchInlineSnapshot(`"{"data":{"uploadFileToBase64":"aGVsbG8td29ybGQ="}}"`); expect(response.status).toBe(200); diff --git a/packages/plugin/voyager/package.json b/packages/plugin/voyager/package.json index 128ca3346..002733325 100644 --- a/packages/plugin/voyager/package.json +++ b/packages/plugin/voyager/package.json @@ -30,15 +30,15 @@ "test": "jest" }, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^18.8.3", "bob-esbuild-cli": "^4.0.0", "changesets-github-release": "^0.1.0", - "esbuild": "^0.15.6", + "esbuild": "^0.15.10", "graphql-ez": "workspace:^0.15.1", - "jest": "^28.1.3", - "next": "^12.2.5", - "ts-jest": "^28.0.8", - "typescript": "^4.8.2" + "jest": "^29.1.2", + "next": "^12.3.1", + "ts-jest": "^29.0.3", + "typescript": "^4.8.4" }, "peerDependencies": { "graphql-ez": "workspace:^0.15.0" diff --git a/packages/plugin/voyager/src/index.ts b/packages/plugin/voyager/src/index.ts index 8ae5b849a..0ec0b5a76 100644 --- a/packages/plugin/voyager/src/index.ts +++ b/packages/plugin/voyager/src/index.ts @@ -197,13 +197,12 @@ export const ezVoyager = (options: VoyagerPluginOptions | boolean = true): EZPlu handlers.push(req => { if (req.request.method !== 'GET' || path !== req.url.pathname) return; - return { + return new Response(html, { status: 200, headers: { 'content-type': 'text/html', }, - body: html, - }; + }); }); }, async cloudflare({ integration: { router } }) { diff --git a/packages/plugin/voyager/test/main.test.ts b/packages/plugin/voyager/test/main.test.ts index b1b3f0ae8..cd9df325f 100644 --- a/packages/plugin/voyager/test/main.test.ts +++ b/packages/plugin/voyager/test/main.test.ts @@ -36,7 +36,7 @@ test('fastify', async () => { - + GraphQL Voyager - - - - - - + + + + + -
-

Loading...

+
+

Loading...

- - - + + + + + -
-

Loading...

+
+

Loading...

- - - + + + + + -
-

Loading...

+
+

Loading...

- - - + + + + + -
-

Loading...

+
+

Loading...

@@ -385,7 +385,7 @@ test('koa', async () => { - + GraphQL Voyager - - - - - - + + + + + -
-

Loading...

+
+

Loading...

- - - + + + + + -
-

Loading...

+
+

Loading...