Prefix core module imports with node:

This commit is contained in:
absidue 2021-10-28 19:40:19 +02:00
parent a13e588246
commit 90867b9430
9 changed files with 17 additions and 17 deletions

View File

@ -1,5 +1,5 @@
import tls, { TLSSocket } from 'tls'; import tls, { TLSSocket } from 'node:tls';
import { URL } from 'url'; import { URL } from 'node:url';
interface ProxyOptions extends tls.ConnectionOptions { interface ProxyOptions extends tls.ConnectionOptions {
method: 'GET'; method: 'GET';

View File

@ -1,6 +1,6 @@
import http, { ClientRequest, IncomingMessage } from 'http'; import http, { ClientRequest, IncomingMessage } from 'node:http';
import https, { RequestOptions } from 'https'; import https, { RequestOptions } from 'node:https';
import { URL } from 'url'; import { URL } from 'node:url';
import { getCookies, setCookie, uploadCookie } from '../YouTube/utils/cookie'; import { getCookies, setCookie, uploadCookie } from '../YouTube/utils/cookie';
import { Proxy } from './classes'; import { Proxy } from './classes';

View File

@ -1,6 +1,6 @@
import { request, request_stream } from '../Request'; import { request, request_stream } from '../Request';
import { Readable } from 'stream'; import { Readable } from 'node:stream';
import { IncomingMessage } from 'http'; import { IncomingMessage } from 'node:http';
import { StreamType } from '../YouTube/stream'; import { StreamType } from '../YouTube/stream';
import { Timer } from '../YouTube/classes/LiveStream'; import { Timer } from '../YouTube/classes/LiveStream';

View File

@ -1,4 +1,4 @@
import fs from 'fs'; import fs from 'node:fs';
import { StreamType } from '../YouTube/stream'; import { StreamType } from '../YouTube/stream';
import { request } from '../Request'; import { request } from '../Request';
import { SoundCloudPlaylist, SoundCloudTrack, SoundCloudTrackFormat, Stream } from './classes'; import { SoundCloudPlaylist, SoundCloudTrack, SoundCloudTrackFormat, Stream } from './classes';

View File

@ -1,6 +1,6 @@
import { request } from '../Request'; import { request } from '../Request';
import { SpotifyAlbum, SpotifyPlaylist, SpotifyTrack } from './classes'; import { SpotifyAlbum, SpotifyPlaylist, SpotifyTrack } from './classes';
import fs from 'fs'; import fs from 'node:fs';
let spotifyData: SpotifyDataOptions; let spotifyData: SpotifyDataOptions;
if (fs.existsSync('.data/spotify.data')) { if (fs.existsSync('.data/spotify.data')) {

View File

@ -1,5 +1,5 @@
import { Readable } from 'stream'; import { Readable } from 'node:stream';
import { IncomingMessage } from 'http'; import { IncomingMessage } from 'node:http';
import { parseAudioFormats, StreamOptions, StreamType } from '../stream'; import { parseAudioFormats, StreamOptions, StreamType } from '../stream';
import { ProxyOptions as Proxy, request, request_stream } from '../../Request'; import { ProxyOptions as Proxy, request, request_stream } from '../../Request';
import { video_info } from '..'; import { video_info } from '..';

View File

@ -1,6 +1,6 @@
import { URL } from 'url'; import { URL } from 'node:url';
import { request } from './../../Request'; import { request } from './../../Request';
import querystring from 'querystring'; import querystring from 'node:querystring';
interface formatOptions { interface formatOptions {
url?: string; url?: string;

View File

@ -1,4 +1,4 @@
import fs from 'fs'; import fs from 'node:fs';
let youtubeData: youtubeDataOptions; let youtubeData: youtubeDataOptions;
if (fs.existsSync('.data/youtube.data')) { if (fs.existsSync('.data/youtube.data')) {

View File

@ -29,8 +29,8 @@ interface SearchOptions {
}; };
} }
import readline from 'readline'; import readline from 'node:readline';
import fs from 'fs'; import fs from 'node:fs';
import { import {
sp_validate, sp_validate,
yt_validate, yt_validate,
@ -46,7 +46,7 @@ import { check_id, so_search, stream as so_stream, stream_from_info as so_stream
import { InfoData, stream as yt_stream, StreamOptions, stream_from_info as yt_stream_info } from './YouTube/stream'; import { InfoData, stream as yt_stream, StreamOptions, stream_from_info as yt_stream_info } from './YouTube/stream';
import { SoundCloudTrack } from './SoundCloud/classes'; import { SoundCloudTrack } from './SoundCloud/classes';
import { yt_search } from './YouTube/search'; import { yt_search } from './YouTube/search';
import { EventEmitter } from 'stream'; import { EventEmitter } from 'node:stream';
/** /**
* Main stream Command for streaming through various sources * Main stream Command for streaming through various sources