From 7b79c25994a93c5679b6f32eba3965b49dd61bf6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 08:47:17 +0000 Subject: [PATCH] Update dependency date-fns to v3 --- .changelog/1106.internal.md | 1 + package.json | 2 +- src/app/hooks/useFormattedTimestamp.ts | 2 +- .../pages/ParatimeDashboardPage/ActiveAccounts.tsx | 2 +- .../ParatimeDashboardPage/TransactionsChartCard.tsx | 2 +- src/app/utils/chart-utils.ts | 8 ++++---- src/app/utils/dateFormatter.ts | 4 ++-- yarn.lock | 12 +++++------- 8 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 .changelog/1106.internal.md diff --git a/.changelog/1106.internal.md b/.changelog/1106.internal.md new file mode 100644 index 000000000..49e5e9c6f --- /dev/null +++ b/.changelog/1106.internal.md @@ -0,0 +1 @@ +Update dependency date-fns to v3 diff --git a/package.json b/package.json index 590a88918..4c459145b 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "axios": "1.6.4", "bignumber.js": "9.1.2", "bip39": "^3.1.0", - "date-fns": "2.30.0", + "date-fns": "3.0.6", "ethers": "^6.9.2", "i18next": "23.7.11", "react": "18.2.0", diff --git a/src/app/hooks/useFormattedTimestamp.ts b/src/app/hooks/useFormattedTimestamp.ts index 16b359170..e8646814c 100644 --- a/src/app/hooks/useFormattedTimestamp.ts +++ b/src/app/hooks/useFormattedTimestamp.ts @@ -1,4 +1,4 @@ -import formatDistanceStrict from 'date-fns/formatDistanceStrict' +import { formatDistanceStrict } from 'date-fns/formatDistanceStrict' import { useTranslation } from 'react-i18next' import { useScreenSize } from './useScreensize' diff --git a/src/app/pages/ParatimeDashboardPage/ActiveAccounts.tsx b/src/app/pages/ParatimeDashboardPage/ActiveAccounts.tsx index a9918b230..51a2258cd 100644 --- a/src/app/pages/ParatimeDashboardPage/ActiveAccounts.tsx +++ b/src/app/pages/ParatimeDashboardPage/ActiveAccounts.tsx @@ -1,7 +1,7 @@ import { FC } from 'react' import { TFunction } from 'i18next' import { useTranslation } from 'react-i18next' -import startOfMonth from 'date-fns/startOfMonth' +import { startOfMonth } from 'date-fns/startOfMonth' import { SnapshotCard } from '../../components/Snapshots/SnapshotCard' import { SnapshotCardDurationLabel } from '../../components/Snapshots/SnapshotCardDurationLabel' import { BarChart } from '../../components/charts/BarChart' diff --git a/src/app/pages/ParatimeDashboardPage/TransactionsChartCard.tsx b/src/app/pages/ParatimeDashboardPage/TransactionsChartCard.tsx index 48fde549d..787f9725f 100644 --- a/src/app/pages/ParatimeDashboardPage/TransactionsChartCard.tsx +++ b/src/app/pages/ParatimeDashboardPage/TransactionsChartCard.tsx @@ -13,7 +13,7 @@ import { FC, memo } from 'react' import { SnapshotCard } from '../../components/Snapshots/SnapshotCard' import { SnapshotCardDurationLabel } from '../../components/Snapshots/SnapshotCardDurationLabel' import { PercentageGain } from '../../components/PercentageGain' -import startOfHour from 'date-fns/startOfHour' +import { startOfHour } from 'date-fns/startOfHour' import { SearchScope } from '../../../types/searchScope' const getLabels = (t: TFunction): Record => ({ diff --git a/src/app/utils/chart-utils.ts b/src/app/utils/chart-utils.ts index 02aa67943..998ebc777 100644 --- a/src/app/utils/chart-utils.ts +++ b/src/app/utils/chart-utils.ts @@ -1,7 +1,7 @@ -import startOfHour from 'date-fns/startOfHour' -import startOfDay from 'date-fns/startOfDay' -import isSameMonth from 'date-fns/isSameMonth' -import startOfMonth from 'date-fns/startOfMonth' +import { startOfHour } from 'date-fns/startOfHour' +import { startOfDay } from 'date-fns/startOfDay' +import { isSameMonth } from 'date-fns/isSameMonth' +import { startOfMonth } from 'date-fns/startOfMonth' import { GetLayerStatsTxVolumeParams, type TxVolume, type ActiveAccounts } from '../../oasis-nexus/api' const fiveMinutesWindowSize = 60 * 5 diff --git a/src/app/utils/dateFormatter.ts b/src/app/utils/dateFormatter.ts index 8d7b06f9d..809a96afd 100644 --- a/src/app/utils/dateFormatter.ts +++ b/src/app/utils/dateFormatter.ts @@ -6,8 +6,8 @@ import { secondsInWeek, secondsInYear, } from 'date-fns/constants' -import differenceInSeconds from 'date-fns/differenceInSeconds' -import intlFormatDistance from 'date-fns/intlFormatDistance' +import { differenceInSeconds } from 'date-fns/differenceInSeconds' +import { intlFormatDistance } from 'date-fns/intlFormatDistance' const dateFormat = new Intl.DateTimeFormat() diff --git a/yarn.lock b/yarn.lock index 3c2b6579e..74dd0c906 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1956,7 +1956,7 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.7", "@babel/runtime@^7.22.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.22.11" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.11.tgz#7a9ba3bbe406ad6f9e8dd4da2ece453eb23a77a4" integrity sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA== @@ -7254,12 +7254,10 @@ data-urls@^3.0.2: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" -date-fns@2.30.0: - version "2.30.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" - integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== - dependencies: - "@babel/runtime" "^7.21.0" +date-fns@3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-3.0.6.tgz#fe3aeb7592d359f075ffc41cb16139828810ca83" + integrity sha512-W+G99rycpKMMF2/YD064b2lE7jJGUe+EjOES7Q8BIGY8sbNdbgcs9XFTZwvzc9Jx1f3k7LB7gZaZa7f8Agzljg== debug@2.6.9, debug@^2.6.9: version "2.6.9"