qgustavor / mega

Unofficial JavaScript SDK for MEGA
https://mega.js.org/
MIT License
161 stars 43 forks source link

Remove node-fetch #196

Closed qgustavor closed 5 months ago

qgustavor commented 5 months ago

node-fetch is no longer going to be included with the library since all currently supported Node.js versions include a fetch global. This allows for a faster install of the library, and, mainly, reduces the burden of having to update node-fetch whenever it gets a security update.

Users of this library using old unsupported Node.js versions can still use the library, but need to either define a fetch global (by importing node-fetch and setting globalThis.fetch), or, if that's undesirable, set this only for the library using require('megajs').API.fetchModule = require('node-fetch').