Borewit / music-metadata-browser

Browser version of music-metadata parser Supporting a wide range of audio and tag formats.
MIT License
240 stars 21 forks source link

Using music-metadata 7.x instead on 8.x #945

Closed AlbanWS closed 4 months ago

AlbanWS commented 1 year ago

Hi,

Currently using music-metadata-browser (what an incredibly good project), I am facing a warning in Vite:

node_modules/file-type/core.js (1419:16) Use of eval in "node_modules/file-type/core.js" is strongly discouraged as it poses security risks and may cause issues with minification.

After seeking the reason of this warning, I saw that music-metadata-browser currently depends on "music-metadata": "^7.13.3", which depends on "file-type": "^16.5.4", which uses an eval in its code base.

Since "music-metadata": "8.1.4" depends on "file-type": "^18.2.1" (not uning eval anymore), I would suggest to update the dependencies to "music-metadata": "8.1.4";

I could help creating pull request if want me to.

Thanks.

Borewit commented 1 year ago

Updating music-metadata version 7 to 8 is not straightforward, as version 7 is CJS and 8 is ESM.

Ideally music-metadata version 8 should take over the browser functionality. I made a start here: https://github.com/Borewit/music-metadata/tree/es-module-with-browser-support

Long time a ago, totally forgot what needs to be done. Your help is very much welcome, but be aware this is not easy task.

AlbanWS commented 1 year ago

Thank you for the information, I will take a look then !

Borewit commented 4 months ago

music-metadata v9.0.0 took over browser functionality, this music-metadata-browser is obsolete.