Skip to content

chore(deps): bump @dhis2/multi-calendar-dates to 3.1.0 and @dhis2/ui to 10.19.2 - #604

Merged
tomzemp merged 4 commits into
masterfrom
chore/bump-multi-calendar-dates
Oct 14, 2026
Merged

tomzemp merged 4 commits into
masterfrom
chore/bump-multi-calendar-dates

Conversation

@kabaros

@kabaros kabaros commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bumps @dhis2/multi-calendar-dates from ^2.1.2 to ^3.1.0.
  • Bumps @dhis2/ui from ^10.17.0 to ^10.19.2 (dependency and resolutions) for the latest calendar fixes.
  • Adds @dhis2/multi-calendar-dates to resolutions. @dhis2-ui/calendar is also pulled in through @dhis2/app-shell → @dhis2/ui. Without the resolution, the app would bundle two copies.
  • getNowInCalendarString({ long: true }): 3.0.0's getNowInCalendar dropped time of day, which broke the long format and getRelativeTime (form expiry info, "last updated"). 3.1.0 returns hour/minute/second again, in the given time zone, so the time is read straight from the result. No workaround needed.

Regression coverage

Adds src/shared/multi-calendar-dates.regression.test.js, with snapshots taken on 2.1.2 before the bump. It covers every library function the app calls (getNowInCalendar, generateFixedPeriods, getFixedPeriodByDate, getAdjacentFixedPeriods, createFixedPeriodFromPeriodId, periodTypes) and the app's own helpers that wrap them, for gregory, ethiopian and nepali.

  • Gregory and Nepali: snapshots unchanged after the bump.
  • Ethiopian: on 2.1.2 every call threw Era am … was not matched by any era in Jest under Node 24. That's also why the existing Ethiopian test was skipped. On 3.x the values are correct (e.g. 2024-06-15 → 2016-10-08, Sene), so those snapshots were updated on purpose and the old test is un-skipped.

Snapshots removed before merging

Testing

  • yarn test: 682 passed, 109 snapshots
  • yarn lint
  • Manual check with Ethiopian and Nepali servers: period selector (previous/next, future-period limit, switching years), data-value history chart, date-picker inputs

used this recipe/skill for guiding the upgrade

kabaros and others added 2 commits October 12, 2026 14:09
Snapshots taken against @dhis2/multi-calendar-dates 2.1.2 as a baseline
before bumping to 3.x. Ethiopian calls throw on 2.1.2 under the current
Node/Temporal polyfill, which the snapshots record as-is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
getNowInCalendar no longer returns time of day in v3, which made
getNowInCalendarString({ long: true }) produce "YYYY-MM-DDTundefined:...".
Derive the time separately with Intl.DateTimeFormat for the given
time zone, keeping the existing time zone correction.

Gregory and Nepali regression snapshots are unchanged. Ethiopian
snapshots are updated deliberately: on 2.1.2 every Ethiopian call threw
"Era am ... was not matched by any era" under the Temporal polyfill;
on 3.x they return correct values (e.g. 2024-06-15 -> 2016-10-08, Sene).
The previously skipped Ethiopian getNowInCalendarString test now passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhis2-bot

Copy link
Copy Markdown
Contributor

🚀 Deployed on https://pr-604--dhis2-data-entry.netlify.app

@dhis2-bot
dhis2-bot temporarily deployed to netlify October 12, 2026 13:37 Inactive
Picks up the latest calendar fixes in @dhis2/ui.

@dhis2/multi-calendar-dates 3.1.0 returns hour/minute/second from
getNowInCalendar again, so the Intl.DateTimeFormat workaround in
getNowInCalendarString is removed and the time is read from the result.

@dhis2-ui/calendar pins multi-calendar-dates exactly (3.0.0), so it is
added to resolutions to keep a single copy in the bundle, including the
one pulled in via @dhis2/app-shell -> @dhis2/ui.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kabaros
kabaros force-pushed the chore/bump-multi-calendar-dates branch from 5d9004c to 61aaa9c Compare October 13, 2026 11:59
@kabaros kabaros changed the title chore(deps): bump @dhis2/multi-calendar-dates to v3 and @dhis2/ui to 10.19.2 chore(deps): bump @dhis2/multi-calendar-dates to 3.1.0 and @dhis2/ui to 10.19.2 Oct 13, 2026
@dhis2-bot
dhis2-bot temporarily deployed to netlify October 13, 2026 12:01 Inactive
@kabaros
kabaros marked this pull request as ready for review October 13, 2026 12:02
@kabaros
kabaros requested a review from tomzemp October 13, 2026 12:02
@sonarqubecloud

Copy link
Copy Markdown

@dhis2-bot
dhis2-bot temporarily deployed to netlify October 14, 2026 12:30 Inactive
@tomzemp
tomzemp merged commit 15f52aa into master Oct 14, 2026
11 checks passed
@dhis2-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 102.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was previously deployed

1 inactive deployment
netlify — 671daea1 Deployed Oct 14, 2026 by dhis2-bot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants