Skip to content

Commit c275fba

Browse files
committed
perf: replace node-fetch with node-fetch-native
1 parent c5f54ac commit c275fba

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

package-lock.json

+16-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@
5858
"@types/node": ">=20.11.19"
5959
},
6060
"devDependencies": {
61+
"@stryker-mutator/core": "^6.4.2",
6162
"@types/fs-extra": "^11.0.4",
63+
"@types/minimist": "^1.2.5",
6264
"@types/node": ">=20.11.19",
6365
"@types/ps-tree": "^1.1.6",
64-
"@types/minimist": "^1.2.5",
6566
"@types/which": "^3.0.3",
66-
"@stryker-mutator/core": "^6.4.2",
6767
"c8": "^7.13.0",
6868
"chalk": "^5.3.0",
6969
"dts-bundle-generator": "^9.3.1",
@@ -75,7 +75,7 @@
7575
"globby": "^14.0.1",
7676
"madge": "^6.1.0",
7777
"minimist": "^1.2.8",
78-
"node-fetch": "3.3.2",
78+
"node-fetch-native": "^1.6.2",
7979
"prettier": "^2.8.8",
8080
"ps-tree": "^1.2.0",
8181
"tsd": "^0.28.1",

scripts/build-dts.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const entry = {
2929
'@nodelib/fs.walk',
3030
'fast-glob',
3131
'@types/jsonfile',
32-
'node-fetch',
32+
'node-fetch-native',
3333
'chalk',
3434
'globby',
3535
'webpod',

src/vendor.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ import {
2424
} from 'globby'
2525
import * as yaml from 'yaml'
2626
import * as _fs from 'fs-extra'
27+
import type { fetch } from 'node-fetch-native'
2728

28-
export {
29-
default as nodeFetch,
30-
type RequestInfo,
31-
type RequestInit,
32-
} from 'node-fetch'
29+
export { fetch as nodeFetch } from 'node-fetch-native'
30+
export type RequestInfo = Parameters<typeof fetch>[0]
31+
export type RequestInit = Parameters<typeof fetch>[1]
3332

3433
export const globbyModule = {
3534
globby,

0 commit comments

Comments
 (0)