chore(deps): remove node-fetch, migration to node v18 fetch API

This commit is contained in:
JellyBrick
2023-08-29 21:15:22 +09:00
parent 92da06eb96
commit aacc2d261b
10 changed files with 1342 additions and 2178 deletions

View File

@ -3,7 +3,6 @@ const { join } = require('node:path');
const { ipcMain } = require('electron');
const is = require('electron-is');
const { convert } = require('html-to-text');
const fetch = require('node-fetch');
const { cleanupName } = require('../../providers/song-info');
const { injectCSS } = require('../utils');
@ -99,7 +98,7 @@ const getLyrics = async (url) => {
}
const html = await response.text();
const lyrics = convert(html, {
return convert(html, {
baseElements: {
selectors: ['[class^="Lyrics__Container"]', '.lyrics'],
},
@ -116,7 +115,6 @@ const getLyrics = async (url) => {
},
},
});
return lyrics;
};
module.exports.toggleRomanized = toggleRomanized;