Skip to content

Commit

Permalink
Prevent subpath imports, for Angular compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Jul 9, 2024
1 parent ec5e6ef commit 573c505
Show file tree
Hide file tree
Showing 40 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion lib/ParserFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { DsdiffParser } from './dsdiff/DsdiffParser.js';
import { MatroskaParser } from './matroska/MatroskaParser.js';

import { IOptions, IAudioMetadata, ParserType } from './type.js';
import { ITokenizer } from 'strtok3/core';
import type { ITokenizer } from 'strtok3';

const debug = initDebug('music-metadata:parser:factory');

Expand Down
2 changes: 1 addition & 1 deletion lib/aiff/AiffParser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Token from 'token-types';
import initDebug from 'debug';
import * as strtok3 from 'strtok3/core';
import * as strtok3 from 'strtok3';

import { ID3v2Parser } from '../id3v2/ID3v2Parser.js';
import { FourCcToken } from '../common/FourCC.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/apev2/APEv2Parser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import initDebug from 'debug';
import * as strtok3 from 'strtok3/core';
import * as strtok3 from 'strtok3';
import { StringType } from 'token-types';
import { uint8ArrayToString } from 'uint8array-extras';

Expand Down
2 changes: 1 addition & 1 deletion lib/apev2/APEv2Token.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

import { FourCcToken } from '../common/FourCC.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/asf/AsfObject.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ASF Objects

import * as Token from 'token-types';
import { IGetToken, ITokenizer } from 'strtok3/core';
import type { IGetToken, ITokenizer } from 'strtok3';

import * as util from '../common/Util.js';
import { IPicture, ITag } from '../type.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/common/BasicParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ITokenizer } from 'strtok3/core';
import type { ITokenizer } from 'strtok3';

import { ITokenParser } from '../ParserFactory.js';
import { IOptions, IPrivateOptions } from '../type.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/common/FourCC.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IToken } from 'strtok3/core';
import { IToken } from 'strtok3';
import { stringToUint8Array, uint8ArrayToString } from 'uint8array-extras';

import * as util from './Util.js';
Expand Down
6 changes: 3 additions & 3 deletions lib/core.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as strtok3 from 'strtok3/core';
import * as strtok3 from 'strtok3';

import { ParserFactory } from './ParserFactory.js';
import { RandomUint8ArrayReader } from './common/RandomUint8ArrayReader.js';
Expand All @@ -9,7 +9,7 @@ import { getLyricsHeaderLength } from './lyrics3/Lyrics3.js';
import type { IAudioMetadata, INativeTagDict, IOptions, IPicture, IPrivateOptions, IRandomReader, ITag } from './type.js';
import type { ReadableStream as NodeReadableStream } from 'node:stream/web';

export { IFileInfo } from 'strtok3/core';
export { IFileInfo } from 'strtok3';

export type AnyWebStream<G> = NodeReadableStream<G> | ReadableStream<G>;

Expand All @@ -25,7 +25,7 @@ export async function parseBlob(blob: Blob, options: IOptions = {}): Promise<IAu
if (blob instanceof File) {
fileInfo.path = (blob as File).name;
}
return parseWebStream(blob.stream(), fileInfo, options);
return parseWebStream(blob.stream() as any, fileInfo, options);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/dsdiff/DsdiffParser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Token from 'token-types';
import initDebug from 'debug';
import * as strtok3 from 'strtok3/core';
import * as strtok3 from 'strtok3';

import { FourCcToken } from '../common/FourCC.js';
import { BasicParser } from '../common/BasicParser.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/dsdiff/DsdiffToken.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

import { FourCcToken } from '../common/FourCC.js';
import { IChunkHeader64 } from '../iff/index.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/dsf/DsfChunk.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

import { FourCcToken } from '../common/FourCC.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/flac/FlacParser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { UINT16_BE, UINT24_BE, Uint8ArrayType } from 'token-types';
import initDebug from 'debug';
import { ITokenizer, IGetToken } from 'strtok3/core';
import type { ITokenizer, IGetToken } from 'strtok3';

import * as util from '../common/Util.js';
import { IVorbisPicture, VorbisPictureToken } from '../ogg/vorbis/Vorbis.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/id3v1/ID3v1Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StringType, UINT8 } from 'token-types';

import * as util from '../common/Util.js';

import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';
import { BasicParser } from '../common/BasicParser.js';
import { APEv2Parser } from '../apev2/APEv2Parser.js';
import { IRandomReader } from '../type.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/id3v2/AbstractID3Parser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EndOfStreamError, ITokenizer } from 'strtok3/core';
import { EndOfStreamError, ITokenizer } from 'strtok3';
import initDebug from 'debug';

import { ID3v2Header } from './ID3v2Token.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/id3v2/ID3v2Parser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ITokenizer } from 'strtok3/core';
import type { ITokenizer } from 'strtok3';
import * as Token from 'token-types';

import * as util from '../common/Util.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/id3v2/ID3v2Token.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

import * as util from '../common/Util.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/iff/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

