music-metadata-browser icon indicating copy to clipboard operation
music-metadata-browser copied to clipboard

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

Open AlbanWS opened this issue 2 years ago • 2 comments

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.

AlbanWS avatar Sep 14 '23 13:09 AlbanWS

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.

Borewit avatar Sep 23 '23 12:09 Borewit

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

AlbanWS avatar Sep 25 '23 09:09 AlbanWS

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

Borewit avatar Jul 10 '24 19:07 Borewit