From f6c9b3d50be61ceddf7ea15126ea569014c8b6eb Mon Sep 17 00:00:00 2001 From: Nitesh Seram Date: Thu, 24 Apr 2025 14:23:55 +0530 Subject: [PATCH] [web] forms: upgrade form dependencies (#1423) --- apps/socialmon/package.json | 2 +- apps/web/package.json | 6 +- ...ojectsProfileExperienceValueInitializer.ts | 89 ++++++--- .../ProjectsOnboardingMotivationsForm.tsx | 5 +- .../ProjectsOnboardingProfileForm.tsx | 21 +- .../profile/edit/ProjectsProfileEditPage.tsx | 13 +- .../edit/ProjectsProfileJobSection.tsx | 11 +- .../edit/ProjectsProfileMotivationsField.tsx | 2 +- .../fields/ProjectsProfileJobSchema.ts | 12 +- apps/web/src/components/projects/types.ts | 4 - packages/langnostic/package.json | 2 +- pnpm-lock.yaml | 185 +++++++++--------- 12 files changed, 195 insertions(+), 157 deletions(-) diff --git a/apps/socialmon/package.json b/apps/socialmon/package.json index 89adcf47f..9a39d701d 100644 --- a/apps/socialmon/package.json +++ b/apps/socialmon/package.json @@ -45,7 +45,7 @@ "snoowrap": "^1.23.0", "superjson": "^2.2.2", "usehooks-ts": "^2.9.1", - "zod": "^3.21.4" + "zod": "^3.24.3" }, "devDependencies": { "@gfe/eslint-config-gfe-apps": "workspace:0.0.0", diff --git a/apps/web/package.json b/apps/web/package.json index 3a06e00ff..d3f6ebf41 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -43,7 +43,7 @@ "@formatjs/intl": "^3.1.6", "@formatjs/intl-localematcher": "^0.6.1", "@gfe/remark-alerts": "workspace:^", - "@hookform/resolvers": "^3.3.2", + "@hookform/resolvers": "^5.0.1", "@lexical/code": "^0.30.0", "@lexical/headless": "^0.30.0", "@lexical/link": "^0.30.0", @@ -130,7 +130,7 @@ "react-dnd-html5-backend": "^16.0.1", "react-dom": "^18.2.0", "react-dropzone": "^14.3.8", - "react-hook-form": "^7.47.0", + "react-hook-form": "^7.56.1", "react-icons": "5.4.0", "react-intl": "^7.1.11", "react-merge-refs": "^2.1.1", @@ -151,7 +151,7 @@ "unified": "10.1.2", "usehooks-ts": "^3.1.1", "uuid": "^11.1.0", - "zod": "^3.21.4" + "zod": "^3.24.3" }, "devDependencies": { "@formatjs/cli": "^6.6.4", diff --git a/apps/web/src/components/projects/hooks/useProjectsProfileExperienceValueInitializer.ts b/apps/web/src/components/projects/hooks/useProjectsProfileExperienceValueInitializer.ts index a181a37e0..cbfa76c21 100644 --- a/apps/web/src/components/projects/hooks/useProjectsProfileExperienceValueInitializer.ts +++ b/apps/web/src/components/projects/hooks/useProjectsProfileExperienceValueInitializer.ts @@ -1,17 +1,40 @@ +import type { z } from 'zod'; + import { yoeReplacementSchema } from '~/components/projects/misc'; -type InitializerValue = Readonly<{ - company: string; - hasStartedWork: boolean; - jobTitle: string; - monthYearExperience: string | undefined; - title: string; - yoeReplacement: { - option: string | undefined; - otherText: string | undefined; - }; +type YoeReplacement = + | Readonly<{ + option: Exclude, 'others'>; + otherText?: string; + }> + | Readonly<{ option: 'others'; otherText: string }>; + +type BaseInitializer = Readonly<{ + company?: string; + yoeReplacement?: YoeReplacement; }>; +type NotStartedWork = Readonly< + BaseInitializer & { + hasStartedWork: false; + jobTitle?: string; + monthYearExperience?: string; + title: string; + yoeReplacement: YoeReplacement; + } +>; + +type StartedWork = Readonly< + BaseInitializer & { + hasStartedWork: true; + jobTitle: string; + monthYearExperience: string; + title?: string; + } +>; + +type InitializerValue = NotStartedWork | StartedWork; + type Props = Readonly<{ company?: string | null; currentStatus?: string | null; @@ -24,24 +47,34 @@ export default function useProjectsProfileExperienceValueInitializer( ): InitializerValue { const hasStartedWork = initialValues?.currentStatus === null; + if (hasStartedWork) { + return { + company: initialValues?.company ?? undefined, + hasStartedWork: true, + jobTitle: initialValues?.title ?? '', + monthYearExperience: initialValues?.startWorkDate + ? `${initialValues.startWorkDate.toLocaleDateString(undefined, { + month: '2-digit', + })}/${initialValues.startWorkDate.getFullYear()}` + : '', + }; + } + return { - company: initialValues?.company ?? '', - hasStartedWork, - jobTitle: hasStartedWork ? initialValues?.title ?? '' : '', - monthYearExperience: initialValues?.startWorkDate - ? `${initialValues.startWorkDate.toLocaleDateString(undefined, { - month: '2-digit', - })}/${initialValues.startWorkDate.getFullYear()}` - : '', - title: hasStartedWork ? '' : initialValues?.title ?? '', - yoeReplacement: { - option: yoeReplacementSchema - .catch(() => 'others' as const) - .parse(initialValues?.currentStatus), - otherText: !yoeReplacementSchema.safeParse(initialValues?.currentStatus) - .success - ? initialValues?.currentStatus ?? undefined - : undefined, - }, + hasStartedWork: false as const, + jobTitle: '', + title: initialValues?.title ?? '', + yoeReplacement: yoeReplacementSchema + .exclude(['others']) + .safeParse(initialValues?.currentStatus).success + ? { + option: yoeReplacementSchema + .exclude(['others']) + .parse(initialValues?.currentStatus), + } + : { + option: 'others', + otherText: initialValues?.currentStatus ?? '', + }, }; } diff --git a/apps/web/src/components/projects/onboarding/ProjectsOnboardingMotivationsForm.tsx b/apps/web/src/components/projects/onboarding/ProjectsOnboardingMotivationsForm.tsx index cd0683956..0a6ba5680 100644 --- a/apps/web/src/components/projects/onboarding/ProjectsOnboardingMotivationsForm.tsx +++ b/apps/web/src/components/projects/onboarding/ProjectsOnboardingMotivationsForm.tsx @@ -6,7 +6,6 @@ import { z } from 'zod'; import { FormattedMessage, useIntl } from '~/components/intl'; import useProjectsMotivationReasonSchema from '~/components/projects/hooks/useProjectsMotivationReasonSchema'; -import type { ProjectsMotivationReasonFormValues } from '~/components/projects/types'; import Button from '~/components/ui/Button'; import Container from '~/components/ui/Container'; import Heading from '~/components/ui/Heading'; @@ -21,6 +20,10 @@ type OnboardingProfileFormTransformedValues = { motivations: z.infer>; }; +export type ProjectsMotivationReasonFormValues = { + motivations: z.input>; +}; + type Props = Readonly<{ onSubmit: (motivations: ReadonlyArray) => void; }>; diff --git a/apps/web/src/components/projects/onboarding/ProjectsOnboardingProfileForm.tsx b/apps/web/src/components/projects/onboarding/ProjectsOnboardingProfileForm.tsx index 777bfe07d..0b26f26c0 100644 --- a/apps/web/src/components/projects/onboarding/ProjectsOnboardingProfileForm.tsx +++ b/apps/web/src/components/projects/onboarding/ProjectsOnboardingProfileForm.tsx @@ -26,21 +26,6 @@ import logEvent from '~/logging/logEvent'; import { zodResolver } from '@hookform/resolvers/zod'; -export type ProjectsProfileOnboardingStepFormValues = { - avatarUrl?: string | undefined; - company: string; - hasStartedWork: boolean; - jobTitle: string; - monthYearExperience: string | undefined; - name: string; - title: string; - username: string; - yoeReplacement: { - option: string | undefined; - otherText: string | undefined; - }; -}; - function useOnboardingProfileStepSchema() { const intl = useIntl(); const usernameSchema = useProfileUsernameSchema(); @@ -66,7 +51,11 @@ function useOnboardingProfileStepSchema() { ]); } -type OnboardingProfileStepTransformedValues = z.infer< +type OnboardingProfileStepTransformedValues = z.output< + ReturnType +>; + +export type ProjectsProfileOnboardingStepFormValues = z.input< ReturnType >; diff --git a/apps/web/src/components/projects/profile/edit/ProjectsProfileEditPage.tsx b/apps/web/src/components/projects/profile/edit/ProjectsProfileEditPage.tsx index e13a48b41..f87af02fb 100644 --- a/apps/web/src/components/projects/profile/edit/ProjectsProfileEditPage.tsx +++ b/apps/web/src/components/projects/profile/edit/ProjectsProfileEditPage.tsx @@ -27,7 +27,6 @@ import { } from '~/components/projects/profile/fields/ProjectsProfileJobSchema'; import { useProjectsProfileWebsiteSchema } from '~/components/projects/profile/fields/ProjectsProfileWebsiteSchema'; import { useProjectsSkillListInputSchema } from '~/components/projects/skills/form/ProjectsSkillListInputSchema'; -import type { ProjectsProfileEditFormValues } from '~/components/projects/types'; import Anchor from '~/components/ui/Anchor'; import Button from '~/components/ui/Button'; import Heading from '~/components/ui/Heading'; @@ -78,7 +77,11 @@ function useProjectsProfileEditSchema() { ]); } -type ProjectsEditProfileTransformedValues = z.infer< +type ProjectsEditProfileTransformedValues = z.output< + ReturnType +>; + +export type ProjectsProfileEditFormValues = z.input< ReturnType >; @@ -126,9 +129,7 @@ export default function ProjectsProfileEditPage({ userProfile }: Props) { undefined, ProjectsEditProfileTransformedValues >({ - mode: 'onTouched', - resolver: zodResolver(projectsProfileEditSchema), - values: { + defaultValues: { avatarUrl: initialValues?.avatarUrl ?? '', bio: initialValues?.bio ?? '', githubUsername: initialValues?.githubUsername ?? '', @@ -143,6 +144,8 @@ export default function ProjectsProfileEditPage({ userProfile }: Props) { website: initialValues?.website ?? '', ...experienceInitialValues, }, + mode: 'onTouched', + resolver: zodResolver(projectsProfileEditSchema), }); const { handleSubmit, diff --git a/apps/web/src/components/projects/profile/edit/ProjectsProfileJobSection.tsx b/apps/web/src/components/projects/profile/edit/ProjectsProfileJobSection.tsx index c58e298fc..e88e63cd7 100644 --- a/apps/web/src/components/projects/profile/edit/ProjectsProfileJobSection.tsx +++ b/apps/web/src/components/projects/profile/edit/ProjectsProfileJobSection.tsx @@ -21,7 +21,7 @@ type Values = export default function ProjectsProfileJobSection() { const intl = useIntl(); - const { control, watch, formState } = useFormContext(); + const { control, watch, formState, setValue } = useFormContext(); const statusAttrs = getProjectsProfileJobStatusOthersFieldAttributes(intl); const jobStatusOptions = [ @@ -70,9 +70,12 @@ export default function ProjectsProfileJobSection() { })} {...field} value={field.value ? 'yes' : 'no'} - onChange={(value) => - field.onChange(value === 'yes' ? true : false) - }> + onChange={(value) => { + field.onChange(value === 'yes' ? true : false); + if (value === 'no' && !yoeReplacementOption) { + setValue('yoeReplacement.option', 'others'); + } + }}> {jobStatusOptions.map((option) => ( ))} diff --git a/apps/web/src/components/projects/profile/edit/ProjectsProfileMotivationsField.tsx b/apps/web/src/components/projects/profile/edit/ProjectsProfileMotivationsField.tsx index b8ffd9549..de738380b 100644 --- a/apps/web/src/components/projects/profile/edit/ProjectsProfileMotivationsField.tsx +++ b/apps/web/src/components/projects/profile/edit/ProjectsProfileMotivationsField.tsx @@ -7,7 +7,6 @@ import { RiCheckboxCircleFill } from 'react-icons/ri'; import { useIntl } from '~/components/intl'; import type { FieldView, - ProjectsMotivationReasonFormValues, ProjectsProfileEditFormValues, } from '~/components/projects/types'; import Text from '~/components/ui/Text'; @@ -27,6 +26,7 @@ import { import useProjectsMotivationReasonOptions from '../../hooks/useProjectsMotivationReasonOptions'; import { MOTIVATION_OTHER_REASON_CHAR_LIMIT } from '../../hooks/useProjectsMotivationReasonSchema'; +import type { ProjectsMotivationReasonFormValues } from '../../onboarding/ProjectsOnboardingMotivationsForm'; type Values = | ProjectsMotivationReasonFormValues diff --git a/apps/web/src/components/projects/profile/fields/ProjectsProfileJobSchema.ts b/apps/web/src/components/projects/profile/fields/ProjectsProfileJobSchema.ts index 6cd714abb..e14d76a33 100644 --- a/apps/web/src/components/projects/profile/fields/ProjectsProfileJobSchema.ts +++ b/apps/web/src/components/projects/profile/fields/ProjectsProfileJobSchema.ts @@ -81,7 +81,16 @@ export function useProjectsJobStartedSchema() { .optional() .transform(() => undefined), yoeReplacement: z - .any() + .discriminatedUnion('option', [ + z.object({ + option: yoeReplacementSchema.extract(['others']), + otherText: z.string().trim(), + }), + z.object({ + option: yoeReplacementSchema.exclude(['others']), + otherText: z.string().optional(), + }), + ]) .optional() .transform(() => null), }; @@ -164,6 +173,7 @@ export function useProjectsJobNotStartedSchema() { }), z.object({ option: yoeReplacementSchema.exclude(['others']), + otherText: z.string().optional(), }), ]) .transform((value) => { diff --git a/apps/web/src/components/projects/types.ts b/apps/web/src/components/projects/types.ts index c84ff8ba8..eb9dca2db 100644 --- a/apps/web/src/components/projects/types.ts +++ b/apps/web/src/components/projects/types.ts @@ -29,10 +29,6 @@ export type ProjectsMotivationReasonFormChoice = value: Exclude; }; -export type ProjectsMotivationReasonFormValues = Readonly<{ - motivations: Array; -}>; - // TODO(projects): generalize this field. export type ProjectsYoeReplacement = z.infer; diff --git a/packages/langnostic/package.json b/packages/langnostic/package.json index 7e76ed60d..1226a3e76 100644 --- a/packages/langnostic/package.json +++ b/packages/langnostic/package.json @@ -41,7 +41,7 @@ "remark-stringify": "^11.0.0", "unified": "^11.0.5", "yargs": "^17.7.2", - "zod": "^3.21.4" + "zod": "^3.24.3" }, "devDependencies": { "@types/lodash-es": "^4.17.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8c71629e6..93f192394 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -86,7 +86,7 @@ importers: dependencies: '@ai-sdk/openai': specifier: ^0.0.33 - version: 0.0.33(zod@3.22.4) + version: 0.0.33(zod@3.24.3) '@mantine/core': specifier: ^7.11.0 version: 7.11.0(@mantine/hooks@7.11.0)(@types/react@18.0.28)(react-dom@18.2.0)(react@18.2.0) @@ -119,7 +119,7 @@ importers: version: 10.44.1 ai: specifier: ^3.2.8 - version: 3.2.8(react@18.2.0)(solid-js@1.9.5)(svelte@5.28.2)(vue@3.5.13)(zod@3.22.4) + version: 3.2.8(react@18.2.0)(solid-js@1.9.5)(svelte@5.28.2)(vue@3.5.13)(zod@3.24.3) clsx: specifier: ^2.1.1 version: 2.1.1 @@ -172,8 +172,8 @@ importers: specifier: ^2.9.1 version: 2.9.1(react-dom@18.2.0)(react@18.2.0) zod: - specifier: ^3.21.4 - version: 3.22.4 + specifier: ^3.24.3 + version: 3.24.3 devDependencies: '@gfe/eslint-config-gfe-apps': specifier: workspace:0.0.0 @@ -275,8 +275,8 @@ importers: specifier: workspace:^ version: link:../../packages/remark-alerts '@hookform/resolvers': - specifier: ^3.3.2 - version: 3.3.2(react-hook-form@7.48.2) + specifier: ^5.0.1 + version: 5.0.1(react-hook-form@7.56.1) '@lexical/code': specifier: ^0.30.0 version: 0.30.0 @@ -536,8 +536,8 @@ importers: specifier: ^14.3.8 version: 14.3.8(react@18.2.0) react-hook-form: - specifier: ^7.47.0 - version: 7.48.2(react@18.2.0) + specifier: ^7.56.1 + version: 7.56.1(react@18.2.0) react-icons: specifier: 5.4.0 version: 5.4.0(react@18.2.0) @@ -599,8 +599,8 @@ importers: specifier: ^11.1.0 version: 11.1.0 zod: - specifier: ^3.21.4 - version: 3.22.4 + specifier: ^3.24.3 + version: 3.24.3 devDependencies: '@formatjs/cli': specifier: ^6.6.4 @@ -817,19 +817,19 @@ importers: dependencies: '@ai-sdk/deepseek': specifier: ^0.2.1 - version: 0.2.1(zod@3.24.2) + version: 0.2.1(zod@3.24.3) '@ai-sdk/google': specifier: ^1.2.3 - version: 1.2.3(zod@3.24.2) + version: 1.2.3(zod@3.24.3) '@ai-sdk/openai': specifier: ^1.3.2 - version: 1.3.2(zod@3.24.2) + version: 1.3.2(zod@3.24.3) '@clack/prompts': specifier: ^0.9.1 version: 0.9.1 ai: specifier: ^4.2.5 - version: 4.2.5(react@18.2.0)(zod@3.24.2) + version: 4.2.5(react@18.2.0)(zod@3.24.3) chalk: specifier: ^5.2.0 version: 5.3.0 @@ -873,8 +873,8 @@ importers: specifier: ^17.7.2 version: 17.7.2 zod: - specifier: ^3.21.4 - version: 3.24.2 + specifier: ^3.24.3 + version: 3.24.3 devDependencies: '@types/lodash-es': specifier: ^4.17.6 @@ -934,63 +934,63 @@ packages: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} - /@ai-sdk/deepseek@0.2.1(zod@3.24.2): + /@ai-sdk/deepseek@0.2.1(zod@3.24.3): resolution: {integrity: sha512-ZgLygIYtvzO+vP2SclKye1XQPdggqyyK3f9E9jjh1Q+Z9uDXJg9WQf8WC5UGHw/ZiN2SH8Gnh+dBDhAdAwGuKg==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 dependencies: - '@ai-sdk/openai-compatible': 0.2.1(zod@3.24.2) + '@ai-sdk/openai-compatible': 0.2.1(zod@3.24.3) '@ai-sdk/provider': 1.1.0 - '@ai-sdk/provider-utils': 2.2.1(zod@3.24.2) - zod: 3.24.2 + '@ai-sdk/provider-utils': 2.2.1(zod@3.24.3) + zod: 3.24.3 dev: false - /@ai-sdk/google@1.2.3(zod@3.24.2): + /@ai-sdk/google@1.2.3(zod@3.24.3): resolution: {integrity: sha512-zsgwko7T+MFIdEfhg4fIXv6O2dnzTLFr6BOpAA21eo/moOBA5szVzOto1jTwIwoBYsF2ixPGNZBoc+k/fQ2AWw==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 dependencies: '@ai-sdk/provider': 1.1.0 - '@ai-sdk/provider-utils': 2.2.1(zod@3.24.2) - zod: 3.24.2 + '@ai-sdk/provider-utils': 2.2.1(zod@3.24.3) + zod: 3.24.3 dev: false - /@ai-sdk/openai-compatible@0.2.1(zod@3.24.2): + /@ai-sdk/openai-compatible@0.2.1(zod@3.24.3): resolution: {integrity: sha512-7vQePiL/+BcbWf3qq5p+Ym+VH3DLY7cuwHucRtcuYSALrxtltKvVBlPr3vU3R9WdxcLyNwykW7UkVE2UpNp5JQ==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 dependencies: '@ai-sdk/provider': 1.1.0 - '@ai-sdk/provider-utils': 2.2.1(zod@3.24.2) - zod: 3.24.2 + '@ai-sdk/provider-utils': 2.2.1(zod@3.24.3) + zod: 3.24.3 dev: false - /@ai-sdk/openai@0.0.33(zod@3.22.4): + /@ai-sdk/openai@0.0.33(zod@3.24.3): resolution: {integrity: sha512-siVeHnagh08UFgdwflPdUKTdrVvfU/JWqSa8nCsMy6DvSri8T7zTzPZoCxXiMKPXkhQDd/KsaXhweOShGLQ1uQ==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 dependencies: '@ai-sdk/provider': 0.0.10 - '@ai-sdk/provider-utils': 0.0.16(zod@3.22.4) - zod: 3.22.4 + '@ai-sdk/provider-utils': 0.0.16(zod@3.24.3) + zod: 3.24.3 dev: false - /@ai-sdk/openai@1.3.2(zod@3.24.2): + /@ai-sdk/openai@1.3.2(zod@3.24.3): resolution: {integrity: sha512-TgtD2NbDKiOipaLb5/eY6fN64Gu32V/sZ0VM5UndsWAGKkB1if3jSLic6TcQjNvnBuhkzZY6L9deVDe4z+2PBg==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 dependencies: '@ai-sdk/provider': 1.1.0 - '@ai-sdk/provider-utils': 2.2.1(zod@3.24.2) - zod: 3.24.2 + '@ai-sdk/provider-utils': 2.2.1(zod@3.24.3) + zod: 3.24.3 dev: false - /@ai-sdk/provider-utils@0.0.16(zod@3.22.4): + /@ai-sdk/provider-utils@0.0.16(zod@3.24.3): resolution: {integrity: sha512-W2zUZ+C5uDr2P9/KZwtV4r4F0l2RlD0AvtJyug7ER5g3hGHAfKrPM0y2hSlRxNfph5BTCC6YQX0nFLyBph+6bQ==} engines: {node: '>=18'} peerDependencies: @@ -1003,10 +1003,10 @@ packages: eventsource-parser: 1.1.2 nanoid: 3.3.6 secure-json-parse: 2.7.0 - zod: 3.22.4 + zod: 3.24.3 dev: false - /@ai-sdk/provider-utils@2.2.1(zod@3.24.2): + /@ai-sdk/provider-utils@2.2.1(zod@3.24.3): resolution: {integrity: sha512-BuExLp+NcpwsAVj1F4bgJuQkSqO/+roV9wM7RdIO+NVrcT8RBUTdXzf5arHt5T58VpK7bZyB2V9qigjaPHE+Dg==} engines: {node: '>=18'} peerDependencies: @@ -1015,7 +1015,7 @@ packages: '@ai-sdk/provider': 1.1.0 nanoid: 3.3.11 secure-json-parse: 2.7.0 - zod: 3.24.2 + zod: 3.24.3 dev: false /@ai-sdk/provider@0.0.10: @@ -1032,7 +1032,7 @@ packages: json-schema: 0.4.0 dev: false - /@ai-sdk/react@0.0.8(react@18.2.0)(zod@3.22.4): + /@ai-sdk/react@0.0.8(react@18.2.0)(zod@3.24.3): resolution: {integrity: sha512-YASx575akiHuH8izwojwpA4NH7PqsezmRnz/Kmc/4dS4JN38uu4domd8y4fzOT/oO1nfdJ5xB+8aRa4NaQdu2Q==} engines: {node: '>=18'} peerDependencies: @@ -1044,14 +1044,14 @@ packages: zod: optional: true dependencies: - '@ai-sdk/provider-utils': 0.0.16(zod@3.22.4) - '@ai-sdk/ui-utils': 0.0.6(zod@3.22.4) + '@ai-sdk/provider-utils': 0.0.16(zod@3.24.3) + '@ai-sdk/ui-utils': 0.0.6(zod@3.24.3) react: 18.2.0 swr: 2.2.0(react@18.2.0) - zod: 3.22.4 + zod: 3.24.3 dev: false - /@ai-sdk/react@1.2.2(react@18.2.0)(zod@3.24.2): + /@ai-sdk/react@1.2.2(react@18.2.0)(zod@3.24.3): resolution: {integrity: sha512-rxyNTFjUd3IilVOJFuUJV5ytZBYAIyRi50kFS2gNmSEiG4NHMBBm31ddrxI/i86VpY8gzZVp1/igtljnWBihUA==} engines: {node: '>=18'} peerDependencies: @@ -1061,15 +1061,15 @@ packages: zod: optional: true dependencies: - '@ai-sdk/provider-utils': 2.2.1(zod@3.24.2) - '@ai-sdk/ui-utils': 1.2.1(zod@3.24.2) + '@ai-sdk/provider-utils': 2.2.1(zod@3.24.3) + '@ai-sdk/ui-utils': 1.2.1(zod@3.24.3) react: 18.2.0 swr: 2.3.3(react@18.2.0) throttleit: 2.1.0 - zod: 3.24.2 + zod: 3.24.3 dev: false - /@ai-sdk/solid@0.0.7(solid-js@1.9.5)(zod@3.22.4): + /@ai-sdk/solid@0.0.7(solid-js@1.9.5)(zod@3.24.3): resolution: {integrity: sha512-3aN5JWbgRMeyZiXgSVwTL6TjNrTIvESl05Hm2+eAFEDMcnSzgYKnCUbKgBNm4eZgKvrY7XDRMdJ37uXzRxdF7Q==} engines: {node: '>=18'} peerDependencies: @@ -1078,7 +1078,7 @@ packages: solid-js: optional: true dependencies: - '@ai-sdk/ui-utils': 0.0.6(zod@3.22.4) + '@ai-sdk/ui-utils': 0.0.6(zod@3.24.3) solid-js: 1.9.5 solid-swr-store: 0.10.7(solid-js@1.9.5)(swr-store@0.10.6) swr-store: 0.10.6 @@ -1086,7 +1086,7 @@ packages: - zod dev: false - /@ai-sdk/svelte@0.0.7(svelte@5.28.2)(zod@3.22.4): + /@ai-sdk/svelte@0.0.7(svelte@5.28.2)(zod@3.24.3): resolution: {integrity: sha512-0hsBnnvvn13mhFL/AUDtHWJk1Mp2WCcZE/GNmQ6gYLVDZIm0skqwE8kiSiSrh9fRtDocX3ehiGxtTIr+vhFbYw==} engines: {node: '>=18'} peerDependencies: @@ -1095,15 +1095,15 @@ packages: svelte: optional: true dependencies: - '@ai-sdk/provider-utils': 0.0.16(zod@3.22.4) - '@ai-sdk/ui-utils': 0.0.6(zod@3.22.4) + '@ai-sdk/provider-utils': 0.0.16(zod@3.24.3) + '@ai-sdk/ui-utils': 0.0.6(zod@3.24.3) sswr: 2.1.0(svelte@5.28.2) svelte: 5.28.2 transitivePeerDependencies: - zod dev: false - /@ai-sdk/ui-utils@0.0.6(zod@3.22.4): + /@ai-sdk/ui-utils@0.0.6(zod@3.24.3): resolution: {integrity: sha512-CpenkIWaA3nkY/cUJ0/paC/mT9hD7znCc91ZbDK1jH/MwLobLl1IPAACbjxYhnTo72od7S9/dGrpiI+RqWIwXg==} engines: {node: '>=18'} peerDependencies: @@ -1112,24 +1112,24 @@ packages: zod: optional: true dependencies: - '@ai-sdk/provider-utils': 0.0.16(zod@3.22.4) + '@ai-sdk/provider-utils': 0.0.16(zod@3.24.3) secure-json-parse: 2.7.0 - zod: 3.22.4 + zod: 3.24.3 dev: false - /@ai-sdk/ui-utils@1.2.1(zod@3.24.2): + /@ai-sdk/ui-utils@1.2.1(zod@3.24.3): resolution: {integrity: sha512-BzvMbYm7LHBlbWuLlcG1jQh4eu14MGpz7L+wrGO1+F4oQ+O0fAjgUSNwPWGlZpKmg4NrcVq/QLmxiVJrx2R4Ew==} engines: {node: '>=18'} peerDependencies: zod: ^3.23.8 dependencies: '@ai-sdk/provider': 1.1.0 - '@ai-sdk/provider-utils': 2.2.1(zod@3.24.2) - zod: 3.24.2 - zod-to-json-schema: 3.24.4(zod@3.24.2) + '@ai-sdk/provider-utils': 2.2.1(zod@3.24.3) + zod: 3.24.3 + zod-to-json-schema: 3.24.4(zod@3.24.3) dev: false - /@ai-sdk/vue@0.0.7(vue@3.5.13)(zod@3.22.4): + /@ai-sdk/vue@0.0.7(vue@3.5.13)(zod@3.24.3): resolution: {integrity: sha512-bGDkYHdSDrIxS1EhjzLrzQecnDvLRr6ksx7yPg+V28J4+PzU5gH23M3Z2g71KIhX5B80Jrv8CsOFYDAKm3at5Q==} engines: {node: '>=18'} peerDependencies: @@ -1138,7 +1138,7 @@ packages: vue: optional: true dependencies: - '@ai-sdk/ui-utils': 0.0.6(zod@3.22.4) + '@ai-sdk/ui-utils': 0.0.6(zod@3.24.3) swrv: 1.0.4(vue@3.5.13) vue: 3.5.13(typescript@5.3.3) transitivePeerDependencies: @@ -2562,7 +2562,7 @@ packages: ts-pattern: 4.3.0 unified: 10.1.2 yaml: 2.3.4 - zod: 3.24.2 + zod: 3.24.3 transitivePeerDependencies: - '@effect-ts/otel-node' - esbuild @@ -4439,12 +4439,13 @@ packages: yargs: 17.7.2 dev: false - /@hookform/resolvers@3.3.2(react-hook-form@7.48.2): - resolution: {integrity: sha512-Tw+GGPnBp+5DOsSg4ek3LCPgkBOuOgS5DsDV7qsWNH9LZc433kgsWICjlsh2J9p04H2K66hsXPPb9qn9ILdUtA==} + /@hookform/resolvers@5.0.1(react-hook-form@7.56.1): + resolution: {integrity: sha512-u/+Jp83luQNx9AdyW2fIPGY6Y7NG68eN2ZW8FOJYL+M0i4s49+refdJdOp/A9n9HFQtQs3HIDHQvX3ZET2o7YA==} peerDependencies: - react-hook-form: ^7.0.0 + react-hook-form: ^7.55.0 dependencies: - react-hook-form: 7.48.2(react@18.2.0) + '@standard-schema/utils': 0.3.0 + react-hook-form: 7.56.1(react@18.2.0) dev: false /@humanwhocodes/config-array@0.11.13: @@ -7678,6 +7679,10 @@ packages: - debug dev: false + /@standard-schema/utils@0.3.0: + resolution: {integrity: sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==} + dev: false + /@stefanprobst/remark-extract-toc@2.2.0: resolution: {integrity: sha512-97GOYQNyKBlOfF/tL1iDZk4pZzWmFibjhRJNXGvX8ZZVmv9759brYX4Z/iHtpHy57hZvMkpIl/HLc+7kPrd//g==} engines: {node: '>=14.17'} @@ -9109,7 +9114,7 @@ packages: engines: {node: '>= 14'} dev: false - /ai@3.2.8(react@18.2.0)(solid-js@1.9.5)(svelte@5.28.2)(vue@3.5.13)(zod@3.22.4): + /ai@3.2.8(react@18.2.0)(solid-js@1.9.5)(svelte@5.28.2)(vue@3.5.13)(zod@3.24.3): resolution: {integrity: sha512-lcWABN/pQ3crTKr9UvteKuWwTtvhZCGtP/lwo02cRyfCMuGaOxK/E/VXklo8WabuVLk9l1CRXCWdQcw6peg11g==} engines: {node: '>=18'} peerDependencies: @@ -9128,12 +9133,12 @@ packages: optional: true dependencies: '@ai-sdk/provider': 0.0.10 - '@ai-sdk/provider-utils': 0.0.16(zod@3.22.4) - '@ai-sdk/react': 0.0.8(react@18.2.0)(zod@3.22.4) - '@ai-sdk/solid': 0.0.7(solid-js@1.9.5)(zod@3.22.4) - '@ai-sdk/svelte': 0.0.7(svelte@5.28.2)(zod@3.22.4) - '@ai-sdk/ui-utils': 0.0.6(zod@3.22.4) - '@ai-sdk/vue': 0.0.7(vue@3.5.13)(zod@3.22.4) + '@ai-sdk/provider-utils': 0.0.16(zod@3.24.3) + '@ai-sdk/react': 0.0.8(react@18.2.0)(zod@3.24.3) + '@ai-sdk/solid': 0.0.7(solid-js@1.9.5)(zod@3.24.3) + '@ai-sdk/svelte': 0.0.7(svelte@5.28.2)(zod@3.24.3) + '@ai-sdk/ui-utils': 0.0.6(zod@3.24.3) + '@ai-sdk/vue': 0.0.7(vue@3.5.13)(zod@3.24.3) eventsource-parser: 1.1.2 json-schema: 0.4.0 jsondiffpatch: 0.6.0 @@ -9142,14 +9147,14 @@ packages: secure-json-parse: 2.7.0 sswr: 2.1.0(svelte@5.28.2) svelte: 5.28.2 - zod: 3.22.4 - zod-to-json-schema: 3.22.5(zod@3.22.4) + zod: 3.24.3 + zod-to-json-schema: 3.22.5(zod@3.24.3) transitivePeerDependencies: - solid-js - vue dev: false - /ai@4.2.5(react@18.2.0)(zod@3.24.2): + /ai@4.2.5(react@18.2.0)(zod@3.24.3): resolution: {integrity: sha512-URJEslI3cgF/atdTJHtz+Sj0W1JTmiGmD3znw9KensL3qV605odktDim+GTazNJFPR4QaIu1lUio5b8RymvOjA==} engines: {node: '>=18'} peerDependencies: @@ -9160,13 +9165,13 @@ packages: optional: true dependencies: '@ai-sdk/provider': 1.1.0 - '@ai-sdk/provider-utils': 2.2.1(zod@3.24.2) - '@ai-sdk/react': 1.2.2(react@18.2.0)(zod@3.24.2) - '@ai-sdk/ui-utils': 1.2.1(zod@3.24.2) + '@ai-sdk/provider-utils': 2.2.1(zod@3.24.3) + '@ai-sdk/react': 1.2.2(react@18.2.0)(zod@3.24.3) + '@ai-sdk/ui-utils': 1.2.1(zod@3.24.3) '@opentelemetry/api': 1.9.0 jsondiffpatch: 0.6.0 react: 18.2.0 - zod: 3.24.2 + zod: 3.24.3 dev: false /ajv-formats@2.1.1(ajv@8.17.1): @@ -9939,7 +9944,7 @@ packages: dependencies: devtools-protocol: 0.0.1425554 mitt: 3.0.1 - zod: 3.24.2 + zod: 3.24.3 dev: false /ci-info@3.9.0: @@ -16973,11 +16978,11 @@ packages: react: 18.2.0 dev: false - /react-hook-form@7.48.2(react@18.2.0): - resolution: {integrity: sha512-H0T2InFQb1hX7qKtDIZmvpU1Xfn/bdahWBN1fH19gSe4bBEqTfmlr7H3XWTaVtiK4/tpPaI1F3355GPMZYge+A==} - engines: {node: '>=12.22.0'} + /react-hook-form@7.56.1(react@18.2.0): + resolution: {integrity: sha512-qWAVokhSpshhcEuQDSANHx3jiAEFzu2HAaaQIzi/r9FNPm1ioAvuJSD4EuZzWd7Al7nTRKcKPnBKO7sRn+zavQ==} + engines: {node: '>=18.0.0'} peerDependencies: - react: ^16.8.0 || ^17 || ^18 + react: ^16.8.0 || ^17 || ^18 || ^19 dependencies: react: 18.2.0 dev: false @@ -20432,28 +20437,24 @@ packages: /zimmerframe@1.1.2: resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} - /zod-to-json-schema@3.22.5(zod@3.22.4): + /zod-to-json-schema@3.22.5(zod@3.24.3): resolution: {integrity: sha512-+akaPo6a0zpVCCseDed504KBJUQpEW5QZw7RMneNmKw+fGaML1Z9tUNLnHHAC8x6dzVRO1eB2oEMyZRnuBZg7Q==} peerDependencies: zod: ^3.22.4 dependencies: - zod: 3.22.4 + zod: 3.24.3 dev: false - /zod-to-json-schema@3.24.4(zod@3.24.2): + /zod-to-json-schema@3.24.4(zod@3.24.3): resolution: {integrity: sha512-0uNlcvgabyrni9Ag8Vghj21drk7+7tp7VTwwR7KxxXXc/3pbXz2PHlDgj3cICahgF1kHm4dExBFj7BXrZJXzig==} peerDependencies: zod: ^3.24.1 dependencies: - zod: 3.24.2 + zod: 3.24.3 dev: false - /zod@3.22.4: - resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} - dev: false - - /zod@3.24.2: - resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==} + /zod@3.24.3: + resolution: {integrity: sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==} dev: false /zwitch@2.0.4: