-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FE-6858 - update date-fns from ^2.30.0 to ^4.1.0 #7156
base: master
Are you sure you want to change the base?
Conversation
@@ -245,9 +238,6 @@ export const DatePicker = ({ | |||
locale={{ | |||
localize: { | |||
...defaultLocale.localize, | |||
months: monthsLong, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really am not sure what to do here. There's a good chance this isn't the best behaviour. Looking for advice/opinions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The visible labels and ARIA labels look consistent with production, so this should be fine. We have passing tests that check the weekday labels are two characters long in German and Polish, so this edge case is covered :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing @quinnturner! This should eliminate another piece of tech debt for us. I'll mark this as ready for QA.
Before we release, since this involves a major version upgrade of a dependency, we should mark it as a breaking change. Could you update the commit message to reflect this please? The message will be used in our release notes.
Here's a suggestion:
chore: upgrade `date-fns` to version ^4.1.0
BREAKING CHANGE: `date-fns` is now ESM-first. While CommonJS
remains supported, this change may cause issues in some environments.
If you encounter issues, you may need to update your bundler
configuration to support ESM code.
@@ -245,9 +238,6 @@ export const DatePicker = ({ | |||
locale={{ | |||
localize: { | |||
...defaultLocale.localize, | |||
months: monthsLong, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The visible labels and ARIA labels look consistent with production, so this should be fine. We have passing tests that check the weekday labels are two characters long in German and Polish, so this edge case is covered :)
BREAKING CHANGE: `date-fns` is now ESM-first. While CommonJS remains supported, this change may cause issues in some environments. If you encounter issues, you may need to update your bundler configuration to support ESM code.
Thanks, @Parsium; I've amended the commit message to match yours verbatim. |
Do not merge until #7148 has been released |
Closes: #7004
Proposed behaviour
Updates date-fns
Current behaviour
Checklist
d.ts
file added or updated if requiredQA
Additional context
The main concern with my current implementation is that
<DayPicker
has a property locale that accepts adate-fns
localize type.weekdaysLong
andweekdaysShort
are now not accepted properties.I did not know what to do in this scenario, so I removed the code entirely. However, I suspect that's not the correct behaviour.
I would appreciate guidance on how to proceed.
Testing instructions