Zazama / node-id3

Pure JavaScript ID3 Tag library
MIT License
285 stars 57 forks source link

Use types for frames cleanup and refactor #158

Closed pbricout closed 1 year ago

pbricout commented 1 year ago

Here is another batch of changes (still more to come).

There is one important behaviour change in several frames create, it will now throw an error instead of silently ignoring the frame, this is a breaking change but I believe this is better to notify the user rather than silently failing, I started to document this behaviour.

Another change is that the imageBuffer property of the APIC can now be also a filename string, as it shares the code with the COMR frame which was behaving this way.

Finished to remove the generic Data as any which was a TypeScript transition type.

Scrutinizer rating is stable.

Check the commit message for more details.

Probably best to review with hide white-space changes.

The update of the mocha configuration allows VS code plug-in like Mocha Test Explorer to work, this greatly improves the developer experience when working on tests.

Zazama commented 1 year ago

Another change is that the imageBuffer property of the APIC can now be also a filename string, as it shares the code with the COMR frame which was behaving this way.

Do you think it would make sense to remove this behavior completely instead? We're targeting 0.3, so breaking changes will not affect users who don't manually upgrade.