bump `node-fetch` for `@vendure/testing`
Describe the bug
for node v20+,The punycode module is deprecated.
(node:64859) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
at node:punycode:3:9
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:397:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:333:10)
at loadBuiltinModule (node:internal/modules/helpers:101:7)
at Module._load (node:internal/modules/cjs/loader:1006:17)
at Module.require (node:internal/modules/cjs/loader:1237:19)
at require (node:internal/modules/helpers:176:18)
at Object.
Expected behavior
upgrade @vendure/test node-fetch to latest version
Environment (please complete the following information):
- @vendure/core version: 2.1.7
- Nodejs version: 21.6
- Database (mysql/postgres etc): mysql
Note: we are on the latest 2.x version. From their readme:
node-fetch from v3 is an ESM-only module - you are not able to import it with require().
If you cannot switch to ESM, please use v2 which remains compatible with CommonJS. Critical bug fixes will continue to be > published for v2.
Upgrading might involve some extra work due to the ESM-only format.
can we use nodejs builtin fetch api?
https://nodejs.org/dist/latest-v18.x/docs/api/globals.html#fetch