From 2599d46bdc28d6e05004ea52db47c2e68417bfaa Mon Sep 17 00:00:00 2001 From: Jalil Arfaoui Date: Wed, 17 Apr 2024 09:57:08 +0200 Subject: [PATCH] chore: update date-fns --- site/package.json | 2 +- site/source/design-system/field/DateField.tsx | 3 +-- yarn.lock | 14 ++++++-------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/site/package.json b/site/package.json index ea2a80fae..6df8adbd8 100644 --- a/site/package.json +++ b/site/package.json @@ -62,7 +62,7 @@ "@sentry/integrations": "^7.70.0", "@sentry/react": "^7.70.0", "algoliasearch": "^4.20.0", - "date-fns": "^2.30.0", + "date-fns": "^3.6.0", "exoneration-covid": "workspace:^", "focus-trap-react": "^10.2.1", "fuse.js": "^6.6.2", diff --git a/site/source/design-system/field/DateField.tsx b/site/source/design-system/field/DateField.tsx index 41229eec8..8d72a978b 100644 --- a/site/source/design-system/field/DateField.tsx +++ b/site/source/design-system/field/DateField.tsx @@ -2,8 +2,7 @@ import 'react-day-picker/dist/style.css' import { autoUpdate, flip, offset, useFloating } from '@floating-ui/react-dom' import { format as formatDate, isValid, parse } from 'date-fns' -import enUS from 'date-fns/locale/en-US/index.js' -import fr from 'date-fns/locale/fr/index.js' +import { enUS, fr } from 'date-fns/locale' import FocusTrap from 'focus-trap-react' import { useCallback, useEffect, useRef, useState } from 'react' import { useId } from 'react-aria' diff --git a/yarn.lock b/yarn.lock index 03406bc17..c3ad9f4ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3689,7 +3689,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.21.0": +"@babel/runtime@npm:^7.13.10": version: 7.22.15 resolution: "@babel/runtime@npm:7.22.15" dependencies: @@ -16876,12 +16876,10 @@ __metadata: languageName: node linkType: hard -"date-fns@npm:^2.30.0": - version: 2.30.0 - resolution: "date-fns@npm:2.30.0" - dependencies: - "@babel/runtime": ^7.21.0 - checksum: f7be01523282e9bb06c0cd2693d34f245247a29098527d4420628966a2d9aad154bd0e90a6b1cf66d37adcb769cd108cf8a7bd49d76db0fb119af5cdd13644f4 +"date-fns@npm:^3.6.0": + version: 3.6.0 + resolution: "date-fns@npm:3.6.0" + checksum: 0daa1e9a436cf99f9f2ae9232b55e11f3dd46132bee10987164f3eebd29f245b2e066d7d7db40782627411ecf18551d8f4c9fcdf2226e48bb66545407d448ab7 languageName: node linkType: hard @@ -29228,7 +29226,7 @@ __metadata: cypress-axe: ^1.5.0 cypress-plugin-tab: ^1.0.5 cypress-wait-until: ^1.7.2 - date-fns: ^2.30.0 + date-fns: ^3.6.0 dotenv: ^16.3.1 eslint-plugin-testing-library: ^6.2.0 exoneration-covid: "workspace:^"