Skip to content

Introduce standard Temporal dates with a native-first fallback - #211

Open
JakeGinnivan wants to merge 6 commits into
mainfrom
jakeginnivan/temporal-date-foundation
Open

JakeGinnivan wants to merge 6 commits into
mainfrom
jakeginnivan/temporal-date-foundation

Conversation

@JakeGinnivan

Copy link
Copy Markdown
Contributor

Summary

Start the migration to standard Temporal values without extending the Luxon interface. Stacked on #210; the shared conference-config/provider contract remains unchanged in this first slice.

conferenceDate(ISO date) -> Temporal.PlainDate
conferenceTime(ISO datetime) -> Temporal.ZonedDateTime
                         configured IANA zone by default
Temporal.Instant         exact timestamps and provider epoch values

Use native Temporal where available and temporal-polyfill 1.0.6 elsewhere, without installing globals. Reject ambiguous/nonexistent wall times unless a caller explicitly selects a disambiguation policy.

Migrate talk-end checks and run-sheet highlighting calculations, remove redundant timezone arguments at feature call sites, and extend provider lint to reject direct Temporal.Now reads. Add lasting usage guidance and a reproducible pnpm nx temporal-check website compatibility/bundle check.

Evidence

  • Before: the local Workers runtime does not expose native Temporal, and shared parsing returns Luxon objects.
    After: native Node Temporal, forced fallback, and Workers return identical date/instant/DST results. React SSR hydration agrees in Chromium, Firefox, and WebKit, both with normal support and native Temporal explicitly disabled.
  • 96 test files / 887 tests pass, including configured zones, offset preservation, date-only values, DST gaps/overlaps, serialization, migrated feature behavior, and provider lint.
  • Production build, typecheck, and lint pass. Lint retains two warnings in generated Wrangler types.
  • The compatibility target prints isolated minified/gzip bundle measurements for equivalent Temporal and Luxon date operations. These are dependency comparisons, not whole-site savings while both libraries coexist.

Merge Danger

Door: two-way

No persisted data or config schema changes. Standard Temporal types are introduced at a small module; the remaining Luxon contract can migrate in subsequent PRs.

Blast Radius: timing

Talk feedback availability and run-sheet timing now parse through Temporal. Invalid timestamps retain their existing feature-specific fallback behavior. Offset-free ambiguous/nonexistent wall times are rejected rather than silently normalized. The native fallback adds client payload on migrated routes until the remaining Luxon usage is removed.

Base automatically changed from codex/date-review to main October 24, 2026 05:40
@JakeGinnivan
JakeGinnivan force-pushed the jakeginnivan/temporal-date-foundation branch from 06d0a4c to 6f66f7e Compare October 26, 2026 00:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant