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').
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 settingglobalThis.fetch
), or, if that's undesirable, set this only for the library usingrequire('megajs').API.fetchModule = require('node-fetch')
.