From 6bc1c0922ccc702d67728ce2bf321e1fe82431c4 Mon Sep 17 00:00:00 2001 From: Nara Kasbergen Kwon <855115+xiehan@users.noreply.github.com> Date: Tue, 17 Oct 2023 11:14:56 +0200 Subject: [PATCH] chore: fix broken upgrade-node workflow node-fetch needs to be pinned to v2 if we don't want to use ES modules. --- .projen/deps.json | 1 + .projen/tasks.json | 10 ++++---- .projenrc.ts | 2 +- package.json | 2 +- yarn.lock | 58 ++++++++++++++++++---------------------------- 5 files changed, 30 insertions(+), 43 deletions(-) diff --git a/.projen/deps.json b/.projen/deps.json index 86c9f804..410ede22 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -82,6 +82,7 @@ }, { "name": "node-fetch", + "version": "~2", "type": "build" }, { diff --git a/.projen/tasks.json b/.projen/tasks.json index 48b86295..300aadb1 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -273,19 +273,19 @@ "exec": "yarn upgrade npm-check-updates" }, { - "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='jsii,projen'" + "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='jsii,node-fetch,projen'" }, { - "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='jsii,projen'" + "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='jsii,node-fetch,projen'" }, { - "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='jsii,projen'" + "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='jsii,node-fetch,projen'" }, { - "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='jsii,projen'" + "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='jsii,node-fetch,projen'" }, { - "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='jsii,projen'" + "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='jsii,node-fetch,projen'" }, { "exec": "yarn install --check-files" diff --git a/.projenrc.ts b/.projenrc.ts index 91452ec4..cddfdd8b 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -35,7 +35,7 @@ const project = new cdk.JsiiProject({ devDeps: [ "@types/fs-extra", "glob", - "node-fetch", // @TODO this can be removed once we upgrade to Node 18 and use native fetch + "node-fetch@~2", // @TODO this can be removed once we upgrade to Node 18 and use native fetch ], bundledDeps: ["change-case", "fs-extra"], license: "MPL-2.0", diff --git a/package.json b/package.json index 76eba156..ce8b8eec 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "jsii-diff": "^1.70.0", "jsii-docgen": "^3.8.31", "jsii-pacmak": "^1.70.0", - "node-fetch": "^3.3.2", + "node-fetch": "~2", "npm-check-updates": "^16", "prettier": "^2.7.1", "projen": "0.71.46", diff --git a/yarn.lock b/yarn.lock index fabe38b4..97ef9481 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2043,11 +2043,6 @@ dargs@^7.0.0: resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== -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-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -2661,14 +2656,6 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -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.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -2747,13 +2734,6 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" -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" - fp-and-or@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/fp-and-or/-/fp-and-or-0.1.3.tgz#e6fba83872a5853a56b3ebdf8d3167f5dfca1882" @@ -4652,19 +4632,12 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" -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== +node-fetch@~2: + 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== dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" + whatwg-url "^5.0.0" node-gyp@^9.0.0: version "9.3.0" @@ -6131,6 +6104,11 @@ tr46@^2.1.0: dependencies: punycode "^2.1.1" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" @@ -6459,10 +6437,10 @@ walker@^1.0.7: dependencies: makeerror "1.0.12" -web-streams-polyfill@^3.0.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== webidl-conversions@^5.0.0: version "5.0.0" @@ -6486,6 +6464,14 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + whatwg-url@^8.0.0, whatwg-url@^8.5.0: version "8.7.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77"