chore: automate MomentTimezoneInclude endYear bump#14214
Open
hotinglok wants to merge 1 commit into
Open
Conversation
Member
|
Hi, as discussed yesterday, what was the main reason for not using the dynamic approach i.e. We looked at the script automation approach suggested by Copilot, but it felt a little more complex than necessary for our use case. We're happy to reconsider it, if there are benefits we're not taking into account. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
endYearpassed toMomentTimezoneIncludeneeds bumping each year so the bundled moment-timezone data covers the upcoming year. It's currently maintained by hand across four config files, which drift out of sync (two say2026, two say2025).What
Adds automation to bump
endYearto the upcoming year, kept manual (opens a PR for human review/merge — nothing auto-merges or auto-deploys):scripts/updateMomentTimezoneYear.js— dependency-free node script that setsendYeartocurrentYear + 1across the four build config files (.storybook/main.ts,cypress.config.ts,ws-nextjs-app/next.config.js,ws-nextjs-app/cypress.config.ts). Only targetsMomentTimezoneIncludecalls, so the test fixtures are untouched. Supports--checkmode (exits non-zero if stale) for optional CI gating..github/workflows/update-moment-timezone-year.yml— scheduled workflow (cron: '0 6 1 12 *', i.e. 06:00 UTC on 1 December each year, plusworkflow_dispatch) that runs the script and opens a PR.package.json— addsyarn update-moment-timezone-year.Notes
GITHUB_TOKEN, so required CI checks may need a manual nudge (empty commit / reopen) to run on the bot's PR. Can switch to a PAT/App token later if desired.[copilot]