diff --git a/package.json b/package.json index 82d1ead45..daf78e3a8 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,8 @@ } }, "sideEffects": [ - "*.css" + "*.css", + "./dist/i18n/Streami18n.js" ], "keywords": [ "chat", @@ -204,7 +205,7 @@ "core-js": "^3.6.5", "dotenv": "^8.6.0", "emoji-mart": "^5.5.2", - "esbuild": "^0.20.2", + "esbuild": "^0.23.1", "eslint": "7.14.0", "eslint-config-airbnb": "^18.2.1", "eslint-config-prettier": "^6.15.0", diff --git a/src/components/Channel/hooks/useCreateChannelStateContext.ts b/src/components/Channel/hooks/useCreateChannelStateContext.ts index 9462da6fb..bcd87e3db 100644 --- a/src/components/Channel/hooks/useCreateChannelStateContext.ts +++ b/src/components/Channel/hooks/useCreateChannelStateContext.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react'; -import { isDate, isDayOrMoment } from '../../../context/TranslationContext'; +import { isDate, isDayOrMoment } from '../../../i18n'; import type { ChannelStateContextValue } from '../../../context/ChannelStateContext'; diff --git a/src/components/Chat/Chat.tsx b/src/components/Chat/Chat.tsx index 23c8ad87d..6e997cd44 100644 --- a/src/components/Chat/Chat.tsx +++ b/src/components/Chat/Chat.tsx @@ -5,12 +5,12 @@ import { useCreateChatContext } from './hooks/useCreateChatContext'; import { useChannelsQueryState } from './hooks/useChannelsQueryState'; import { ChatProvider, CustomClasses } from '../../context/ChatContext'; -import { SupportedTranslations, TranslationProvider } from '../../context/TranslationContext'; +import { TranslationProvider } from '../../context/TranslationContext'; import type { StreamChat } from 'stream-chat'; +import type { SupportedTranslations } from '../../i18n/types'; import type { Streami18n } from '../../i18n/Streami18n'; - import type { DefaultStreamChatGenerics } from '../../types/types'; export type ChatProps< diff --git a/src/components/Chat/hooks/useChat.ts b/src/components/Chat/hooks/useChat.ts index 280e620bd..8e99b084e 100644 --- a/src/components/Chat/hooks/useChat.ts +++ b/src/components/Chat/hooks/useChat.ts @@ -1,12 +1,12 @@ import { useCallback, useEffect, useRef, useState } from 'react'; +import { TranslationContextValue } from '../../../context/TranslationContext'; import { defaultDateTimeParser, isLanguageSupported, + Streami18n, SupportedTranslations, - TranslationContextValue, -} from '../../../context/TranslationContext'; -import { Streami18n } from '../../../i18n'; +} from '../../../i18n'; import { version } from '../../../version'; import type { AppSettingsAPIResponse, Channel, Event, Mute, StreamChat } from 'stream-chat'; diff --git a/src/components/DateSeparator/DateSeparator.tsx b/src/components/DateSeparator/DateSeparator.tsx index b3b4474c8..f4bbb3a50 100644 --- a/src/components/DateSeparator/DateSeparator.tsx +++ b/src/components/DateSeparator/DateSeparator.tsx @@ -1,7 +1,9 @@ import React from 'react'; import { useTranslationContext } from '../../context/TranslationContext'; -import { getDateString, TimestampFormatterOptions } from '../../i18n/utils'; +import { getDateString } from '../../i18n/utils'; + +import type { TimestampFormatterOptions } from '../../i18n/types'; export type DateSeparatorProps = TimestampFormatterOptions & { /** The date to format */ diff --git a/src/components/EventComponent/EventComponent.tsx b/src/components/EventComponent/EventComponent.tsx index 65118090b..ce09b8e21 100644 --- a/src/components/EventComponent/EventComponent.tsx +++ b/src/components/EventComponent/EventComponent.tsx @@ -3,11 +3,11 @@ import React from 'react'; import { AvatarProps, Avatar as DefaultAvatar } from '../Avatar'; import { useTranslationContext } from '../../context/TranslationContext'; +import { getDateString } from '../../i18n/utils'; import type { StreamMessage } from '../../context/ChannelStateContext'; - import type { DefaultStreamChatGenerics } from '../../types/types'; -import { getDateString, TimestampFormatterOptions } from '../../i18n/utils'; +import type { TimestampFormatterOptions } from '../../i18n/types'; export type EventComponentProps< StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics diff --git a/src/components/Message/MessageTimestamp.tsx b/src/components/Message/MessageTimestamp.tsx index e4f68bc45..bf8959feb 100644 --- a/src/components/Message/MessageTimestamp.tsx +++ b/src/components/Message/MessageTimestamp.tsx @@ -4,8 +4,8 @@ import { Timestamp as DefaultTimestamp } from './Timestamp'; import { useComponentContext } from '../../context'; import type { StreamMessage } from '../../context/ChannelStateContext'; +import type { TimestampFormatterOptions } from '../../i18n/types'; import type { DefaultStreamChatGenerics } from '../../types/types'; -import type { TimestampFormatterOptions } from '../../i18n/utils'; export type MessageTimestampProps< StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics diff --git a/src/components/Message/Timestamp.tsx b/src/components/Message/Timestamp.tsx index 339af0e4a..e085354b3 100644 --- a/src/components/Message/Timestamp.tsx +++ b/src/components/Message/Timestamp.tsx @@ -1,8 +1,9 @@ import React, { useMemo } from 'react'; import { useMessageContext } from '../../context/MessageContext'; -import { isDate, useTranslationContext } from '../../context/TranslationContext'; -import { getDateString, TimestampFormatterOptions } from '../../i18n/utils'; +import { useTranslationContext } from '../../context/TranslationContext'; +import { getDateString, isDate } from '../../i18n/utils'; +import type { TimestampFormatterOptions } from '../../i18n/types'; export interface TimestampProps extends TimestampFormatterOptions { /* Adds a CSS class name to the component's outer `time` container. */ diff --git a/src/components/Message/__tests__/MessageTimestamp.test.js b/src/components/Message/__tests__/MessageTimestamp.test.js index 38ec51244..abb18828c 100644 --- a/src/components/Message/__tests__/MessageTimestamp.test.js +++ b/src/components/Message/__tests__/MessageTimestamp.test.js @@ -25,8 +25,10 @@ const calendarFormats = { const dateMock = 'the date'; const formatDate = () => dateMock; +const createdAt = new Date('2019-04-03T14:42:47.087869Z'); + const messageMock = generateMessage({ - created_at: new Date('2019-04-03T14:42:47.087869Z'), + created_at: createdAt, }); const renderComponent = async ({ chatProps, componentCtx, messageCtx, props } = {}) => { @@ -124,7 +126,7 @@ describe('', () => { }), }, }); - expect(container).toHaveTextContent('2019-04-03T14:42:47+00:00'); + expect(container).toHaveTextContent('2019-04-03T14:42:47Z'); }); it('should render with custom format provided via i18n service', async () => { @@ -172,7 +174,7 @@ describe('', () => { }, props: { calendarFormats }, }); - expect(container).toHaveTextContent('2019-04-03T14:42:47+00:00'); + expect(container).toHaveTextContent('2019-04-03T14:42:47Z'); }); it('should reflect the custom calendarFormats if calendar is enabled', async () => { diff --git a/src/components/MessageList/utils.ts b/src/components/MessageList/utils.ts index b280d24d1..bd762869c 100644 --- a/src/components/MessageList/utils.ts +++ b/src/components/MessageList/utils.ts @@ -2,13 +2,12 @@ import { nanoid } from 'nanoid'; import { CUSTOM_MESSAGE_TYPE } from '../../constants/messageTypes'; - -import { isDate } from '../../context/TranslationContext'; +import { isMessageEdited } from '../Message/utils'; +import { isDate } from '../../i18n'; import type { MessageLabel, UserResponse } from 'stream-chat'; import type { DefaultStreamChatGenerics } from '../../types/types'; import type { StreamMessage } from '../../context/ChannelStateContext'; -import { isMessageEdited } from '../Message/utils'; type ProcessMessagesContext = { /** the connected user ID */ diff --git a/src/context/TranslationContext.tsx b/src/context/TranslationContext.tsx index 61fdba334..974664d33 100644 --- a/src/context/TranslationContext.tsx +++ b/src/context/TranslationContext.tsx @@ -4,59 +4,23 @@ import calendar from 'dayjs/plugin/calendar'; import localizedFormat from 'dayjs/plugin/localizedFormat'; import { getDisplayName } from './utils/getDisplayName'; +import { defaultDateTimeParser, defaultTranslatorFunction } from '../i18n/utils'; import type { TFunction } from 'i18next'; -import type { Moment } from 'moment-timezone'; import type { TranslationLanguages } from 'stream-chat'; import type { UnknownType } from '../types/types'; -import { defaultTranslatorFunction } from '../i18n'; +import type { TDateTimeParser } from '../i18n/types'; Dayjs.extend(calendar); Dayjs.extend(localizedFormat); -export type SupportedTranslations = - | 'de' - | 'en' - | 'es' - | 'fr' - | 'hi' - | 'it' - | 'ja' - | 'ko' - | 'nl' - | 'pt' - | 'ru' - | 'tr'; - -export const isLanguageSupported = (language: string): language is SupportedTranslations => { - const translations = ['de', 'en', 'es', 'fr', 'hi', 'it', 'ja', 'ko', 'nl', 'pt', 'ru', 'tr']; - return translations.some((translation) => language === translation); -}; - -export const isDayOrMoment = (output: TDateTimeParserOutput): output is Dayjs.Dayjs | Moment => - !!(output as Dayjs.Dayjs | Moment)?.isSame; - -export const isDate = (output: TDateTimeParserOutput): output is Date => - !!(output as Date)?.getMonth; - -export const isNumberOrString = (output: TDateTimeParserOutput): output is number | string => - typeof output === 'string' || typeof output === 'number'; - -export type TDateTimeParserInput = string | number | Date; - -export type TDateTimeParserOutput = string | number | Date | Dayjs.Dayjs | Moment; - -export type TDateTimeParser = (input?: TDateTimeParserInput) => TDateTimeParserOutput; - export type TranslationContextValue = { t: TFunction; tDateTimeParser: TDateTimeParser; userLanguage: TranslationLanguages; }; -export const defaultDateTimeParser = (input?: TDateTimeParserInput) => Dayjs(input); - export const TranslationContext = React.createContext({ t: defaultTranslatorFunction, tDateTimeParser: defaultDateTimeParser, diff --git a/src/i18n/Streami18n.ts b/src/i18n/Streami18n.ts index 3f55a4035..33db90c93 100644 --- a/src/i18n/Streami18n.ts +++ b/src/i18n/Streami18n.ts @@ -7,15 +7,13 @@ import localeData from 'dayjs/plugin/localeData'; import relativeTime from 'dayjs/plugin/relativeTime'; import utc from 'dayjs/plugin/utc'; import timezone from 'dayjs/plugin/timezone'; -import { predefinedFormatters } from './utils'; +import { defaultTranslatorFunction, predefinedFormatters } from './utils'; import type momentTimezone from 'moment-timezone'; import type { TranslationLanguages } from 'stream-chat'; -import type { CustomFormatters, PredefinedFormatters } from './utils'; -import type { TDateTimeParser } from '../context/TranslationContext'; - import type { UnknownType } from '../types/types'; +import type { CustomFormatters, PredefinedFormatters, TDateTimeParser } from './types'; import { deTranslations, @@ -418,8 +416,6 @@ const defaultStreami18nOptions = { logger: (message?: string) => console.warn(message), }; -export const defaultTranslatorFunction: TFunction = (key: tResult) => key; - export class Streami18n { i18nInstance = i18n.createInstance(); Dayjs = null; diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 465b42342..730ec6990 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -1,3 +1,11 @@ export * from './translations'; export * from './Streami18n'; -export type { FormatterFactory, TimestampFormatterOptions } from './utils'; +export { + defaultDateTimeParser, + defaultTranslatorFunction, + isDate, + isDayOrMoment, + isLanguageSupported, + isNumberOrString, +} from './utils'; +export * from './types'; diff --git a/src/i18n/types.ts b/src/i18n/types.ts new file mode 100644 index 000000000..9e8378f92 --- /dev/null +++ b/src/i18n/types.ts @@ -0,0 +1,53 @@ +import type { Streami18n } from './Streami18n'; +import Dayjs from 'dayjs'; +import type { Moment } from 'moment-timezone'; +import { MessageContextValue } from '../context'; +import type { TFunction } from 'i18next'; + +export type FormatterFactory = ( + streamI18n: Streami18n, +) => (value: V, lng: string | undefined, options: Record) => string; + +export type TimestampFormatterOptions = { + /* If true, call the `Day.js` calendar function to get the date string to display (e.g. "Yesterday at 3:58 PM"). */ + calendar?: boolean; + /* Object specifying date display formats for dates formatted with calendar extension. Active only if calendar prop enabled. */ + calendarFormats?: Record; + /* Overrides the default timestamp format if calendar is disabled. */ + format?: string; +}; + +export type TDateTimeParserInput = string | number | Date; +export type TDateTimeParserOutput = string | number | Date | Dayjs.Dayjs | Moment; +export type TDateTimeParser = (input?: TDateTimeParserInput) => TDateTimeParserOutput; + +export type SupportedTranslations = + | 'de' + | 'en' + | 'es' + | 'fr' + | 'hi' + | 'it' + | 'ja' + | 'ko' + | 'nl' + | 'pt' + | 'ru' + | 'tr'; + +export type DateFormatterOptions = TimestampFormatterOptions & { + formatDate?: MessageContextValue['formatDate']; + messageCreatedAt?: string | Date; + t?: TFunction; + tDateTimeParser?: TDateTimeParser; + timestampTranslationKey?: string; +}; + +// Here is any used, because we do not want to enforce any specific rules and +// want to leave the type declaration to the integrator +/* eslint-disable-next-line @typescript-eslint/no-explicit-any */ +export type CustomFormatters = Record>; + +export type PredefinedFormatters = { + timestampFormatter: FormatterFactory; +}; diff --git a/src/i18n/utils.ts b/src/i18n/utils.ts index a271de7ae..978fd09cd 100644 --- a/src/i18n/utils.ts +++ b/src/i18n/utils.ts @@ -1,36 +1,30 @@ -import { - isDate, - isDayOrMoment, - isNumberOrString, - MessageContextValue, - TDateTimeParser, -} from '../context'; +import Dayjs from 'dayjs'; import type { TFunction } from 'i18next'; -import type { Streami18n } from './Streami18n'; - -export type TimestampFormatterOptions = { - /* If true, call the `Day.js` calendar function to get the date string to display (e.g. "Yesterday at 3:58 PM"). */ - calendar?: boolean; - /* Object specifying date display formats for dates formatted with calendar extension. Active only if calendar prop enabled. */ - calendarFormats?: Record; - /* Overrides the default timestamp format if calendar is disabled. */ - format?: string; -}; - -type DateFormatterOptions = TimestampFormatterOptions & { - formatDate?: MessageContextValue['formatDate']; - messageCreatedAt?: string | Date; - t?: TFunction; - tDateTimeParser?: TDateTimeParser; - timestampTranslationKey?: string; -}; +import type { Moment } from 'moment-timezone'; +import type { + DateFormatterOptions, + PredefinedFormatters, + SupportedTranslations, + TDateTimeParserInput, + TDateTimeParserOutput, + TimestampFormatterOptions, +} from './types'; export const notValidDateWarning = 'MessageTimestamp was called without a message, or message has invalid created_at date.'; export const noParsingFunctionWarning = 'MessageTimestamp was called but there is no datetime parsing function available'; +export const isNumberOrString = (output: TDateTimeParserOutput): output is number | string => + typeof output === 'string' || typeof output === 'number'; + +export const isDayOrMoment = (output: TDateTimeParserOutput): output is Dayjs.Dayjs | Moment => + !!(output as Dayjs.Dayjs | Moment)?.isSame; + +export const isDate = (output: TDateTimeParserOutput): output is Date => + !!(output as Date)?.getMonth; + export function getDateString({ calendar, calendarFormats, @@ -96,19 +90,6 @@ export function getDateString({ return null; } -export type FormatterFactory = ( - streamI18n: Streami18n, -) => (value: V, lng: string | undefined, options: Record) => string; - -// Here is any used, because we do not want to enforce any specific rules and -// want to leave the type declaration to the integrator -/* eslint-disable-next-line @typescript-eslint/no-explicit-any */ -export type CustomFormatters = Record>; - -export type PredefinedFormatters = { - timestampFormatter: FormatterFactory; -}; - export const predefinedFormatters: PredefinedFormatters = { timestampFormatter: (streamI18n) => ( value, @@ -145,3 +126,12 @@ export const predefinedFormatters: PredefinedFormatters = { return result; }, }; + +export const defaultTranslatorFunction: TFunction = (key: tResult) => key; + +export const defaultDateTimeParser = (input?: TDateTimeParserInput) => Dayjs(input); + +export const isLanguageSupported = (language: string): language is SupportedTranslations => { + const translations = ['de', 'en', 'es', 'fr', 'hi', 'it', 'ja', 'ko', 'nl', 'pt', 'ru', 'tr']; + return translations.some((translation) => language === translation); +}; diff --git a/yarn.lock b/yarn.lock index 114a29912..8936b8ca1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1283,120 +1283,125 @@ resolved "https://registry.yarnpkg.com/@emoji-mart/react/-/react-1.1.1.tgz#ddad52f93a25baf31c5383c3e7e4c6e05554312a" integrity sha512-NMlFNeWgv1//uPsvLxvGQoIerPuVdXwK/EUek8OOkJ6wVOWPUizRBJU0hDqWZCOROVpfBgCemaC3m6jDOXi03g== -"@esbuild/aix-ppc64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz#a70f4ac11c6a1dfc18b8bbb13284155d933b9537" - integrity sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g== - -"@esbuild/android-arm64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz#db1c9202a5bc92ea04c7b6840f1bbe09ebf9e6b9" - integrity sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg== - -"@esbuild/android-arm@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.20.2.tgz#3b488c49aee9d491c2c8f98a909b785870d6e995" - integrity sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w== - -"@esbuild/android-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.20.2.tgz#3b1628029e5576249d2b2d766696e50768449f98" - integrity sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg== - -"@esbuild/darwin-arm64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz#6e8517a045ddd86ae30c6608c8475ebc0c4000bb" - integrity sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA== - -"@esbuild/darwin-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz#90ed098e1f9dd8a9381695b207e1cff45540a0d0" - integrity sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA== - -"@esbuild/freebsd-arm64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz#d71502d1ee89a1130327e890364666c760a2a911" - integrity sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw== - -"@esbuild/freebsd-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz#aa5ea58d9c1dd9af688b8b6f63ef0d3d60cea53c" - integrity sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw== - -"@esbuild/linux-arm64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz#055b63725df678379b0f6db9d0fa85463755b2e5" - integrity sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A== - -"@esbuild/linux-arm@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz#76b3b98cb1f87936fbc37f073efabad49dcd889c" - integrity sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg== - -"@esbuild/linux-ia32@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz#c0e5e787c285264e5dfc7a79f04b8b4eefdad7fa" - integrity sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig== - -"@esbuild/linux-loong64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz#a6184e62bd7cdc63e0c0448b83801001653219c5" - integrity sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ== - -"@esbuild/linux-mips64el@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz#d08e39ce86f45ef8fc88549d29c62b8acf5649aa" - integrity sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA== - -"@esbuild/linux-ppc64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz#8d252f0b7756ffd6d1cbde5ea67ff8fd20437f20" - integrity sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg== - -"@esbuild/linux-riscv64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz#19f6dcdb14409dae607f66ca1181dd4e9db81300" - integrity sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg== - -"@esbuild/linux-s390x@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz#3c830c90f1a5d7dd1473d5595ea4ebb920988685" - integrity sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ== - -"@esbuild/linux-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz#86eca35203afc0d9de0694c64ec0ab0a378f6fff" - integrity sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw== - -"@esbuild/netbsd-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz#e771c8eb0e0f6e1877ffd4220036b98aed5915e6" - integrity sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ== - -"@esbuild/openbsd-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz#9a795ae4b4e37e674f0f4d716f3e226dd7c39baf" - integrity sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ== - -"@esbuild/sunos-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz#7df23b61a497b8ac189def6e25a95673caedb03f" - integrity sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w== - -"@esbuild/win32-arm64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz#f1ae5abf9ca052ae11c1bc806fb4c0f519bacf90" - integrity sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ== - -"@esbuild/win32-ia32@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz#241fe62c34d8e8461cd708277813e1d0ba55ce23" - integrity sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ== - -"@esbuild/win32-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz#9c907b21e30a52db959ba4f80bb01a0cc403d5cc" - integrity sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ== +"@esbuild/aix-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353" + integrity sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ== + +"@esbuild/android-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" + integrity sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw== + +"@esbuild/android-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" + integrity sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ== + +"@esbuild/android-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" + integrity sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg== + +"@esbuild/darwin-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz#05b17f91a87e557b468a9c75e9d85ab10c121b16" + integrity sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q== + +"@esbuild/darwin-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" + integrity sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw== + +"@esbuild/freebsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" + integrity sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA== + +"@esbuild/freebsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" + integrity sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g== + +"@esbuild/linux-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" + integrity sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g== + +"@esbuild/linux-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" + integrity sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ== + +"@esbuild/linux-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" + integrity sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ== + +"@esbuild/linux-loong64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" + integrity sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw== + +"@esbuild/linux-mips64el@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" + integrity sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q== + +"@esbuild/linux-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" + integrity sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw== + +"@esbuild/linux-riscv64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" + integrity sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA== + +"@esbuild/linux-s390x@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" + integrity sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw== + +"@esbuild/linux-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" + integrity sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ== + +"@esbuild/netbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" + integrity sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA== + +"@esbuild/openbsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" + integrity sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q== + +"@esbuild/openbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" + integrity sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA== + +"@esbuild/sunos-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" + integrity sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA== + +"@esbuild/win32-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" + integrity sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A== + +"@esbuild/win32-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" + integrity sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ== + +"@esbuild/win32-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" + integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg== "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" @@ -5540,34 +5545,35 @@ esbuild@^0.14.27: esbuild-windows-64 "0.14.27" esbuild-windows-arm64 "0.14.27" -esbuild@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.20.2.tgz#9d6b2386561766ee6b5a55196c6d766d28c87ea1" - integrity sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g== +esbuild@^0.23.1: + version "0.23.1" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.23.1.tgz#40fdc3f9265ec0beae6f59824ade1bd3d3d2dab8" + integrity sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg== optionalDependencies: - "@esbuild/aix-ppc64" "0.20.2" - "@esbuild/android-arm" "0.20.2" - "@esbuild/android-arm64" "0.20.2" - "@esbuild/android-x64" "0.20.2" - "@esbuild/darwin-arm64" "0.20.2" - "@esbuild/darwin-x64" "0.20.2" - "@esbuild/freebsd-arm64" "0.20.2" - "@esbuild/freebsd-x64" "0.20.2" - "@esbuild/linux-arm" "0.20.2" - "@esbuild/linux-arm64" "0.20.2" - "@esbuild/linux-ia32" "0.20.2" - "@esbuild/linux-loong64" "0.20.2" - "@esbuild/linux-mips64el" "0.20.2" - "@esbuild/linux-ppc64" "0.20.2" - "@esbuild/linux-riscv64" "0.20.2" - "@esbuild/linux-s390x" "0.20.2" - "@esbuild/linux-x64" "0.20.2" - "@esbuild/netbsd-x64" "0.20.2" - "@esbuild/openbsd-x64" "0.20.2" - "@esbuild/sunos-x64" "0.20.2" - "@esbuild/win32-arm64" "0.20.2" - "@esbuild/win32-ia32" "0.20.2" - "@esbuild/win32-x64" "0.20.2" + "@esbuild/aix-ppc64" "0.23.1" + "@esbuild/android-arm" "0.23.1" + "@esbuild/android-arm64" "0.23.1" + "@esbuild/android-x64" "0.23.1" + "@esbuild/darwin-arm64" "0.23.1" + "@esbuild/darwin-x64" "0.23.1" + "@esbuild/freebsd-arm64" "0.23.1" + "@esbuild/freebsd-x64" "0.23.1" + "@esbuild/linux-arm" "0.23.1" + "@esbuild/linux-arm64" "0.23.1" + "@esbuild/linux-ia32" "0.23.1" + "@esbuild/linux-loong64" "0.23.1" + "@esbuild/linux-mips64el" "0.23.1" + "@esbuild/linux-ppc64" "0.23.1" + "@esbuild/linux-riscv64" "0.23.1" + "@esbuild/linux-s390x" "0.23.1" + "@esbuild/linux-x64" "0.23.1" + "@esbuild/netbsd-x64" "0.23.1" + "@esbuild/openbsd-arm64" "0.23.1" + "@esbuild/openbsd-x64" "0.23.1" + "@esbuild/sunos-x64" "0.23.1" + "@esbuild/win32-arm64" "0.23.1" + "@esbuild/win32-ia32" "0.23.1" + "@esbuild/win32-x64" "0.23.1" escalade@^3.1.1, escalade@^3.1.2: version "3.1.2"