43081j / id3

A JavaScript ID3 tags parser for Node & browsers.
MIT License
335 stars 63 forks source link

v2.0.0 #42

Closed 43081j closed 5 years ago

43081j commented 5 years ago

So here's the rewrite.

Closes #21 Closes #27 Closes #31 Closes #38 Closes #40 Fixes #13 Fixes #14 Fixes #15 Fixes #18 Fixes #26 Fixes #28 Fixes #33 Fixes #34 Fixes #36 Fixes #39 Fixes #41 Fixes #6

Probably a bunch of other cruft i threw away too and a couple other bug fixes found during typing it strongly.

ESM/ESNext

This PR makes a questionable decision: to ship only ESNext (and ES modules).

What this means is that no bundle (i.e. rollup and friends) will be shipped, meaning no support will be provided for browsers which do not support ES modules and async/await.

This shouldn't be many browsers, these features are widely supported now for some time.

It also means in order to be loaded in Node, one must use --experimental-modules (though "type": "module" is set in the package manifest so it should figure out you can import it).

This means you can use the built sources out of the box in a modern browser:

<script type="module">
import * as id3 from './node_modules/id3/id3.js';
id3.fromUrl('/test.mp3').then((tag) => {
  console.log(tag);
});
</script>
ashinzekene commented 5 years ago

Cool