mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-21 13:31:36 +00:00
refactor!: cleanup platform support (#306)
* refactor!: cleanup platform support * chore: lint * fix: web platform * feat: provide UniversalCache Provide UniversalCache as a wrapper around Platform.shim.Cache. * fix: invalid import * refactor: remove isolated-vm support * fix: type info * refactor: cleanup exports * fix: mark jintr as external dependency In the bundled CJS node build, mark jintr as external. * chore: add additional exports web exports provide a way to select web implementation manually without relying on the bundler to select it correctly from the "exports" field web points to src/platform/web.js web.bundle points to bundle/browser.js web.bundle.browser points to bundle/browser.min.js agnostic exports provide users of the library to provide their own platform implementation without first importing the default one. agnostic points to src/platform/lib.ts * fix: toDash on web * revert: eval is synchronous * fix: use serializeDOM in FormatUtils * ci: automate releases with `release-please` * chore: clean up workflow files * ci: fix NPM publish action --------- Co-authored-by: LuanRT <luan.lrt4@gmail.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import Parser from '../../index';
|
||||
import NavigatableText from './NavigatableText';
|
||||
import NavigationEndpoint from '../NavigationEndpoint';
|
||||
import TextRun from './TextRun';
|
||||
import Thumbnail from './Thumbnail';
|
||||
import Constants from '../../../utils/Constants';
|
||||
import Parser from '../../index.js';
|
||||
import NavigatableText from './NavigatableText.js';
|
||||
import NavigationEndpoint from '../NavigationEndpoint.js';
|
||||
import TextRun from './TextRun.js';
|
||||
import Thumbnail from './Thumbnail.js';
|
||||
import Constants from '../../../utils/Constants.js';
|
||||
|
||||
class Author {
|
||||
#nav_text;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { escape, Run } from './Text';
|
||||
import Thumbnail from './Thumbnail';
|
||||
import { escape, Run } from './Text.js';
|
||||
import Thumbnail from './Thumbnail.js';
|
||||
|
||||
class EmojiRun implements Run {
|
||||
text: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Player from '../../../core/Player';
|
||||
import { InnertubeError } from '../../../utils/Utils';
|
||||
import Player from '../../../core/Player.js';
|
||||
import { InnertubeError } from '../../../utils/Utils.js';
|
||||
|
||||
class Format {
|
||||
itag: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Text from './Text';
|
||||
import NavigationEndpoint from '../NavigationEndpoint';
|
||||
import Text from './Text.js';
|
||||
import NavigationEndpoint from '../NavigationEndpoint.js';
|
||||
|
||||
class NavigatableText extends Text {
|
||||
static type = 'NavigatableText';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Author from './Author';
|
||||
import Author from './Author.js';
|
||||
|
||||
class PlaylistAuthor extends Author {
|
||||
constructor(item: any, badges?: any, thumbs?: any) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import TextRun from './TextRun';
|
||||
import EmojiRun from './EmojiRun';
|
||||
import TextRun from './TextRun.js';
|
||||
import EmojiRun from './EmojiRun.js';
|
||||
|
||||
export interface Run {
|
||||
text: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import NavigationEndpoint from '../NavigationEndpoint';
|
||||
import { escape, Run } from './Text';
|
||||
import NavigationEndpoint from '../NavigationEndpoint.js';
|
||||
import { escape, Run } from './Text.js';
|
||||
|
||||
class TextRun implements Run {
|
||||
text: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Thumbnail from './Thumbnail';
|
||||
import Thumbnail from './Thumbnail.js';
|
||||
|
||||
class VideoDetails {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user