Skip to content

Commit

Permalink
Bump date-fns from 2.30.0 to 3.6.0 (#154)
Browse files Browse the repository at this point in the history
* Bump date-fns from 2.30.0 to 3.6.0

Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.30.0 to 3.6.0.
- [Release notes](https://github.com/date-fns/date-fns/releases)
- [Changelog](https://github.com/date-fns/date-fns/blob/main/CHANGELOG.md)
- [Commits](date-fns/date-fns@v2.30.0...v3.6.0)

---
updated-dependencies:
- dependency-name: date-fns
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix pb

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xavier FACQ <[email protected]>
Co-authored-by: Xavier FACQ <[email protected]>
  • Loading branch information
3 people authored May 7, 2024
1 parent 1258dd2 commit 098bd9b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
33 changes: 21 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@popperjs/core": "^2.11.8",
"@react-icons/all-files": "^4.1.0",
"axios": "^1.6.8",
"date-fns": "^2.30.0",
"date-fns": "^3.6.0",
"flexsearch": "^0.7.43",
"gatsby": "^5.13.4",
"gatsby-adapter-netlify": "^1.1.4",
Expand Down
5 changes: 3 additions & 2 deletions src/components/VersionSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { useStaticQuery, graphql } from "gatsby"
import { Trans, useI18next } from "gatsby-plugin-react-i18next"
import { useLocation } from "@gatsbyjs/reach-router"
import queryString from "query-string"
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns"
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3'
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider"
import { DesktopDatePicker } from "@mui/x-date-pickers/DesktopDatePicker"
import * as Locales from 'date-fns/locale'

import { setURLParam } from "../../util/setURLParam"

Expand Down Expand Up @@ -40,7 +41,7 @@ const VersionSelector = ({ updater, releaseType, Table }) => {

// import the correct date locale for the language
if (language !== "en") {
locale = require(`date-fns/locale/${language}/index.js`)
locale = Locales[language] ?? Locales[language.substring(0, 2)] ?? Locales.enUS
}

let selectedVersion = defaultVersion
Expand Down

0 comments on commit 098bd9b

Please sign in to comment.