Skip to content

fix: support React 19 in v8#2979

Merged
gpbl merged 1 commit intomaintenance/v8from
fix/v8-react-19-peer
May 2, 2026
Merged

fix: support React 19 in v8#2979
gpbl merged 1 commit intomaintenance/v8from
fix/v8-react-19-peer

Conversation

@gpbl
Copy link
Copy Markdown
Owner

@gpbl gpbl commented May 2, 2026

This v8 maintenance patch lets existing v8 consumers install DayPicker with React 19 while keeping the runtime API unchanged.

What Changed

  • Bumped react-day-picker to 8.10.2.
  • Expanded the React peer dependency to include ^19.0.0 while keeping the existing React 16.8, 17, and 18 support range.
  • Replaced exported JSX.* declaration references with React types that remain valid across React 16.8 through React 19.
  • Kept type-only React imports as import type in shipped src/ files, so downstream source transpilation cannot preserve type-only React imports as runtime imports.
  • Added v8 README and changelog notes for React 19 compatibility.
  • Added a v8 Trusted Publishing release workflow that publishes with npm publish --tag legacy-v8 and relies on npm Trusted Publishing for provenance.
  • Added release-time packed smoke tests for React 19 runtime installs, React 19 TypeScript declarations, and React 18 TypeScript declarations with date-fns 2 and 3.
  • Moved the release smoke fixtures into .github/scripts/ so the workflow remains readable while keeping the same validation coverage.
  • Added a release tag/package version guard before publish.
  • Removed the old token-based publish job from the package workflow.
  • Updated the one source test import that used react-dom/test-utils for act.

Review Notes

Validation run locally on the v8 maintenance branch:

  • corepack pnpm@8.6.2 typecheck
  • corepack pnpm@8.6.2 lint --max-warnings=0
  • corepack pnpm@8.6.2 test
  • corepack pnpm@8.6.2 build
  • Confirmed built declarations contain no JSX.* references
  • Packed tarball comparison against v8.10.1: shipped JS and CSS runtime files have identical hashes; differences are limited to declarations, source maps/source text, docs, and package metadata
  • Packed consumer runtime smoke test with react@19, react-dom@19, and date-fns@3
  • Packed consumer runtime smoke test with react@19, react-dom@19, and date-fns@2
  • Packed consumer TypeScript smoke test with react@19, react-dom@19, @types/react@19, @types/react-dom@19, typescript@5, date-fns@3, and skipLibCheck: false
  • Packed consumer TypeScript smoke test with react@16.14, react-dom@16.14, @types/react@16.14, @types/react-dom@16.9, typescript@4.9, date-fns@2, and skipLibCheck: false
  • Packed React 18 parity smoke against both 8.10.1 and 8.10.2, with date-fns@2 and date-fns@3; each case typechecked with skipLibCheck: false and rendered <DayPicker /> in jsdom
  • npm publish --dry-run --tag legacy-v8

After merge, publish by creating the v8.10.2 GitHub Release from the merged maintenance commit. The npm publish should run from the release event, not from a manual workflow dispatch.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 2, 2026

⚠️ No Changeset found

Latest commit: 8f280f1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gpbl gpbl force-pushed the fix/v8-react-19-peer branch 5 times, most recently from 88a2ede to 7c3e6f3 Compare May 2, 2026 10:54
@gpbl gpbl force-pushed the fix/v8-react-19-peer branch from 7c3e6f3 to 8f280f1 Compare May 2, 2026 11:01
@gpbl gpbl marked this pull request as ready for review May 2, 2026 12:57
@gpbl gpbl merged commit 9a5763b into maintenance/v8 May 2, 2026
4 checks passed
@gpbl gpbl deleted the fix/v8-react-19-peer branch May 2, 2026 13:11
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