Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0.0 #42

Merged
merged 12 commits into from Jun 18, 2019
Merged

v2.0.0 #42

merged 12 commits into from Jun 18, 2019

Conversation

43081j
Copy link
Owner

@43081j 43081j commented Jun 17, 2019

So here's the rewrite.

  • Rewritten to TypeScript
  • Ship ESM only (see below)
  • Copied fix from bug fix for cover art Issue #21 #31 over
  • Exported entry points separately (fromFile, fromPath, fromUrl)
  • Entirely async (again see below)
  • Results are always a well structured ID3Tag (with a kind to specify if v2 or v1)
  • String encodings are honoured, they now terminate at the correct point (no more trailing null bytes)
  • When using Buffer in Node, uint16 numbers are now written
  • Exposed all ID3v2 frames in tag.frames (with their original ID, their mapped name, and their value)

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>

@43081j 43081j merged commit 6a408ef into master Jun 18, 2019
@43081j 43081j deleted the rewrite branch June 18, 2019 20:55
@ashinzekene
Copy link

Cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment