From 36c235b7a86aab1946697a8da77b4781d8247538 Mon Sep 17 00:00:00 2001 From: Bryce Osterhaus Date: Fri, 3 Jan 2025 16:20:51 +0400 Subject: [PATCH] fix(@clayui/date-picker): update date-fns to v4 --- packages/clay-date-picker/package.json | 2 +- packages/clay-date-picker/src/Helpers.ts | 4 +-- .../src/__tests__/IncrementalInteractions.tsx | 2 +- yarn.lock | 36 +++++++++++++++++-- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/packages/clay-date-picker/package.json b/packages/clay-date-picker/package.json index b9b691796c..53c10d405b 100644 --- a/packages/clay-date-picker/package.json +++ b/packages/clay-date-picker/package.json @@ -28,7 +28,7 @@ "@clayui/shared": "^3.119.0", "@clayui/time-picker": "^3.122.0", "classnames": "^2.2.6", - "date-fns": "^2.14.0" + "date-fns": "^4.1.0" }, "peerDependencies": { "@clayui/css": "3.x", diff --git a/packages/clay-date-picker/src/Helpers.ts b/packages/clay-date-picker/src/Helpers.ts index e092eb1727..bc7c10ec6c 100644 --- a/packages/clay-date-picker/src/Helpers.ts +++ b/packages/clay-date-picker/src/Helpers.ts @@ -3,8 +3,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {default as formatDate} from 'date-fns/format'; -import {default as parseDate} from 'date-fns/parse'; +import {format as formatDate} from 'date-fns/format'; +import {parse as parseDate} from 'date-fns/parse'; import type {ISelectOption} from './Select'; diff --git a/packages/clay-date-picker/src/__tests__/IncrementalInteractions.tsx b/packages/clay-date-picker/src/__tests__/IncrementalInteractions.tsx index e9addf06a8..59697fbbde 100644 --- a/packages/clay-date-picker/src/__tests__/IncrementalInteractions.tsx +++ b/packages/clay-date-picker/src/__tests__/IncrementalInteractions.tsx @@ -11,7 +11,7 @@ import { render, } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import {default as formatDate} from 'date-fns/format'; +import {format as formatDate} from 'date-fns/format'; import React from 'react'; const spritemap = 'icons.svg'; diff --git a/yarn.lock b/yarn.lock index 7958ce5674..7148ae2f76 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9617,6 +9617,11 @@ date-fns@^2.14.0: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.25.0.tgz#8c5c8f1d958be3809a9a03f4b742eba894fc5680" integrity sha512-ovYRFnTrbGPD4nqaEqescPEv1mNwvt+UTqI3Ay9SzNtey9NZnYu6E2qCcBBgJ6/2VF1zGGygpyTDITqpQQ5e+w== +date-fns@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-4.1.0.tgz#64b3d83fff5aa80438f5b1a633c2e83b8a1c2d14" + integrity sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg== + dateformat@^1.0.11: version "1.0.12" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" @@ -23946,7 +23951,7 @@ string-similarity@^1.2.2: lodash.map "^4.6.0" lodash.maxby "^4.6.0" -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -23964,6 +23969,15 @@ string-width@^1.0.0, string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -24067,7 +24081,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^2.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -24116,6 +24130,13 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -26725,7 +26746,7 @@ worker-rpc@^0.1.0: dependencies: microevent.ts "~0.1.1" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -26751,6 +26772,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"