From 17d4f6ba9dad0f70cd445fcfbb05adc66982e18f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Oct 2025 17:57:37 +0000 Subject: [PATCH 1/2] chore(deps): update dependency node-fetch to v3 --- .../typescript/graphql-request/package.json | 2 +- yarn.lock | 38 ++++++++++++++++++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/packages/plugins/typescript/graphql-request/package.json b/packages/plugins/typescript/graphql-request/package.json index 9b8379da12..3ea6f14896 100644 --- a/packages/plugins/typescript/graphql-request/package.json +++ b/packages/plugins/typescript/graphql-request/package.json @@ -51,7 +51,7 @@ "@graphql-codegen/testing": "1.18.3", "@graphql-tools/schema": "10.0.25", "graphql-request": "7.2.0", - "node-fetch": "2.7.0" + "node-fetch": "3.3.2" }, "publishConfig": { "directory": "dist", diff --git a/yarn.lock b/yarn.lock index bb8156b242..8cf04af59c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3621,6 +3621,11 @@ cross-spawn@^7.0.1, cross-spawn@^7.0.3, cross-spawn@^7.0.5, cross-spawn@^7.0.6: shebang-command "^2.0.0" which "^2.0.1" +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + data-view-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.2.tgz#211a03ba95ecaf7798a8c7198d79536211f88570" @@ -4279,6 +4284,14 @@ fbjs@^3.0.0: setimmediate "^1.0.5" ua-parser-js "^1.0.35" +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -4351,6 +4364,13 @@ foreground-child@^3.3.1: cross-spawn "^7.0.6" signal-exit "^4.0.1" +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== + dependencies: + fetch-blob "^3.1.2" + fs-extra@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" @@ -6124,7 +6144,21 @@ nock@13.3.0: lodash "^4.17.21" propagate "^2.0.0" -node-fetch@2.7.0, node-fetch@^2.5.0, node-fetch@^2.6.1, node-fetch@^2.7.0: +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + +node-fetch@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + +node-fetch@^2.5.0, node-fetch@^2.6.1, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -7737,7 +7771,7 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -web-streams-polyfill@^3.2.1: +web-streams-polyfill@^3.0.3, web-streams-polyfill@^3.2.1: version "3.3.3" resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== From 58c1db9b6dff373f8b0da27cbb74cf146ffefd8d Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Thu, 6 Nov 2025 02:33:47 +0300 Subject: [PATCH 2/2] Use whatwg-node fetch --- .github/workflows/pr.yml | 14 +++- .../typescript/graphql-request/package.json | 4 +- .../tests/test-files/run-example-query.ts | 2 +- yarn.lock | 74 ++++++++++--------- 4 files changed, 51 insertions(+), 43 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c91dfb865d..2099adb73c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -4,11 +4,17 @@ on: branches: - main +permissions: + contents: read + id-token: write + pull-requests: write + jobs: - # dependencies: - # uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@main - # secrets: - # githubToken: ${{ secrets.GUILD_BOT_TOKEN }} + dependencies: + uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yml@v1 + if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }} + secrets: + githubToken: ${{ secrets.GITHUB_TOKEN }} release: uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main diff --git a/packages/plugins/typescript/graphql-request/package.json b/packages/plugins/typescript/graphql-request/package.json index 3ea6f14896..63ebc51fc5 100644 --- a/packages/plugins/typescript/graphql-request/package.json +++ b/packages/plugins/typescript/graphql-request/package.json @@ -50,8 +50,8 @@ "devDependencies": { "@graphql-codegen/testing": "1.18.3", "@graphql-tools/schema": "10.0.25", - "graphql-request": "7.2.0", - "node-fetch": "3.3.2" + "@whatwg-node/fetch": "0.10.12", + "graphql-request": "7.2.0" }, "publishConfig": { "directory": "dist", diff --git a/packages/plugins/typescript/graphql-request/tests/test-files/run-example-query.ts b/packages/plugins/typescript/graphql-request/tests/test-files/run-example-query.ts index 94ce975ba8..36faee1f2a 100644 --- a/packages/plugins/typescript/graphql-request/tests/test-files/run-example-query.ts +++ b/packages/plugins/typescript/graphql-request/tests/test-files/run-example-query.ts @@ -1,5 +1,5 @@ import { GraphQLClient } from 'graphql-request'; -import fetch from 'node-fetch'; // FIXME: using `node-fetch` temporarily because `graphql-request@7` uses native fetch, which `nock@13.4` from `@graphql-codegen/testing` does not support +import { fetch } from '@whatwg-node/fetch'; // FIXME: using `node-fetch` temporarily because `graphql-request@7` uses native fetch, which `nock@13.4` from `@graphql-codegen/testing` does not support import { getSdk } from './graphql-request-sdk.js'; export function runExampleQuery(x: number, y: number) { diff --git a/yarn.lock b/yarn.lock index 8cf04af59c..2d3295a1db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1333,6 +1333,11 @@ "@eslint/core" "^0.16.0" levn "^0.4.1" +"@fastify/busboy@^3.1.1": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-3.2.0.tgz#13ed8212f3b9ba697611529d15347f8528058cea" + integrity sha512-m9FVDXU3GT2ITSe0UaMA5rU3QkfC/UXtCU8y0gSN/GugTqtVldOBWIB5V6V3sbmenVZUIpU6f+mPEO2+m5iTaA== + "@fastify/merge-json-schemas@^0.1.0": version "0.1.1" resolved "https://registry.yarnpkg.com/@fastify/merge-json-schemas/-/merge-json-schemas-0.1.1.tgz#3551857b8a17a24e8c799e9f51795edb07baa0bc" @@ -2688,6 +2693,14 @@ resolved "https://registry.yarnpkg.com/@urql/introspection/-/introspection-1.2.1.tgz#4d864c681ef540d13322d31b67b45394f2f32d83" integrity sha512-U9FTSISz69EEK3bHWDsqux9JqOeiLzr3eDFBQ5DmHuTLaBsd5mjPdtLRzzzmb9nW1Ygd6IR8YcuM7zeNqQ5lCQ== +"@whatwg-node/disposablestack@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@whatwg-node/disposablestack/-/disposablestack-0.0.6.tgz#2064a1425ea66194def6df0c7a1851b6939c82bb" + integrity sha512-LOtTn+JgJvX8WfBVJtF08TGrdjuFzGJc4mkP8EdDI8ADbvO7kiexYep1o8dwnt0okb0jYclCDXF13xU7Ge4zSw== + dependencies: + "@whatwg-node/promise-helpers" "^1.0.0" + tslib "^2.6.3" + "@whatwg-node/events@^0.0.2": version "0.0.2" resolved "https://registry.yarnpkg.com/@whatwg-node/events/-/events-0.0.2.tgz#7b7107268d2982fc7b7aff5ee6803c64018f84dd" @@ -2698,6 +2711,14 @@ resolved "https://registry.yarnpkg.com/@whatwg-node/events/-/events-0.0.3.tgz#13a65dd4f5893f55280f766e29ae48074927acad" integrity sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA== +"@whatwg-node/fetch@0.10.12": + version "0.10.12" + resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.10.12.tgz#e821000cd9fc0941c7cebdf3fe13e3a36a610b71" + integrity sha512-XmsCdDgQxbM8ha7xvIbDQyO/iES2ga0wQcM5sb+mugll1F+IzSshOMPK6n1TuqDDgjTwoU01mMa6oRhHWnpDcw== + dependencies: + "@whatwg-node/node-fetch" "^0.8.2" + urlpattern-polyfill "^10.0.0" + "@whatwg-node/fetch@^0.6.0": version "0.6.9" resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.6.9.tgz#6cc694cc0378e27b8dfed427c5bf633eda6972b9" @@ -2740,7 +2761,17 @@ fast-url-parser "^1.1.3" tslib "^2.3.1" -"@whatwg-node/promise-helpers@^1.0.0": +"@whatwg-node/node-fetch@^0.8.2": + version "0.8.2" + resolved "https://registry.yarnpkg.com/@whatwg-node/node-fetch/-/node-fetch-0.8.2.tgz#94baa23a12b2204803b627d934146c1cd3a398dc" + integrity sha512-1PihEl0a8hm/AZD/LVRs1lEWCZCo2Q65Xm1goaHeqR314e+/Z7NI7YE10Yser8+2iZFGtv542IYr685o3aaZ/g== + dependencies: + "@fastify/busboy" "^3.1.1" + "@whatwg-node/disposablestack" "^0.0.6" + "@whatwg-node/promise-helpers" "^1.3.2" + tslib "^2.6.3" + +"@whatwg-node/promise-helpers@^1.0.0", "@whatwg-node/promise-helpers@^1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@whatwg-node/promise-helpers/-/promise-helpers-1.3.2.tgz#3b54987ad6517ef6db5920c66a6f0dada606587d" integrity sha512-Nst5JdK47VIl9UcGwtv2Rcgyn5lWtZ0/mhRQ4G8NN2isxpq2TO30iqHzmwoJycjWuyUfg3GFXqP/gFHXeV57IA== @@ -3621,11 +3652,6 @@ cross-spawn@^7.0.1, cross-spawn@^7.0.3, cross-spawn@^7.0.5, cross-spawn@^7.0.6: shebang-command "^2.0.0" which "^2.0.1" -data-uri-to-buffer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" - integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== - data-view-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.2.tgz#211a03ba95ecaf7798a8c7198d79536211f88570" @@ -4284,14 +4310,6 @@ fbjs@^3.0.0: setimmediate "^1.0.5" ua-parser-js "^1.0.35" -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" - integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -4364,13 +4382,6 @@ foreground-child@^3.3.1: cross-spawn "^7.0.6" signal-exit "^4.0.1" -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - fs-extra@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" @@ -6144,20 +6155,6 @@ nock@13.3.0: lodash "^4.17.21" propagate "^2.0.0" -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-fetch@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" - integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - node-fetch@^2.5.0, node-fetch@^2.6.1, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" @@ -7711,6 +7708,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +urlpattern-polyfill@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-10.1.0.tgz#1b2517e614136c73ba32948d5e7a3a063cba8e74" + integrity sha512-IGjKp/o0NL3Bso1PymYURCJxMPNAf/ILOpendP9f5B6e1rTJgdgiOvgfoT8VxCAdY+Wisb9uhGaJJf3yZ2V9nw== + urlpattern-polyfill@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-6.0.2.tgz#a193fe773459865a2a5c93b246bb794b13d07256" @@ -7771,7 +7773,7 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -web-streams-polyfill@^3.0.3, web-streams-polyfill@^3.2.1: +web-streams-polyfill@^3.2.1: version "3.3.3" resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==