Update dependency date-fns to v3 (#81625)

* Update dependency date-fns to v3

* update imports

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
renovate[bot]
2024-01-31 12:05:38 +00:00
committed by GitHub
parent e0054c06fe
commit 42fe0fdf70
6 changed files with 13 additions and 17 deletions

View File

@@ -40,7 +40,7 @@
"@types/d3-interpolate": "^3.0.0",
"@types/string-hash": "1.1.3",
"d3-interpolate": "3.0.1",
"date-fns": "2.30.0",
"date-fns": "3.3.1",
"dompurify": "^2.4.3",
"eventemitter3": "5.0.1",
"fast_array_intersect": "1.1.0",

View File

@@ -1,6 +1,4 @@
import { Duration, Interval, isAfter } from 'date-fns';
import add from 'date-fns/add';
import intervalToDuration from 'date-fns/intervalToDuration';
import { add, Duration, intervalToDuration, Interval, isAfter } from 'date-fns';
const durationMap: { [key in Required<keyof Duration>]: string[] } = {
years: ['y', 'Y', 'years'],