refactor(client): remove node-fetch in favor of Node’s built-in fetch (#66013)

This commit is contained in:
Sem Bauke
2026-02-23 18:15:17 +01:00
committed by GitHub
parent 09979d9ada
commit a37824b673
3 changed files with 64 additions and 46 deletions
-2
View File
@@ -150,7 +150,6 @@
"@types/js-yaml": "4.0.5",
"@types/loadable__component": "5.13.8",
"@types/lodash-es": "^4.17.6",
"@types/node-fetch": "2",
"@types/prismjs": "^1.26.0",
"@types/react": "18.2.79",
"@types/react-dom": "18.2.25",
@@ -180,7 +179,6 @@
"joi": "18.0.2",
"js-yaml": "4.1.0",
"monaco-editor-webpack-plugin": "7.1.1",
"node-fetch": "2.7.0",
"react-test-renderer": "18.2.0",
"readdirp": "3.6.0",
"redux-saga-test-plan": "4.0.6",
-1
View File
@@ -1,7 +1,6 @@
import { readFileSync, writeFileSync } from 'fs';
import path from 'path';
import fetch from 'node-fetch';
import yaml from 'js-yaml';
import { config } from 'dotenv';
+64 -43
View File
@@ -577,9 +577,6 @@ importers:
'@types/lodash-es':
specifier: ^4.17.6
version: 4.17.12
'@types/node-fetch':
specifier: '2'
version: 2.6.12
'@types/prismjs':
specifier: ^1.26.0
version: 1.26.5
@@ -667,9 +664,6 @@ importers:
monaco-editor-webpack-plugin:
specifier: 7.1.1
version: 7.1.1(monaco-editor@0.33.0)(webpack@5.90.3)
node-fetch:
specifier: 2.7.0
version: 2.7.0
react-test-renderer:
specifier: 18.2.0
version: 18.2.0(react@18.2.0)
@@ -687,7 +681,7 @@ importers:
version: 4.0.15(@opentelemetry/api@1.9.0)(@types/node@25.2.3)(@vitest/ui@4.0.15)(jiti@2.6.1)(jsdom@26.1.0)(msw@2.12.10(@types/node@25.2.3)(typescript@5.9.3))(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.1)
webpack:
specifier: 5.90.3
version: 5.90.3(webpack-cli@4.10.0)
version: 5.90.3
curriculum:
dependencies:
@@ -5481,9 +5475,6 @@ packages:
'@types/mysql@2.15.26':
resolution: {integrity: sha512-DSLCOXhkvfS5WNNPbfn2KdICAmk8lLc+/PNvnPnF7gOdMZCxopXduqv0OQ13y/yA/zXTSikZZqVgybUxOEg6YQ==}
'@types/node-fetch@2.6.12':
resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==}
'@types/node@24.10.13':
resolution: {integrity: sha512-oH72nZRfDv9lADUBSo104Aq7gPHpQZc4BTx38r9xf9pg5LfP6EzSyH2n7qFmmxRQXh7YlUXODcYsg6PuTDSxGg==}
@@ -15361,7 +15352,7 @@ snapshots:
'@babel/core': 7.23.7
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.27.1
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
lodash.debounce: 4.0.8
resolve: 1.22.11
transitivePeerDependencies:
@@ -15372,7 +15363,7 @@ snapshots:
'@babel/core': 7.28.5
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.27.1
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
lodash.debounce: 4.0.8
resolve: 1.22.11
transitivePeerDependencies:
@@ -15383,7 +15374,7 @@ snapshots:
'@babel/core': 7.23.7
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.27.1
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
lodash.debounce: 4.0.8
resolve: 1.22.11
transitivePeerDependencies:
@@ -15394,7 +15385,7 @@ snapshots:
'@babel/core': 7.28.5
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.27.1
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
lodash.debounce: 4.0.8
resolve: 1.22.11
transitivePeerDependencies:
@@ -17038,7 +17029,7 @@ snapshots:
'@babel/parser': 7.28.5
'@babel/template': 7.28.6
'@babel/types': 7.28.6
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
globals: 11.12.0
transitivePeerDependencies:
- supports-color
@@ -17051,7 +17042,7 @@ snapshots:
'@babel/parser': 7.28.5
'@babel/template': 7.27.2
'@babel/types': 7.28.5
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
transitivePeerDependencies:
- supports-color
@@ -17063,7 +17054,7 @@ snapshots:
'@babel/parser': 7.28.6
'@babel/template': 7.28.6
'@babel/types': 7.28.6
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
transitivePeerDependencies:
- supports-color
@@ -17570,7 +17561,7 @@ snapshots:
'@eslint/eslintrc@0.4.3':
dependencies:
ajv: 6.12.6
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
espree: 7.3.1
globals: 13.22.0
ignore: 4.0.6
@@ -18048,7 +18039,7 @@ snapshots:
'@humanwhocodes/config-array@0.5.0':
dependencies:
'@humanwhocodes/object-schema': 1.2.1
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
minimatch: 3.1.2
transitivePeerDependencies:
- supports-color
@@ -20061,7 +20052,7 @@ snapshots:
'@testing-library/dom@10.4.0':
dependencies:
'@babel/code-frame': 7.27.1
'@babel/code-frame': 7.29.0
'@babel/runtime': 7.27.3
'@types/aria-query': 5.0.2
aria-query: 5.3.0
@@ -20320,11 +20311,6 @@ snapshots:
dependencies:
'@types/node': 24.10.13
'@types/node-fetch@2.6.12':
dependencies:
'@types/node': 25.2.3
form-data: 4.0.2
'@types/node@24.10.13':
dependencies:
undici-types: 7.16.0
@@ -20534,7 +20520,7 @@ snapshots:
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/type-utils': 5.62.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
'@typescript-eslint/utils': 5.62.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
eslint: 9.39.2(jiti@2.6.1)
graphemer: 1.4.0
ignore: 5.3.2
@@ -20576,7 +20562,7 @@ snapshots:
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.9.3)
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
eslint: 9.39.2(jiti@2.6.1)
optionalDependencies:
typescript: 5.9.3
@@ -20622,7 +20608,7 @@ snapshots:
dependencies:
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.9.3)
'@typescript-eslint/utils': 5.62.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
eslint: 9.39.2(jiti@2.6.1)
tsutils: 3.21.0(typescript@5.9.3)
optionalDependencies:
@@ -20650,7 +20636,7 @@ snapshots:
dependencies:
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/visitor-keys': 5.62.0
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
semver: 7.7.3
@@ -20897,7 +20883,7 @@ snapshots:
sirv: 3.0.2
tinyglobby: 0.2.15
tinyrainbow: 3.0.3
vitest: 4.0.15(@opentelemetry/api@1.9.0)(@types/node@24.10.13)(@vitest/ui@4.0.15)(jiti@2.6.1)(jsdom@26.1.0)(msw@2.12.10(@types/node@24.10.13)(typescript@5.9.3))(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.1)
vitest: 4.0.15(@opentelemetry/api@1.9.0)(@types/node@25.2.3)(@vitest/ui@4.0.15)(jiti@2.6.1)(jsdom@26.1.0)(msw@2.12.10(@types/node@25.2.3)(typescript@5.9.3))(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.1)
'@vitest/utils@3.2.4':
dependencies:
@@ -22745,6 +22731,10 @@ snapshots:
dependencies:
ms: 2.1.3
debug@4.3.4:
dependencies:
ms: 2.1.2
debug@4.3.4(supports-color@8.1.1):
dependencies:
ms: 2.1.2
@@ -22878,7 +22868,7 @@ snapshots:
detect-port@1.5.1:
dependencies:
address: 1.2.2
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
transitivePeerDependencies:
- supports-color
@@ -23694,7 +23684,7 @@ snapshots:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.6
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
doctrine: 3.0.0
enquirer: 2.4.1
escape-string-regexp: 4.0.0
@@ -24090,7 +24080,7 @@ snapshots:
dependencies:
loader-utils: 2.0.4
schema-utils: 3.3.0
webpack: 5.90.3(webpack-cli@4.10.0)
webpack: 5.90.3
file-type@16.5.4:
dependencies:
@@ -24196,7 +24186,7 @@ snapshots:
follow-redirects@1.15.9(debug@4.3.4):
optionalDependencies:
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
for-each@0.3.3:
dependencies:
@@ -24635,7 +24625,7 @@ snapshots:
css-minimizer-webpack-plugin: 2.0.0(webpack@5.98.0)
css.escape: 1.5.1
date-fns: 2.30.0
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
deepmerge: 4.3.1
detect-port: 1.5.1
dotenv: 8.6.0
@@ -25244,7 +25234,7 @@ snapshots:
http-proxy-agent@7.0.2:
dependencies:
agent-base: 7.1.3
debug: 4.3.4(supports-color@8.1.1)
debug: 4.4.3
transitivePeerDependencies:
- supports-color
@@ -25297,7 +25287,7 @@ snapshots:
https-proxy-agent@7.0.6:
dependencies:
agent-base: 7.1.3
debug: 4.3.4(supports-color@8.1.1)
debug: 4.4.3
transitivePeerDependencies:
- supports-color
@@ -26614,7 +26604,7 @@ snapshots:
micromark@2.11.4:
dependencies:
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
parse-entities: 2.0.0
transitivePeerDependencies:
- supports-color
@@ -26622,7 +26612,7 @@ snapshots:
micromark@4.0.0:
dependencies:
'@types/debug': 4.1.9
debug: 4.3.4(supports-color@8.1.1)
debug: 4.3.4
decode-named-character-reference: 1.0.2
devlop: 1.1.0
micromark-core-commonmark: 2.0.0
@@ -26794,7 +26784,7 @@ snapshots:
dependencies:
loader-utils: 2.0.4
monaco-editor: 0.33.0
webpack: 5.90.3(webpack-cli@4.10.0)
webpack: 5.90.3
monaco-editor@0.33.0: {}
@@ -27588,7 +27578,7 @@ snapshots:
jiti: 1.21.7
postcss: 8.4.35
semver: 7.7.3
webpack: 5.90.3(webpack-cli@4.10.0)
webpack: 5.90.3
transitivePeerDependencies:
- typescript
@@ -29726,7 +29716,7 @@ snapshots:
schema-utils: 4.3.3
serialize-javascript: 6.0.2
terser: 5.46.0
webpack: 5.90.3(webpack-cli@4.10.0)
webpack: 5.90.3
terser-webpack-plugin@5.3.16(webpack@5.98.0):
dependencies:
@@ -29968,7 +29958,7 @@ snapshots:
tsx@4.21.0:
dependencies:
esbuild: 0.27.2
get-tsconfig: 4.10.1
get-tsconfig: 4.13.0
optionalDependencies:
fsevents: 2.3.3
@@ -30895,6 +30885,37 @@ snapshots:
webpack-virtual-modules@0.6.2: {}
webpack@5.90.3:
dependencies:
'@types/eslint-scope': 3.7.7
'@types/estree': 1.0.8
'@webassemblyjs/ast': 1.14.1
'@webassemblyjs/wasm-edit': 1.14.1
'@webassemblyjs/wasm-parser': 1.14.1
acorn: 8.15.0
acorn-import-assertions: 1.9.0(acorn@8.15.0)
browserslist: 4.28.1
chrome-trace-event: 1.0.3
enhanced-resolve: 5.19.0
es-module-lexer: 1.7.0
eslint-scope: 5.1.1
events: 3.3.0
glob-to-regexp: 0.4.1
graceful-fs: 4.2.11
json-parse-even-better-errors: 2.3.1
loader-runner: 4.3.0
mime-types: 2.1.35
neo-async: 2.6.2
schema-utils: 3.3.0
tapable: 2.3.0
terser-webpack-plugin: 5.3.16(webpack@5.90.3)
watchpack: 2.5.1
webpack-sources: 3.2.3
transitivePeerDependencies:
- '@swc/core'
- esbuild
- uglify-js
webpack@5.90.3(webpack-cli@4.10.0):
dependencies:
'@types/eslint-scope': 3.7.7