Repository navigation
Release v2.0.0
Upgrade
getProperty(), in the Full API – All overloads returnstring[] | undefined, notstring | undefined. Take the first value withgetProperty(k)?.[0], or read scalars from the typed accessors (tag().title).MutableTag– The read fieldstitle,artist,album,comment,genre,year,dateandtrackare no longer?-optional; they are required and typedT | undefined, so a literal must name each field, passingundefinedwhere unset.- Complex-property exports –
COMPLEX_PROPERTIES,COMPLEX_PROPERTY_KEYand the supportingComplexPropertyKey,ComplexPropertyKeyMapandComplexPropertyValueMaptypes are gone. Reach complex data through the typed accessors:getPictures(),getRatings(),getChapters(),getLyrics(). Tagsand its validators –Tags,isValidTagName,getAllTagNamesandTagNameare gone;PROPERTIEScovers them. RenameTags.Title→PROPERTIES.title.key(or"title"),isValidTagName(k)→isValidProperty(k),getAllTagNames()→getAllPropertyKeys(),TagName→PropertyKey.- Published declarations –
exactOptionalPropertyTypesis enabled, so assigning an explicitundefinedto a?:field no longer typechecks. Omit the field instead.
Fixed
- MP4 freeform properties –
removeProperty(key)andsetProperty(key, "")now delete the underlying atom on both backends. Previously an emptyiTunNORM-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 tosetProperty(key, "")on both backends.taglib-wasm/disc-folder– Carries the disc-folder grammar (discFolderInfo) and the puregroupAlbumscore, with no Wasm.
Full Changelog: v1.8.3...v2.0.0