Minimum node version v18 (#3170)

When the next MagicMirror version is released, node v16 will have
reached its end of life.
This commit is contained in:
Kristjan ESPERANTO
2023-08-20 12:55:17 +02:00
committed by GitHub
parent 7dcea98e99
commit 7c64d8fce6
8 changed files with 89 additions and 101 deletions

View File

@@ -11,15 +11,8 @@
* @class
*/
async function fetch(url, options = {}) {
// const nodeVersion = process.version.match(/^v(\d+)\.*/)[1];
// if (nodeVersion >= 18) {
// // node version >= 18
// return global.fetch(url, options);
// } else {
// // node version < 18
// const nodefetch = require("node-fetch");
// return nodefetch(url, options);
// }
// return global.fetch(url, options);
const nodefetch = require("node-fetch");
return nodefetch(url, options);
}