Skip to content

Release v2.0.0

Choose a tag to compare

@CharlesWiltgen CharlesWiltgen released this 10 Aug 20:17
· 321 commits to main since this release

Upgrade

  • getProperty(), in the Full API – All overloads return string[] | undefined, not string | undefined. Take the first value with getProperty(k)?.[0], or read scalars from the typed accessors (tag().title).
  • MutableTag – The read fields title, artist, album, comment, genre, year, date and track are no longer ?-optional; they are required and typed T | undefined, so a literal must name each field, passing undefined where unset.
  • Complex-property exports – COMPLEX_PROPERTIES, COMPLEX_PROPERTY_KEY and the supporting ComplexPropertyKey, ComplexPropertyKeyMap and ComplexPropertyValueMap types are gone. Reach complex data through the typed accessors: getPictures(), getRatings(), getChapters(), getLyrics().
  • Tags and its validators – Tags, isValidTagName, getAllTagNames and TagName are gone; PROPERTIES covers them. Rename Tags.Title → PROPERTIES.title.key (or "title"), isValidTagName(k) → isValidProperty(k), getAllTagNames() → getAllPropertyKeys(), TagName → PropertyKey.
  • Published declarations – exactOptionalPropertyTypes is enabled, so assigning an explicit undefined to a ?: field no longer typechecks. Omit the field instead.

Fixed

  • MP4 freeform properties – removeProperty(key) and setProperty(key, "") now delete the underlying atom on both backends. Previously an empty iTunNORM-style atom survived the save: invisible to reads, present in the raw file.
  • MP4 freeform atoms with a non-Apple mean – removeMP4Item("----:mean:name") now removes them on the WASI backend. Previously the call was a silent no-op.
  • MP3 frame-sync probe – The probe validates the next frame, so a lone syntactically valid MPEG header no longer authorises a partial-load splice through an unseen ID3v2 tag.
  • AudioFile handles – A wrapper dropped without dispose() releases its native FileHandle at garbage collection; explicit disposal stays the deterministic path.

Added

  • removeProperty(key) – Clears a property by name: the empty-string contract, named. Equivalent to setProperty(key, "") on both backends.
  • taglib-wasm/disc-folder – Carries the disc-folder grammar (discFolderInfo) and the pure groupAlbums core, with no Wasm.

Full Changelog: v1.8.3...v2.0.0