chore(deps): Upgrade DayPicker to v10#259
Merged
Merged
Conversation
Replace react-day-picker v9 with @daypicker/react v10 in package.json and update Calendar code to use the new package APIs. Adjust imports and types (DayPickerProps, Matcher, DateRange) and import the new stylesheet path. Add 'w-100' to the month grid class and remove the previous table class usage. Update stories to import DateRange from @daypicker/react and add a unit test asserting the month grid receives the width class.
Deploying hyphen-components with
|
| Latest commit: |
241c5c9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://84db82e4.hyphen-components.pages.dev |
| Branch Preview URL: | https://chore-react-daypicker.hyphen-components.pages.dev |
There was a problem hiding this comment.
Code Review
This pull request replaces react-day-picker with @daypicker/react (v10.0.1), updating the calendar component, its stories, and tests. It also updates the documentation in AGENTS.md to use pnpm instead of npm. There are no review comments, so I have no feedback to provide.
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the Calendar component’s underlying DayPicker dependency to the scoped DayPicker v10 package (@daypicker/react), updating imports/usages accordingly and adjusting styling overrides to match v10’s className API.
Changes:
- Replaced
react-day-pickerdirect dependency with@daypicker/react@^10.0.1and updated component/story imports + CSS import path. - Updated Calendar styling overrides by moving the
w-100width class from the deprecatedclassNames.tabletoclassNames.month_grid, with a regression test. - Updated
AGENTS.mdworkflow instructions to usepnpmfor lint/test commands.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/Calendar/Calendar.tsx | Migrates DayPicker imports to @daypicker/react and updates className overrides for v10 (moves width class to month_grid). |
| src/components/Calendar/Calendar.test.tsx | Removes outdated v9-specific comment and adds a regression test ensuring w-100 is applied on .rdp-month_grid. |
| src/components/Calendar/Calendar.stories.tsx | Updates Storybook story type import (DateRange) to come from @daypicker/react. |
| package.json | Adds @daypicker/react dependency and removes direct react-day-picker dependency (plus devDependency ordering adjustments). |
| pnpm-lock.yaml | Lockfile updates reflecting @daypicker/react@10.0.1 and transitive dependency changes. |
| AGENTS.md | Updates local validation instructions to use pnpm commands. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
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.
Summary
react-day-pickerdependency with@daypicker/react@^10.0.1classNames.tableoverride by moving the width class ontomonth_gridAGENTS.mdinstructions to usepnpmfor lint/test commandsValidation
pnpm lintpnpm test -- TableRow.test.tsx --runInBandpnpm test --runInBandpnpm test,pnpm build,pnpm build-storybook,git diff --checkNote: one parallel
pnpm testrun hit a Jest workerSIGSEGVinTableRow.test.tsx; the affected test passed directly and the full suite passed serially with--runInBand.