Repository navigation
Conversation
nrps9909
left a comment
There was a problem hiding this comment.
Independently checked exact head ab5bfebed72aad6ed2e5f7b41cb7848e545bbccc against base 436bde0bcded312781cbe45dc2b0ef079a36d8e3 and merge preview 0c0e315947bad37e388a549f7f247e7a5ba4c2ba (both parents verified).
The eight added tests produce two failures on base: the duration-first month-end and calendar-year additions. Both plugin orders pass on head/preview. Complete npm test -- --runInBand passes all eight timezone legs and 94 suites / 802 tests with the 100% line-coverage gate; full lint and changed-file lint pass. Unmodified base passes 93 suites / 794 tests.
An independent probe across New York, Auckland and Taipei covers both orders, local/UTC modes, positive/negative and compound durations, ISO/numeric constructors, month ends, leap years and DST dates. Each implementation has 4,320 duration observations: base has 540 mismatches against duration-only arithmetic, head/preview have zero. Another 50,688 numeric-control comparisons match base, including numeric-string quarters; input dates/durations stay unchanged. A witness plugin also confirms non-quarter arguments reach the prior add implementation without coercion.
On Node 24.15.0, the inherited webpack size step fails with ERR_OSSL_EVP_UNSUPPORTED on both base and head. Head build/size succeeds with command-only NODE_OPTIONS=--openssl-legacy-provider; generated UMD/CommonJS month/year and string-quarter checks pass in all three zones. Remote CI is currently action_required, so these are local results. This review does not cover every plugin combination or browser runtime.
AI assistance: Codex helped inspect the change and develop/run the independent probes; the reported results were checked against the logs.
Fix
Fixes #1446
Keep duration objects intact when quarterOfYear passes an add call to another plugin
Only convert the value to a number when handling quarter units
With duration loaded before quarterOfYear adding a one month duration to January 31 could produce March 2 instead of February 28
Both plugin orders now preserve calendar month and year arithmetic
Tests