fetch-mock icon indicating copy to clipboard operation
fetch-mock copied to clipboard

Update node-fetch dependency to v3.x.x

Open akhmadullin opened this issue 3 years ago • 4 comments

Hi.

node-fetch released new major version - 3.0.0

https://github.com/node-fetch/node-fetch/releases/tag/v3.0.0

Are you planning to update node-fetch dependency to ^3.x.x in fetch-mock?

akhmadullin avatar Sep 15 '21 05:09 akhmadullin

node-fetch@3 is ES modules only, so it would require updating this entire library from commonjs. Probably something I'll look at after addressing the ling backlog of other issues

wheresrhys avatar Sep 23 '21 21:09 wheresrhys

Hi @wheresrhys,

are there any news regarding node-fetch@3 compatibility?

rainerbruemmer avatar Dec 16 '21 10:12 rainerbruemmer

Because of the * peerDependencies version field, users of fetch-mock can't see something is wrong when installing [email protected]:

https://github.com/wheresrhys/fetch-mock/blob/1bdac54e1b482398cca0af9658a500de23e72367/package.json#L48-L50

Are you open to a PR updating the node-fetch peerDependencies version field to be < 3.0.0 for example? This could be released as a patch IMO.

   "peerDependencies": {
-    "node-fetch": "*"
+    "node-fetch": "< 3.0.0"
   },

guillaumewuip avatar Dec 28 '21 10:12 guillaumewuip

Related: https://github.com/wheresrhys/fetch-mock/pull/625

rudolfbyker avatar Jun 10 '22 17:06 rudolfbyker