import { FourCcToken } from '../common/FourCC.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/matroska/MatroskaParser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Float32_BE, Float64_BE, StringType, UINT8 } from 'token-types';
import initDebug from 'debug';
import { ITokenizer } from 'strtok3/core';
import type { ITokenizer } from 'strtok3';

import { INativeMetadataCollector } from '../common/MetadataCollector.js';
import { BasicParser } from '../common/BasicParser.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/mp4/Atom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import initDebug from 'debug';
import * as AtomToken from './AtomToken.js';
import { Header } from './AtomToken.js';

import { ITokenizer } from 'strtok3/core';
import type { ITokenizer } from 'strtok3';

export type AtomDataHandler = (atom: Atom, remaining: number) => Promise<void>;

Expand Down
2 changes: 1 addition & 1 deletion lib/mp4/AtomToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import initDebug from 'debug';

import { FourCcToken } from '../common/FourCC.js';

import { IToken, IGetToken } from 'strtok3/core';
import type { IToken, IGetToken } from 'strtok3';

const debug = initDebug('music-metadata:parser:MP4:atom');

Expand Down
2 changes: 1 addition & 1 deletion lib/mpeg/ExtendedLameHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Extended Lame Header
*/

import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';
import * as Token from 'token-types';

import * as common from '../common/Util.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/mpeg/MpegParser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { EndOfStreamError } from 'strtok3/core';
import { EndOfStreamError } from 'strtok3';
import initDebug from 'debug';

import * as common from '../common/Util.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/mpeg/ReplayGainDataFormat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';
import * as common from '../common/Util.js';

export interface IReplayGain {
Expand Down
2 changes: 1 addition & 1 deletion lib/mpeg/XingTag.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken, ITokenizer } from 'strtok3/core';
import type { IGetToken, ITokenizer } from 'strtok3';

import * as util from '../common/Util.js';
import { ExtendedLameHeader, IExtendedLameHeader } from './ExtendedLameHeader.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/musepack/sv7/BitReader.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ITokenizer } from 'strtok3/core';
import type { ITokenizer } from 'strtok3';
import * as Token from 'token-types';

export class BitReader {
Expand Down
2 changes: 1 addition & 1 deletion lib/musepack/sv7/StreamVersion7.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

import * as util from '../../common/Util.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/musepack/sv8/StreamVersion8.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { ITokenizer, IGetToken } from 'strtok3/core';
import { ITokenizer, IGetToken } from 'strtok3';
import initDebug from 'debug';

import * as util from '../../common/Util.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/ogg/OggParser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken, EndOfStreamError } from 'strtok3/core';
import { IGetToken, EndOfStreamError } from 'strtok3';
import initDebug from 'debug';

import * as util from '../common/Util.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/ogg/opus/Opus.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

/**
* Opus ID Header interface
Expand Down
2 changes: 1 addition & 1 deletion lib/ogg/opus/OpusParser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import {ITokenizer} from 'strtok3/core';
import {ITokenizer} from 'strtok3';

import {IPageHeader} from '../Ogg.js';
import {VorbisParser} from '../vorbis/VorbisParser.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/ogg/speex/Speex.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

import * as util from '../../common/Util.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/ogg/speex/SpeexParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ITokenizer } from 'strtok3/core';
import { ITokenizer } from 'strtok3';
import initDebug from 'debug';

import { IPageHeader } from '../Ogg.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/ogg/theora/Theora.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

/**
* 6.2 Identification Header
Expand Down
2 changes: 1 addition & 1 deletion lib/ogg/theora/TheoraParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ITokenizer } from 'strtok3/core';
import { ITokenizer } from 'strtok3';
import initDebug from 'debug';

import * as Ogg from '../Ogg.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/ogg/vorbis/Vorbis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as Token from 'token-types';
import { AttachedPictureType } from '../../id3v2/ID3v2Token.js';

import { IPicture } from '../../type.js';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

/**
* Interface to parsed result of METADATA_BLOCK_PICTURE
Expand Down
2 changes: 1 addition & 1 deletion lib/riff/RiffChunk.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Token from 'token-types';
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';
import { IChunkHeader } from '../iff/index.js';

export { IChunkHeader } from '../iff/index.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/wav/BwfChunk.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';
import * as Token from 'token-types';
import { stripNulls } from '../common/Util.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/wav/WaveChunk.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';
import { IChunkHeader } from '../iff/index.js';
import * as Token from 'token-types';

Expand Down
2 changes: 1 addition & 1 deletion lib/wav/WaveParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as strtok3 from 'strtok3/core';
import * as strtok3 from 'strtok3';
import * as Token from 'token-types';
import initDebug from 'debug';

Expand Down
2 changes: 1 addition & 1 deletion lib/wavpack/WavPackToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as Token from 'token-types';

import { FourCcToken } from '../common/FourCC.js';

import { IGetToken } from 'strtok3/core';
import type { IGetToken } from 'strtok3';

/**
* WavPack Block Header
Expand Down

0 comments on commit 573c505

Please sign in to comment.