v3.0.1
Compatibility release. If you are on 3.0.0, upgrade.
Two things 3.0.0 broke relative to 2.2.0, found by running real 2.x usage patterns against the packed tarball.
Fixed
data-datelost to thedateoption in the jQuery plugin. 2.x didif ($el.data('date')) { options.date = $el.data('date'); }— the attribute won, which is the entire point of it: one call configuring many elements, each with its own date. 3.0.0 reversed the precedence, so a shareddatesilently overrode every element's attribute. This repo's own examples page was affected. Also, the caller's options object is no longer mutated — in 2.x that leaked the first element's date onto every later element that had none.- The 2.x
dest/filenames were gone. 2.2.0 publisheddest/countdown.js,dest/countdown.min.jsand the jQuery pair; 3.0.0 built todist/with.cjsextensions, which 404s every unpkg / jsDelivr URL and<script src>written against 2.x. Both layouts ship now, and the legacy paths are mapped inexportsonto CommonJS twins sorequire('easy-countdown/dest/countdown.js')resolves as CommonJS rather than being parsed as ESM. ./package.jsonis exported, which some bundlers and test resolvers read.
Testing
test/compat.test.ts pins the 2.x contract — data-date precedence, the no-mutation guarantee, the diff field names, leadingZeros(num, length), chainability, non-ISO date strings, and callback binding. Verified against the packed tarball with real jQuery in jsdom.