Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
e7e1054
docs(dox): track the two temporal-polyfill fix PRs on /upstream (DOX-…
craig-o-curtis Nov 13, 2026
0e4ad43
docs(upstream): record every upstream filing, and probe for tc39 #332…
craig-o-curtis Nov 13, 2026
a1fbabc
fix(core): stop the week-year crash and print the right year in forma…
craig-o-curtis Nov 14, 2026
44f0b71
perf(core): key the week-year verdict on the resolved pattern, not ev…
craig-o-curtis Nov 14, 2026
c5cdb4c
Merge remote-tracking branch 'origin/main' into chore/522-dox-g9-trac…
craig-o-curtis Nov 14, 2026
4cd8550
test(canary): count D23 as out of scope on the WebKit leg
craig-o-curtis Nov 14, 2026
033fbe1
Merge origin/main (#521) into chore/522-dox-g9-track-polyfill-fix-prs
craig-o-curtis Nov 14, 2026
35767d1
feat(dox): Pulse page, and date ranges that print every field (DOX-G9…
craig-o-curtis Nov 15, 2026
f520915
Merge origin/main into chore/522-dox-g9-track-polyfill-fix-prs
craig-o-curtis Nov 15, 2026
59e2466
chore: close CORE-112 and DOX-G9; fix three Dox defects found in the …
craig-o-curtis Nov 15, 2026
def5402
docs(upstream): list the 2026-11-15 filings and link each to its reti…
craig-o-curtis Nov 15, 2026
d04a4dc
Merge remote-tracking branch 'origin/main' into chore/522-dox-g9-trac…
craig-o-curtis Nov 15, 2026
276abeb
fix(core): cap what the range year repair remembers per environment; …
craig-o-curtis Nov 15, 2026
d0fc61c
test(core): fill the range repair maps with the fewest ranges; sync t…
craig-o-curtis Nov 15, 2026
d53df53
chore(size): raise the root budget by 100 bytes for the range repair …
craig-o-curtis Nov 15, 2026
da1826f
test(core): the week-year import rule catches any path to the module
craig-o-curtis Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/core-112-week-year.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@northguild/gmt": patch
---

Formatting no longer stops Node with a crash, and prints the right year, in languages whose date patterns print the year a week belongs to instead of the calendar year. `formatZonedRange`, `formatCalendar` and the `…ToParts` functions stopped Node 22, 24 and 26 with a crash for some languages and calendars, for example Burmese with the Buddhist calendar, and Galician with the Hebrew, Buddhist or ROC calendar and a full date style. Every format function also printed the wrong year near the start or end of a year, or all year in the Buddhist, Japanese and ROC calendars: Scottish Gaelic printed `Dùbh 2025` for 30 December 2024, and now prints `Dùbh 2024`.

Some calendars and languages printed a year or a range that the specifications do not give, and now print the specifications' text:

- The Japanese calendar before 1873, when Japan adopted it, printed an era year: `Dec 31, 5 Meiji` for 31 December 1872 is now `Dec 31, 1872 AD`.
- An Islamic date before the Hijra printed a negative year such as `-23 AH`, and is now the empty value.
- Japanese with the Japanese calendar and a two-digit year printed `令和6年`, and now prints `令和06年`. The first year of an era stays `元年`. With another numbering system the era year printed Latin digits, and now prints that system's digits: `ja-u-ca-japanese-nu-arab` printed `令和6年` and now prints `令和٦年`.
- The Chinese and Dangi calendars with a two-digit year padded the related year, which has no two-digit form: `05(yi-chou)` for the year 5 is now `5(yi-chou)`.
- A range whose language's interval pattern drops or repeats a field, such as the year of a Chinese-calendar range across two years, prints both dates in full, joined by the language's own range separator.
- A language with the `islamic` calendar printed the astronomical Hijri date (`Muh. 5, 1446 AH` for 10 July 2024). It now prints the tabular `islamic-tbla` date (`Muh. 4, 1446 AH`), and `islamic-rgsa` prints the language's default calendar.
5 changes: 5 additions & 0 deletions .changeset/d6-cached-day-probe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@northguild/gmt": patch
---

GMT checks the installed `@js-temporal/polyfill` for one more bug in counting months or years between two dates in a non-ISO calendar. The polyfill's unreleased `main` loses a day when a Hebrew or Islamic count starts on the 30th and crosses a 29-day month (tc39/proposal-temporal#3327). GMT already uses its own count while the polyfill has the older bugs in it. With this check, a later release that fixes those but has this one still gets GMT's count, so results stay correct. On 0.5.1, the release GMT depends on today, no result changes.
52 changes: 52 additions & 0 deletions .fallowrc.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"entry": [
"packages/gmt/src/test/nativeTemporal.ts",
"scripts/lib/native-suite-reporter.mjs",
// The weekly D23/D24 locale sweep (CORE-112), run by hand or from a workflow.
"scripts/canary/weekYear.mjs",
// The weekly D29 range sweep (CORE-112); it starts itself as a child process.
"scripts/canary/rangeFields.mjs",
"packages/gmt/bench/*.bench.ts",
"packages/gmt/src/test/*.browser.ts",
"packages/gmt/src/test/boundedWorker.ts",
Expand Down Expand Up @@ -41,6 +45,54 @@
"maxCrap": 30,
"maxUnitSize": 60,
"thresholdOverrides": [
{
"files": ["packages/gmt/src/internal/weekYearRange.ts"],
"functions": [
"farRange",
"shiftYears",
"digitsMatch",
"computeShift",
"movedLikeYear",
"signOf",
],
"maxCrap": 70,
"reason": "D24 range verdict: cyclomatic and cognitive are inside the limits; the CRAP figure is estimated from export references because these helpers are not exported, and weekYearRange.test.ts covers every branch through rangeYearVerdict",
},
{
"files": ["packages/gmt/src/internal/rangeDetector.ts"],
"functions": [
"judge",
"rangeVerdict",
"isAbsent",
"probeKind",
"<arrow>",
],
"maxCyclomatic": 30,
"maxCognitive": 30,
"maxCrap": 150,
"reason": "D29 range detector kernel: judge and the per-probe check branch once per field class (year, month, day, day period, hour, minute, era); rangeDetector.test.ts covers each verdict and its broken field class, and the three-engine sweep exercises every branch, while fallow estimates CRAP from export references because the helpers are not exported",
},
{
"files": ["packages/gmt/src/internal/rangeFieldValues.ts"],
"functions": ["rowsOf"],
"maxCrap": 40,
"reason": "D29 field-value rows (ECMA-402 Table 6): cyclomatic 11 and cognitive 8 are inside the limits, and the CRAP figure is estimated from export references because rowsOf is unexported; rangeFields.test.ts and yearPrinting.test.ts reach every row through rangeFieldsEqual",
},
{
"files": ["packages/gmt/src/internal/weekYearSynth.ts"],
"functions": ["textTwinOptions", "timeTwinOptions", "fits"],
"maxCrap": 40,
"reason": "D23 week-year parts synthesis: cyclomatic 10 and cognitive at most 13 are inside the limits, and the CRAP figure is estimated from export references because each helper is unexported; weekYearSingle.test.ts covers each branch through guardedDateTimeFormat",
},
{
"files": [
"packages/gmt/src/internal/yearPrinting.ts",
"packages/gmt/src/zoned/format/formatZonedRange.ts",
],
"functions": ["formatRange", "zonedRangeText", "twinParts"],
"maxCrap": 70,
"reason": "CORE-112 range repairs: cyclomatic (at most 11) and cognitive (at most 11) are inside the limits; the CRAP figure is estimated from export references because each is a closure or an unexported helper, and yearPrinting.test.ts, rangeFields.test.ts and formatZonedRange*.test.ts cover each branch through the public range functions",
},
{
"files": ["packages/gmt/src/internal/patternToken.ts"],
"functions": [
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ jobs:
if: contains(fromJSON(env.CHECKS), 'upstream')
run: node scripts/upstream.mjs check

- name: Pulse checks match the workflows
if: contains(fromJSON(env.CHECKS), 'pulse')
run: node apps/dox/scripts/build-pulse.mjs --check

# Some content pages are generated, not committed: `guides/concepts/dst-disambiguation.md`
# (copied from the canonical `docs/dst-disambiguation.md`), the `changelog/` pages (built
# from each package's CHANGELOG.md), `scenarios/index.mdx`, `tools/index.mdx` and the
Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/cldr-sweep-weekly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: CLDR sweep weekly

# Pulse check: cldr-sweep
#
# The week-year and range-field defects (D23, D24, D29 in packages/gmt/src/internal/temporalCompat)
# depend on the locale data inside each Node release, so no unit test can cover them. Once a week
# this sweep runs both detectors over every `cldr-dates-full` locale and every calendar, on Node 22,
# 24 and 26: scripts/canary/weekYear.mjs for week-of-year years and V8 aborts, and
# scripts/canary/rangeFields.mjs for a range that drops, repeats or garbles a field of one date.
# It is far too slow for ci.yml (about 160 CPU-minutes per Node), so it never runs there.
#
# A run fails only when a detector misses a defect the engine's own range parts confirm, or reports
# one they do not. A locale that is still broken does not fail it. Each leg writes a report and
# uploads it; the next run reads the report of the same leg from the previous run and lists, in the
# job summary, the locales that newly break and the ones that are fixed. No issue is filed and no
# token can write.
#
# Legs: rangeFields.mjs --shard i/n deals the sorted locales out round-robin, so the shards of one
# Node share the work. weekYear.mjs runs once per Node, on shard 1. Adding or removing a shard
# means changing the matrix.

on:
workflow_dispatch:
schedule:
- cron: "23 3 * * 6"

concurrency:
group: cldr-sweep-weekly
cancel-in-progress: false

permissions:
actions: read
contents: read

env:
# The job runs the Node it names, not the devEngines.runtime pin.
pnpm_config_verify_deps_before_run: "false"

jobs:
sweep:
name: Sweep (${{ matrix.leg }})
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- { leg: node22-1, node: 22, shard: "1/2" }
- { leg: node22-2, node: 22, shard: "2/2" }
- { leg: node24-1, node: 24, shard: "1/2" }
- { leg: node24-2, node: 24, shard: "2/2" }
- { leg: node26-1, node: 26, shard: "1/2" }
- { leg: node26-2, node: 26, shard: "2/2" }
steps:
- uses: actions/checkout@v7

- uses: pnpm/action-setup@v6

- uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile --no-runtime

- name: Build the library
run: pnpm --filter @northguild/gmt build

# The week-year sweep covers every locale in one pass, so only the first shard of each Node
# runs it.
- name: Week-year sweep
if: ${{ startsWith(matrix.shard, '1/') }}
run: node scripts/canary/weekYear.mjs

- name: Range-field sweep (shard ${{ matrix.shard }})
if: ${{ !cancelled() }}
run: >
node scripts/canary/rangeFields.mjs --shard ${{ matrix.shard }}
--out "$RUNNER_TEMP/range-fields-${{ matrix.leg }}.json"

- name: Upload the report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: cldr-sweep-${{ matrix.leg }}-${{ github.run_id }}
path: ${{ runner.temp }}/range-fields-${{ matrix.leg }}.json
if-no-files-found: ignore
retention-days: 35

# Finds the newest earlier run of this workflow that finished and kept a report for this leg,
# then lists what changed. No earlier report is a note, never a failure.
- name: Compare with the previous run
if: ${{ !cancelled() }}
env:
GH_TOKEN: ${{ github.token }}
LEG: ${{ matrix.leg }}
run: |
current="$RUNNER_TEMP/range-fields-$LEG.json"
{
echo "## Range fields, $LEG"
echo
} >> "$GITHUB_STEP_SUMMARY"
if [ ! -f "$current" ]; then
echo "This run wrote no report." >> "$GITHUB_STEP_SUMMARY"
exit 0
fi
previous=""
for run in $(gh api "repos/$GITHUB_REPOSITORY/actions/workflows/cldr-sweep-weekly.yml/runs?status=completed&per_page=10" \
--jq ".workflow_runs[] | select(.id != $GITHUB_RUN_ID and .conclusion != \"cancelled\") | .id" 2>/dev/null); do
if gh run download "$run" --repo "$GITHUB_REPOSITORY" --name "cldr-sweep-$LEG-$run" --dir "$RUNNER_TEMP/previous" 2>/dev/null; then
previous="$RUNNER_TEMP/previous/range-fields-$LEG.json"
break
fi
done
if [ -z "$previous" ] || [ ! -f "$previous" ]; then
echo "No earlier report for this leg, so there is nothing to compare." >> "$GITHUB_STEP_SUMMARY"
exit 0
fi
node scripts/canary/rangeFields.mjs --diff "$previous" "$current" >> "$GITHUB_STEP_SUMMARY"
4 changes: 3 additions & 1 deletion .github/workflows/deploy-dox.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Deploy Dox

# Pulse check: deploy-dox
#
on:
# After Release, never alongside it. Release runs on every push to main, so this
# still deploys every merge. A push that publishes pushes its
Expand All @@ -9,7 +11,7 @@ on:
# or failure.
#
# Failure mode: if Release ever stops running on pushes to main (renamed,
# disabled, or given a path filter), merges stop deploying the docs. The daily
# disabled, or given a path filter), merges stop deploying the docs. The
# schedule and workflow_dispatch below still deploy.
workflow_run:
workflows: [Release]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/dox-gates-weekly.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Dox gates weekly

# Pulse check: dox-gates
#
# The PR job (ci.yml, `dox-gates`) checks the changed pages in Chromium. This sweep checks every page
# in three browsers and both themes, once a week, and files what fails as a `dox-gate` issue, one
# open issue per finding (apps/dox/scripts/gates/issue-plan.mjs). A failing gate fails its leg; the
Expand All @@ -26,7 +28,6 @@ on:
required: false
default: false
schedule:
# Sundays 04:41 UTC.
- cron: "41 4 * * 0"

concurrency:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/leap-seconds.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
name: Leap-second canary

# Pulse check: leap-seconds
#
# Compares GMT's built-in leap-second table (packages/gmt/src/internal/leapSeconds.ts) with the
# IERS Leap_Second.dat file, or with IANA's leap-seconds.list (the same IERS table) when IERS cannot
# be reached and the IANA file has not expired. Manual and weekly only: never part of ci.yml or
# be reached and the IANA file has not expired. Manual and scheduled only: never part of ci.yml or
# `pnpm run validate`, because those runs have no network. A difference (IERS lists a row GMT does
# not, or a row differs) opens or updates one `canary` issue carrying the IERS header line
# ("Updated through IERS Bulletin …"); a run that cannot read either file opens or updates one
# could-not-run issue (CORE-81). The run still fails on either, as before. A new row is a data edit
# plus a `patch` changeset. The dispatch input is a dry run: it files a clearly marked [dry run]
# issue and changes no comparison or exit code. Issues are filed only from main: a run on another
# branch lists what it would have filed in the job summary and files nothing.
#
# The table is closed (CGPM 2026 Resolution 5: continuous UTC from 20 May 2027). Retire this
# workflow and scripts/leap-seconds.mjs once IERS publishes its file format for continuous UTC.

on:
workflow_dispatch:
Expand All @@ -23,7 +22,6 @@ on:
required: false
default: false
schedule:
# Mondays 06:43 UTC
- cron: "43 6 * * 1"

concurrency:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/temporal-oracle.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Temporal oracle

# Pulse check: workaround-node
# Pulse check: native-oracle
# Pulse check: native-suite
# Pulse check: polyfill-swap
#
# Compares GMT's calendar results against Chromium's native Temporal (test262 is the final
# authority where they disagree) and reports which @js-temporal/polyfill workarounds are still
# needed. Manual and weekly only: never part of ci.yml, because "upstream still broken" must
# needed. Manual and scheduled only: never part of ci.yml, because "upstream still broken" must
# never fail a build. A failing oracle job means a GMT result differs from native Temporal on a
# row that the script's tag list does not explain — a GMT bug to fix.
#
Expand Down Expand Up @@ -59,7 +64,6 @@ on:
required: false
default: false
schedule:
# Mondays 06:17 UTC
- cron: "17 6 * * 1"

concurrency:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/us-clock-watch.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: US clock-change watch

# Pulse check: us-clock-watch
#
# Compares three sources with the snapshot: the Congress.gov API, with a GovInfo title search, and
# the Open States API for bills on the clock-change subject (new, or a changed latest action), and
# the IANA tz database for any change to the rules of a zone in apps/dox/src/lib/us-region-zones.json.
Expand All @@ -17,10 +19,6 @@ name: US clock-change watch
# issue and changes no comparison or exit code. Issues are filed only from main: a run on another
# branch lists what it would have filed in the job summary and files nothing, and its carried
# snapshot is never read.
#
# Retirement (context/domination/issues/CORE-90.md, Decisions): the tz part when the US clock-change
# checker (CORE-90 phase 2) ships; the federal and state parts when the Proposals view's data is
# removed or replaced.

on:
workflow_dispatch:
Expand All @@ -31,7 +29,6 @@ on:
required: false
default: false
schedule:
# Mondays 07:17 UTC
- cron: "17 7 * * 1"

concurrency:
Expand Down
3 changes: 2 additions & 1 deletion apps/dox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "UNLICENSED",
"type": "module",
"scripts": {
"generate": "node ../../scripts/upstream.mjs refresh && node ./scripts/generate-version-map.mjs && node ../../scripts/syntax-floor.mjs --ts src/generated/syntax-floor.ts && tsx ./scripts/build-reference.ts && node ./scripts/build-guides.mjs && node ./scripts/build-changelog.mjs && node ./scripts/build-scenario-index.mjs && tsx ./scripts/build-tool-index.ts && tsx ./scripts/build-industry-pages.ts && tsx ./scripts/build-industry-sidebars.ts && node ./scripts/ensure-sidebar-order.mjs && node ../../scripts/bundle-size.mjs report --json src/generated/bundle-size.json && tsx ./scripts/build-corpus-counts.ts",
"generate": "node ../../scripts/upstream.mjs refresh && node ./scripts/build-pulse.mjs && node ./scripts/generate-version-map.mjs && node ../../scripts/syntax-floor.mjs --ts src/generated/syntax-floor.ts && tsx ./scripts/build-reference.ts && node ./scripts/build-guides.mjs && node ./scripts/build-changelog.mjs && node ./scripts/build-scenario-index.mjs && tsx ./scripts/build-tool-index.ts && tsx ./scripts/build-industry-pages.ts && tsx ./scripts/build-industry-sidebars.ts && node ./scripts/ensure-sidebar-order.mjs && node ../../scripts/bundle-size.mjs report --json src/generated/bundle-size.json && tsx ./scripts/build-corpus-counts.ts",
"predev": "pnpm --filter @northguild/gmt build:dev",
"dev": "pnpm run generate && node ./scripts/dev-all.mjs",
"predev:site": "pnpm --filter @northguild/gmt build:dev",
Expand Down Expand Up @@ -109,6 +109,7 @@
"oxlint": "^1.78.0",
"pixelmatch": "7.2.0",
"pngjs": "7.0.0",
"postcss": "8.5.31",
"postcss-html": "1.8.1",
"stylelint": "17.16.0",
"stylelint-config-standard": "40.0.0",
Expand Down
Loading
Loading