mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-14 15:47:27 -05:00
drop node-fetch dependency, use undici
undici's fetch implementation is included in node and has been considered stable since version 21. for some time I think depending on the undici package instead of the built-in is a good idea so that older nodejs versions will still work correctly.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import fetch from 'node-fetch'
|
||||
import { fetch } from 'undici'
|
||||
import {
|
||||
Album,
|
||||
Artist,
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
parseArtist,
|
||||
parseTrack
|
||||
} from './parse.js'
|
||||
import { Transform } from 'stream'
|
||||
import { Readable, Transform } from 'stream'
|
||||
import { Blowfish } from 'blowfish-cbc'
|
||||
|
||||
interface DeezerOptions {
|
||||
@@ -406,7 +406,7 @@ export default class Deezer implements StreamerWithLogin {
|
||||
})
|
||||
|
||||
return {
|
||||
stream: streamResp.body!.pipe(decryption),
|
||||
stream: Readable.fromWeb(streamResp.body!).pipe(decryption),
|
||||
mimeType
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user