-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pickers] Support
date-fns
v4 (#14673)
Signed-off-by: Lukas Tyla <[email protected]> Co-authored-by: Flavien DELANGLE <[email protected]>
- Loading branch information
1 parent
fe76a39
commit b907bb5
Showing
9 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,14 +104,14 @@ module.exports = function getBabelConfig(api) { | |
|
||
if (process.env.NODE_ENV === 'test') { | ||
plugins.push(['@babel/plugin-transform-export-namespace-from']); | ||
// We replace `date-fns` imports with an aliased `date-fns@v3` version installed as `date-fns-v3` for tests. | ||
// We replace `date-fns` imports with an aliased `date-fns@v4` version installed as `date-fns-v4` for tests. | ||
// The plugin is patched to only run on `AdapterDateFnsV3.ts`. | ||
// TODO: remove when we upgrade to date-fns v3 by default. | ||
// TODO: remove when we upgrade to date-fns v4 by default. | ||
plugins.push([ | ||
'babel-plugin-replace-imports', | ||
{ | ||
test: /date-fns/i, | ||
replacer: 'date-fns-v3', | ||
replacer: 'date-fns-v4', | ||
// This option is provided by the `patches/[email protected]` patch | ||
filenameIncludes: 'src/AdapterDateFnsV3/', | ||
}, | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,7 +136,7 @@ | |
"cross-env": "^7.0.3", | ||
"danger": "^12.3.3", | ||
"date-fns-jalali-v3": "npm:[email protected]", | ||
"date-fns-v3": "npm:date-fns@3.6.0", | ||
"date-fns-v4": "npm:date-fns@4.1.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-airbnb-typescript": "^18.0.0", | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.