1
0
mirror of synced 2026-08-06 19:46:54 +00:00
Commit Graph

52 Commits

Author SHA1 Message Date
Borewit c619ac4a5a Replace text-coded with @exodus/bytes for text encoding and decoding 2026-02-21 16:13:00 +01:00
Borewit abbe09323d Improve MP3 parsing code
Favor Uint8Array.subarray, over passing offset and length
2026-01-06 13:39:38 +01:00
Borewit bcae011214 Favor subarray over slice, reusing instead of copying data 2025-09-15 20:28:29 +02:00
Borewit 763f72854c Replace @kayahr/text-encoding with @borewit/text-codec 2025-08-13 21:48:37 +01:00
Borewit a5bc776e6d Remove uint8array-extras dependency
Remove `uint8array-extras` dependency in favour of having the same TextEncoder everywhere.
2025-08-13 09:58:54 +01:00
Borewit a9094e9829 Indicate on every media file if it contains an audio and/or video stream.
Introduces: `format.hasAudio` and `format.hasVideo`
2025-06-30 17:33:09 +02:00
Borewit f16f584b0b Fix code style issues 2025-06-26 20:24:05 +02:00
Borewit 5e93e8e1d8 Move supported MIME-types declaration to parser implementations 2025-04-10 18:24:45 +02:00
Borewit 7c1a675b5e Update lib/apev2/APEv2Parser.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-02 19:55:38 +02:00
Borewit db239009a2 Improve error handling in case the file is not supported
Changes:
- Avoid out of range error, parsing a very small file
- Export errors: `CouldNotDetermineFileTypeError` and `UnsupportedFileTypeError`
- Include the file path in the error message, in case the file path is known
2025-04-02 19:55:38 +02:00
Justinas Delinda 7fc74efc5b simplify parser loader 2025-04-01 20:01:38 +02:00
Justinas Delinda 9d2d2a7c69 Refactor enums to mapped objects 2025-04-01 19:57:20 +02:00
Borewit 01ad22bc5e Utilize strtok3 random access reading 2024-11-28 19:16:13 +01:00
Borewit 4456defc99 Dynamic import parsers 2024-09-05 20:25:18 +02:00
Borewit 8fe9ac2057 Implement own custom Error using ADT style implementation 2024-08-29 17:48:28 +02:00
Borewit 3937085154 Enable TypeScript options strict & verbatimModuleSyntax 2024-08-12 08:54:43 +02:00
Borewit 89ff43a053 Migrate eslint to biome, fix lint errors 2024-08-08 19:15:49 +02:00
Borewit e5959ac8df Improve parsing APE tag
- Fix bit position header / footer flag
- Distinct APE header / footer detection
2024-07-21 15:06:54 +02:00
Borewit 573c505a84 Prevent subpath imports, for Angular compatibility 2024-07-09 21:26:38 +02:00
Bjorn Stromberg eb0f8e61b8 feat: convert most Buffer usage to Uint8Array (#2103)
Convert most Buffer usage to Uint8Array and `uint8array-extras` to fill functionality gaps
* Update `token-types` to version 6.0.0
* Update `strtok3`  to version 7.1.0
* Update `file-type` to version 19.1.0
* Update dependency diagram to desired Node.js free via primary entry point

Co-authored-by: Borewit <Borewit@users.noreply.github.com>
2024-07-08 19:53:02 +02:00
certuna b357825767 Update APEv2TagMapper.ts 2023-11-01 12:05:06 +01:00
Borewit 740992b1e3 Merge remote-tracking branch 'origin/master' into es-module
# Conflicts:
#	.github/workflows/nodejs-ci.yml
#	package.json
#	test/test-file-matroska.ts
#	yarn.lock
2022-08-02 21:21:58 +02:00
Borewit 66c3b4463c Register a warning if a APEv2 reserved data-type (3) is used. 2022-03-01 21:27:42 +01:00
Borewit 7cdebd1ca6 Migrate from CommonJS to ES Modules 2022-02-27 15:27:40 +01:00
Borewit 65ba6661fa Normalize import debug towards ES module compatibility 2022-02-27 13:28:45 +01:00
Borewit 19366b896c Fix lint code style issues
Parse TypeScript files recursive.
Fix duplicate interface declarations.
2022-01-29 19:02:24 +01:00
Borewit 97a24a3556 Migrate from tslint to eslint 2022-01-27 15:35:23 +01:00
Borewit 5ae7f3817d Minor source code improvements 2021-12-10 17:50:09 +01:00
Borewit 973e90978c Use Uint8Array instead of Buffer where reasonable possible 2021-07-22 15:34:01 +02:00
Borewit ac47b0fb62 Convert static methods from Util to module functions
Normalize the util is imported.
2021-07-11 17:04:36 +02:00
Borewit abbaafd18c Get rid of assert dependency. 2021-01-10 21:10:25 +01:00
Borewit 94112e3c06 Remove unused files & move WaveParser to wav package 2020-12-30 15:17:35 +01:00
Borewit ca88b489db Update to strtok3 v6 API 2020-01-25 21:25:18 +01:00
Borewit fbdf1d0a45 Fix picture MIME-type
#389
2020-01-08 21:06:53 +01:00
Borewit 9008262f77 Adapt to strtok3 v5: API changes: tokenizer.fileInfo 2019-12-30 11:05:55 +01:00
Borewit 2a3e8fa8d4 Add APE tag header interface 2019-12-25 14:19:31 +01:00
Borewit 9ba5abaf3c Update to EndOfStream error 2019-12-24 17:17:42 +01:00
Borewit 72d7a8cfed Update strtok3 & token-types 2019-12-23 19:37:10 +01:00
Borewit 5d72339226 Use tokenizer for APE-tag-parser 2019-12-21 21:12:16 +01:00
Borewit 09e4043df9 Add support for APEv1 tag header 2019-12-19 21:50:48 +01:00
Borewit 446318821e Fix APEv2 warning message (fix number items remaining) 2019-11-20 09:26:19 +01:00
Borewit 707fcab3c4 #331 Add workaround for item-count in APEv2 header 2019-11-19 20:43:32 +01:00
Borewit cc383228b6 Prevent usage of IgnoreType token
Address #309
2019-10-31 20:11:26 +01:00
Borewit 56a08f5cb0 #257 Ability to read APEv2 headers from MP3 (only from files & buffers) 2019-09-26 20:59:15 +02:00
Borewit dbc139c3ea Map replay-gain album & track, peak & gain tags to common 2019-09-17 20:34:32 +02:00
Borewit 5f0eaec1ba Move case-insensitive mapping using in APEv2 to re-usable class 2019-09-17 08:25:12 +02:00
Borewit 9ba31fc797 Combine JavaScript & TypeScript folder in /lib 2019-09-07 18:30:20 +02:00
Borewit ceed3a9b3b #25: Avoid TypeScripts files ending up in NPM module 2017-08-12 22:05:38 +02:00
Borewit 151c2cbd4d #19: Added support for RIFF/WAVE 2017-08-11 00:37:40 +02:00
Borewit 1ab6e5a877 #23: Implement WavPack support 2017-08-10 21:44:55 +02:00