From 658421d899b686edced7810217280f5c46343c0e Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Mon, 29 Dec 2025 20:04:40 +0200 Subject: [PATCH] Upgrade zod package to 4 (#2677) --- app/components/form/SendouForm.tsx | 2 +- app/features/admin/actions/admin.server.ts | 2 +- app/features/admin/admin-schemas.ts | 2 +- app/features/api-private/routes/seed.ts | 2 +- .../api-public/routes/calendar.$year.$week.ts | 2 +- app/features/api-public/routes/org.$id.ts | 2 +- .../routes/sendouq.active-match.$userId.ts | 2 +- .../routes/sendouq.match.$matchId.ts | 2 +- app/features/api-public/routes/team.$id.ts | 2 +- .../api-public/routes/tournament-match.$id.ts | 2 +- .../tournament.$id.brackets.$bidx.standings.ts | 2 +- .../routes/tournament.$id.brackets.$bidx.ts | 2 +- .../api-public/routes/tournament.$id.casted.ts | 2 +- .../routes/tournament.$id.players.ts | 2 +- .../api-public/routes/tournament.$id.teams.ts | 2 +- .../api-public/routes/tournament.$id.ts | 2 +- .../api-public/routes/user.$identifier.ts | 2 +- app/features/api/actions/api.server.ts | 2 +- app/features/art/art-schemas.server.ts | 2 +- .../articles/articles-schemas.server.ts | 2 +- app/features/articles/core/bySlug.server.ts | 2 +- .../associations/associations-schemas.ts | 2 +- .../associations/routes/associations.new.tsx | 2 +- .../auth/core/DiscordStrategy.server.ts | 2 +- app/features/auth/core/routes.server.ts | 2 +- .../badges/actions/badges.$id.edit.server.ts | 2 +- app/features/badges/badges-schemas.server.ts | 2 +- app/features/builds/builds-schemas.server.ts | 2 +- .../calendar/actions/calendar.$id.server.ts | 2 +- .../calendar/calendar-schemas.server.ts | 2 +- app/features/calendar/calendar-schemas.ts | 2 +- app/features/calendar/calendar-types.ts | 2 +- .../front-page/core/Changelog.server.ts | 2 +- .../img-upload/actions/upload.server.ts | 2 +- .../img-upload/upload-schemas.server.ts | 2 +- app/features/lfg/actions/lfg.new.server.ts | 2 +- app/features/lfg/actions/lfg.server.ts | 2 +- app/features/lfg/loaders/lfg.new.server.ts | 2 +- .../notifications/notifications-schemas.ts | 2 +- .../plus-suggestions-schemas.ts | 2 +- .../plus-voting/plus-voting-schemas.ts | 2 +- .../scrims/actions/scrims.new.server.ts | 2 +- app/features/scrims/routes/scrims.$id.tsx | 2 +- app/features/scrims/routes/scrims.new.tsx | 2 +- app/features/scrims/routes/scrims.tsx | 2 +- app/features/scrims/scrims-schemas.ts | 2 +- app/features/sendouq-match/q-match-schemas.ts | 2 +- .../q-settings-schemas.server.ts | 2 +- app/features/sendouq/q-schemas.server.ts | 2 +- app/features/settings/settings-schemas.ts | 2 +- app/features/team/team-schemas.server.ts | 2 +- .../tier-list-maker/hooks/useTierList.ts | 2 +- .../tier-list-maker/tier-list-maker-schemas.ts | 2 +- .../tournament-bracket-schemas.server.ts | 2 +- .../components/BanUserModal.tsx | 2 +- .../loaders/org.$slug.server.ts | 2 +- .../routes/org.$slug.edit.tsx | 2 +- .../tournament-organization/routes/org.new.tsx | 2 +- .../tournament-organization-schemas.ts | 2 +- .../tournament-organization-utils.server.ts | 2 +- .../tournament-subs-schemas.server.ts | 2 +- .../tournament/tournament-schemas.server.ts | 2 +- .../actions/u.$identifier.builds.new.server.ts | 2 +- .../actions/u.$identifier.builds.server.ts | 2 +- .../loaders/u.$identifier.builds.new.server.ts | 2 +- .../user-page/routes/u.$identifier.admin.tsx | 2 +- app/features/user-page/user-page-schemas.ts | 2 +- app/features/user-search/loaders/u.server.ts | 2 +- app/features/vods/loaders/vods.new.server.ts | 2 +- app/features/vods/routes/vods.new.tsx | 2 +- app/features/vods/vods-schemas.ts | 2 +- app/features/vods/vods-types.ts | 2 +- app/modules/patreon/schema.ts | 2 +- app/modules/patreon/updater.ts | 2 +- app/modules/twitch/schemas.ts | 2 +- app/utils/Test.ts | 2 +- app/utils/remix.server.ts | 2 +- app/utils/zod.ts | 4 ++-- package-lock.json | 18 ++++-------------- package.json | 2 +- scripts/check-homemade-badges.ts | 2 +- scripts/create-analyzer-json.ts | 2 +- scripts/create-league-divisions.ts | 2 +- scripts/placements/schemas.ts | 2 +- 84 files changed, 88 insertions(+), 98 deletions(-) diff --git a/app/components/form/SendouForm.tsx b/app/components/form/SendouForm.tsx index 4d506589e..aede193fa 100644 --- a/app/components/form/SendouForm.tsx +++ b/app/components/form/SendouForm.tsx @@ -3,7 +3,7 @@ import * as React from "react"; import { type DefaultValues, FormProvider, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { useFetcher } from "react-router"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { logger } from "~/utils/logger"; import type { ActionError } from "~/utils/remix.server"; import { LinkButton } from "../elements/Button"; diff --git a/app/features/admin/actions/admin.server.ts b/app/features/admin/actions/admin.server.ts index bfd50c9b8..88560732e 100644 --- a/app/features/admin/actions/admin.server.ts +++ b/app/features/admin/actions/admin.server.ts @@ -1,5 +1,5 @@ import type { ActionFunctionArgs } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import * as AdminRepository from "~/features/admin/AdminRepository.server"; import { requireUser } from "~/features/auth/core/user.server"; import { refreshBannedCache } from "~/features/ban/core/banned.server"; diff --git a/app/features/admin/admin-schemas.ts b/app/features/admin/admin-schemas.ts index a3d67866d..42c5cccf8 100644 --- a/app/features/admin/admin-schemas.ts +++ b/app/features/admin/admin-schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { friendCode } from "~/utils/zod"; export const adminActionSearchParamsSchema = z.object({ diff --git a/app/features/api-private/routes/seed.ts b/app/features/api-private/routes/seed.ts index 04707f854..540b52529 100644 --- a/app/features/api-private/routes/seed.ts +++ b/app/features/api-private/routes/seed.ts @@ -1,5 +1,5 @@ import type { ActionFunction } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { seed } from "~/db/seed"; import { DANGEROUS_CAN_ACCESS_DEV_CONTROLS } from "~/features/admin/core/dev-controls"; import { SEED_VARIATIONS } from "~/features/api-private/constants"; diff --git a/app/features/api-public/routes/calendar.$year.$week.ts b/app/features/api-public/routes/calendar.$year.$week.ts index b7b58df97..6b33fd42e 100644 --- a/app/features/api-public/routes/calendar.$year.$week.ts +++ b/app/features/api-public/routes/calendar.$year.$week.ts @@ -1,6 +1,6 @@ import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import { db } from "~/db/sql"; import { databaseTimestampToDate, diff --git a/app/features/api-public/routes/org.$id.ts b/app/features/api-public/routes/org.$id.ts index d0f737d12..bbeb9ce25 100644 --- a/app/features/api-public/routes/org.$id.ts +++ b/app/features/api-public/routes/org.$id.ts @@ -1,7 +1,7 @@ import { jsonArrayFrom } from "kysely/helpers/sqlite"; import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import { db } from "~/db/sql"; import { concatUserSubmittedImagePrefix } from "~/utils/kysely.server"; import { notFoundIfFalsy, parseParams } from "~/utils/remix.server"; diff --git a/app/features/api-public/routes/sendouq.active-match.$userId.ts b/app/features/api-public/routes/sendouq.active-match.$userId.ts index 7ec8f3ce0..309554c6b 100644 --- a/app/features/api-public/routes/sendouq.active-match.$userId.ts +++ b/app/features/api-public/routes/sendouq.active-match.$userId.ts @@ -1,6 +1,6 @@ import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import { SendouQ } from "~/features/sendouq/core/SendouQ.server"; import { parseParams } from "~/utils/remix.server"; import { id } from "~/utils/zod"; diff --git a/app/features/api-public/routes/sendouq.match.$matchId.ts b/app/features/api-public/routes/sendouq.match.$matchId.ts index a02433784..a5a685af3 100644 --- a/app/features/api-public/routes/sendouq.match.$matchId.ts +++ b/app/features/api-public/routes/sendouq.match.$matchId.ts @@ -1,6 +1,6 @@ import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import * as SQMatchRepository from "~/features/sendouq-match/SQMatchRepository.server"; import { i18next } from "~/modules/i18n/i18next.server"; import { notFoundIfFalsy, parseParams } from "~/utils/remix.server"; diff --git a/app/features/api-public/routes/team.$id.ts b/app/features/api-public/routes/team.$id.ts index 709438a4b..74b057fea 100644 --- a/app/features/api-public/routes/team.$id.ts +++ b/app/features/api-public/routes/team.$id.ts @@ -1,6 +1,6 @@ import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import { db } from "~/db/sql"; import { concatUserSubmittedImagePrefix } from "~/utils/kysely.server"; import { notFoundIfFalsy, parseParams } from "~/utils/remix.server"; diff --git a/app/features/api-public/routes/tournament-match.$id.ts b/app/features/api-public/routes/tournament-match.$id.ts index 5dd90df04..5c147d008 100644 --- a/app/features/api-public/routes/tournament-match.$id.ts +++ b/app/features/api-public/routes/tournament-match.$id.ts @@ -1,7 +1,7 @@ import { jsonArrayFrom } from "kysely/helpers/sqlite"; import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import { db } from "~/db/sql"; import * as TournamentRepository from "~/features/tournament/TournamentRepository.server"; import * as TournamentTeamRepository from "~/features/tournament/TournamentTeamRepository.server"; diff --git a/app/features/api-public/routes/tournament.$id.brackets.$bidx.standings.ts b/app/features/api-public/routes/tournament.$id.brackets.$bidx.standings.ts index 3744154a0..9c533d63f 100644 --- a/app/features/api-public/routes/tournament.$id.brackets.$bidx.standings.ts +++ b/app/features/api-public/routes/tournament.$id.brackets.$bidx.standings.ts @@ -1,6 +1,6 @@ import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import { tournamentFromDB } from "~/features/tournament-bracket/core/Tournament.server"; import { notFoundIfFalsy, parseParams } from "~/utils/remix.server"; import { id } from "~/utils/zod"; diff --git a/app/features/api-public/routes/tournament.$id.brackets.$bidx.ts b/app/features/api-public/routes/tournament.$id.brackets.$bidx.ts index 9097cfc78..4151ca751 100644 --- a/app/features/api-public/routes/tournament.$id.brackets.$bidx.ts +++ b/app/features/api-public/routes/tournament.$id.brackets.$bidx.ts @@ -1,6 +1,6 @@ import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import type { Bracket } from "~/features/tournament-bracket/core/Bracket"; import { tournamentFromDB } from "~/features/tournament-bracket/core/Tournament.server"; import { notFoundIfFalsy, parseParams } from "~/utils/remix.server"; diff --git a/app/features/api-public/routes/tournament.$id.casted.ts b/app/features/api-public/routes/tournament.$id.casted.ts index f3ea95492..7a40750b1 100644 --- a/app/features/api-public/routes/tournament.$id.casted.ts +++ b/app/features/api-public/routes/tournament.$id.casted.ts @@ -1,6 +1,6 @@ import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import { db } from "~/db/sql"; import { notFoundIfFalsy, parseParams } from "~/utils/remix.server"; import { id } from "~/utils/zod"; diff --git a/app/features/api-public/routes/tournament.$id.players.ts b/app/features/api-public/routes/tournament.$id.players.ts index e86ac21ca..1222d23d7 100644 --- a/app/features/api-public/routes/tournament.$id.players.ts +++ b/app/features/api-public/routes/tournament.$id.players.ts @@ -1,6 +1,6 @@ import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import * as TournamentMatchRepository from "~/features/tournament-bracket/TournamentMatchRepository.server"; import { parseParams } from "~/utils/remix.server"; import { id } from "~/utils/zod"; diff --git a/app/features/api-public/routes/tournament.$id.teams.ts b/app/features/api-public/routes/tournament.$id.teams.ts index 3ec89a705..d5ad26684 100644 --- a/app/features/api-public/routes/tournament.$id.teams.ts +++ b/app/features/api-public/routes/tournament.$id.teams.ts @@ -1,7 +1,7 @@ import { jsonArrayFrom, jsonObjectFrom } from "kysely/helpers/sqlite"; import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import { db } from "~/db/sql"; import { ordinalToSp } from "~/features/mmr/mmr-utils"; import * as TournamentRepository from "~/features/tournament/TournamentRepository.server"; diff --git a/app/features/api-public/routes/tournament.$id.ts b/app/features/api-public/routes/tournament.$id.ts index 07a9b02cf..aeb97bf9d 100644 --- a/app/features/api-public/routes/tournament.$id.ts +++ b/app/features/api-public/routes/tournament.$id.ts @@ -1,7 +1,7 @@ import { jsonArrayFrom } from "kysely/helpers/sqlite"; import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import { db } from "~/db/sql"; import { databaseTimestampToDate } from "~/utils/dates"; import { notFoundIfFalsy, parseParams } from "~/utils/remix.server"; diff --git a/app/features/api-public/routes/user.$identifier.ts b/app/features/api-public/routes/user.$identifier.ts index 09642d416..256d5ea93 100644 --- a/app/features/api-public/routes/user.$identifier.ts +++ b/app/features/api-public/routes/user.$identifier.ts @@ -1,7 +1,7 @@ import { jsonArrayFrom } from "kysely/helpers/sqlite"; import type { LoaderFunctionArgs } from "react-router"; import { cors } from "remix-utils/cors"; -import { z } from "zod/v4"; +import { z } from "zod"; import { db } from "~/db/sql"; import * as Seasons from "~/features/mmr/core/Seasons"; import { userSkills as _userSkills } from "~/features/mmr/tiered.server"; diff --git a/app/features/api/actions/api.server.ts b/app/features/api/actions/api.server.ts index c6abcca3b..3f8d7fb05 100644 --- a/app/features/api/actions/api.server.ts +++ b/app/features/api/actions/api.server.ts @@ -1,5 +1,5 @@ import type { ActionFunctionArgs } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { refreshApiTokensCache } from "~/features/api-public/api-public-utils.server"; import { requireUser } from "~/features/auth/core/user.server"; import { parseRequestPayload, successToast } from "~/utils/remix.server"; diff --git a/app/features/art/art-schemas.server.ts b/app/features/art/art-schemas.server.ts index d53352cff..e8c92401b 100644 --- a/app/features/art/art-schemas.server.ts +++ b/app/features/art/art-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { _action, checkboxValueToDbBoolean, diff --git a/app/features/articles/articles-schemas.server.ts b/app/features/articles/articles-schemas.server.ts index a1c636bd5..7ae2847d0 100644 --- a/app/features/articles/articles-schemas.server.ts +++ b/app/features/articles/articles-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; const authorName = z.string().min(1); diff --git a/app/features/articles/core/bySlug.server.ts b/app/features/articles/core/bySlug.server.ts index 2c3ccb682..92029da0d 100644 --- a/app/features/articles/core/bySlug.server.ts +++ b/app/features/articles/core/bySlug.server.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import path from "node:path"; import matter from "gray-matter"; -import { ZodError, type z } from "zod/v4"; +import { ZodError, type z } from "zod"; import { ARTICLES_FOLDER_PATH } from "../articles-constants"; import { articleDataSchema } from "../articles-schemas.server"; diff --git a/app/features/associations/associations-schemas.ts b/app/features/associations/associations-schemas.ts index c80960f5a..5d5c2ae74 100644 --- a/app/features/associations/associations-schemas.ts +++ b/app/features/associations/associations-schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { _action, id, inviteCode, safeStringSchema } from "~/utils/zod"; import { ASSOCIATION } from "./associations-constants"; diff --git a/app/features/associations/routes/associations.new.tsx b/app/features/associations/routes/associations.new.tsx index 7ecfba6fb..ecfebf116 100644 --- a/app/features/associations/routes/associations.new.tsx +++ b/app/features/associations/routes/associations.new.tsx @@ -1,5 +1,5 @@ import { useTranslation } from "react-i18next"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { SendouDialog } from "~/components/elements/Dialog"; import { InputFormField } from "~/components/form/InputFormField"; import { SendouForm } from "~/components/form/SendouForm"; diff --git a/app/features/auth/core/DiscordStrategy.server.ts b/app/features/auth/core/DiscordStrategy.server.ts index a2841b7e2..fc511a6ab 100644 --- a/app/features/auth/core/DiscordStrategy.server.ts +++ b/app/features/auth/core/DiscordStrategy.server.ts @@ -1,5 +1,5 @@ import { OAuth2Strategy } from "remix-auth-oauth2"; -import { z } from "zod/v4"; +import { z } from "zod"; import * as UserRepository from "~/features/user-page/UserRepository.server"; import invariant from "~/utils/invariant"; import { logger } from "~/utils/logger"; diff --git a/app/features/auth/core/routes.server.ts b/app/features/auth/core/routes.server.ts index 0e478ecc5..d0ac8010c 100644 --- a/app/features/auth/core/routes.server.ts +++ b/app/features/auth/core/routes.server.ts @@ -1,7 +1,7 @@ import { isbot } from "isbot"; import type { ActionFunction, LoaderFunction } from "react-router"; import { redirect } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { DANGEROUS_CAN_ACCESS_DEV_CONTROLS } from "~/features/admin/core/dev-controls"; import * as UserRepository from "~/features/user-page/UserRepository.server"; import { requireRole } from "~/modules/permissions/guards.server"; diff --git a/app/features/badges/actions/badges.$id.edit.server.ts b/app/features/badges/actions/badges.$id.edit.server.ts index ebd5a15e9..7c8fbf9ab 100644 --- a/app/features/badges/actions/badges.$id.edit.server.ts +++ b/app/features/badges/actions/badges.$id.edit.server.ts @@ -1,6 +1,6 @@ import type { ActionFunction } from "react-router"; import { redirect } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { requireUser } from "~/features/auth/core/user.server"; import { notify } from "~/features/notifications/core/notify.server"; import { diff --git a/app/features/badges/badges-schemas.server.ts b/app/features/badges/badges-schemas.server.ts index d537c401a..848af75bf 100644 --- a/app/features/badges/badges-schemas.server.ts +++ b/app/features/badges/badges-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { _action, id, noDuplicates, safeJSONParse } from "~/utils/zod"; export const editBadgeActionSchema = z.union([ diff --git a/app/features/builds/builds-schemas.server.ts b/app/features/builds/builds-schemas.server.ts index 36d9e209b..784a32ca7 100644 --- a/app/features/builds/builds-schemas.server.ts +++ b/app/features/builds/builds-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { ability, modeShort, safeJSONParse } from "~/utils/zod"; import { MAX_BUILD_FILTERS } from "./builds-constants"; diff --git a/app/features/calendar/actions/calendar.$id.server.ts b/app/features/calendar/actions/calendar.$id.server.ts index c1f238add..c01d11f78 100644 --- a/app/features/calendar/actions/calendar.$id.server.ts +++ b/app/features/calendar/actions/calendar.$id.server.ts @@ -1,6 +1,6 @@ import type { ActionFunction } from "react-router"; import { redirect } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { requireUserId } from "~/features/auth/core/user.server"; import * as CalendarRepository from "~/features/calendar/CalendarRepository.server"; import * as ShowcaseTournaments from "~/features/front-page/core/ShowcaseTournaments.server"; diff --git a/app/features/calendar/calendar-schemas.server.ts b/app/features/calendar/calendar-schemas.server.ts index f6e71f0d2..a1810ad12 100644 --- a/app/features/calendar/calendar-schemas.server.ts +++ b/app/features/calendar/calendar-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import * as CalendarRepository from "~/features/calendar/CalendarRepository.server"; import { MapPool } from "~/features/map-list-generator/core/map-pool"; import { rankedModesShort } from "~/modules/in-game-lists/modes"; diff --git a/app/features/calendar/calendar-schemas.ts b/app/features/calendar/calendar-schemas.ts index 144a52e43..3966e3884 100644 --- a/app/features/calendar/calendar-schemas.ts +++ b/app/features/calendar/calendar-schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { type CalendarEventTag, TOURNAMENT_STAGE_TYPES } from "~/db/tables"; import { TOURNAMENT } from "~/features/tournament/tournament-constants"; import * as Progression from "~/features/tournament-bracket/core/Progression"; diff --git a/app/features/calendar/calendar-types.ts b/app/features/calendar/calendar-types.ts index 64bbed80a..226d7f284 100644 --- a/app/features/calendar/calendar-types.ts +++ b/app/features/calendar/calendar-types.ts @@ -1,4 +1,4 @@ -import type { z } from "zod/v4"; +import type { z } from "zod"; import type { CalendarEventTag, Tables } from "~/db/tables"; import type { calendarFiltersSearchParamsSchema } from "~/features/calendar/calendar-schemas"; import type { ModeShortWithSpecial } from "~/modules/in-game-lists/types"; diff --git a/app/features/front-page/core/Changelog.server.ts b/app/features/front-page/core/Changelog.server.ts index 20ab4a51e..0b11456c5 100644 --- a/app/features/front-page/core/Changelog.server.ts +++ b/app/features/front-page/core/Changelog.server.ts @@ -1,5 +1,5 @@ import { formatDistance } from "date-fns"; -import { z } from "zod/v4"; +import { z } from "zod"; import { logger } from "~/utils/logger"; const BSKY_URL = diff --git a/app/features/img-upload/actions/upload.server.ts b/app/features/img-upload/actions/upload.server.ts index 050a8ec9c..2ea170bb5 100644 --- a/app/features/img-upload/actions/upload.server.ts +++ b/app/features/img-upload/actions/upload.server.ts @@ -2,7 +2,7 @@ import type { FileUpload } from "@remix-run/form-data-parser"; import { parseFormData } from "@remix-run/form-data-parser"; import type { ActionFunctionArgs } from "react-router"; import { redirect } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { requireUser } from "~/features/auth/core/user.server"; import * as TeamRepository from "~/features/team/TeamRepository.server"; import { isTeamManager } from "~/features/team/team-utils"; diff --git a/app/features/img-upload/upload-schemas.server.ts b/app/features/img-upload/upload-schemas.server.ts index 8194e0713..83590e660 100644 --- a/app/features/img-upload/upload-schemas.server.ts +++ b/app/features/img-upload/upload-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { _action, id, safeJSONParse } from "~/utils/zod"; const validateManySchema = z.object({ diff --git a/app/features/lfg/actions/lfg.new.server.ts b/app/features/lfg/actions/lfg.new.server.ts index 33d2c9e9f..1d1fa6e22 100644 --- a/app/features/lfg/actions/lfg.new.server.ts +++ b/app/features/lfg/actions/lfg.new.server.ts @@ -1,6 +1,6 @@ import type { ActionFunctionArgs } from "react-router"; import { redirect } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { requireUser } from "~/features/auth/core/user.server"; import * as UserRepository from "~/features/user-page/UserRepository.server"; import { errorToastIfFalsy, parseRequestPayload } from "~/utils/remix.server"; diff --git a/app/features/lfg/actions/lfg.server.ts b/app/features/lfg/actions/lfg.server.ts index db459bc5d..f069ae5cf 100644 --- a/app/features/lfg/actions/lfg.server.ts +++ b/app/features/lfg/actions/lfg.server.ts @@ -1,5 +1,5 @@ import type { ActionFunctionArgs } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { requireUser } from "~/features/auth/core/user.server"; import { errorToastIfFalsy, parseRequestPayload } from "~/utils/remix.server"; import { _action, id } from "~/utils/zod"; diff --git a/app/features/lfg/loaders/lfg.new.server.ts b/app/features/lfg/loaders/lfg.new.server.ts index 7e2055d35..7e4767eb7 100644 --- a/app/features/lfg/loaders/lfg.new.server.ts +++ b/app/features/lfg/loaders/lfg.new.server.ts @@ -1,5 +1,5 @@ import type { LoaderFunctionArgs } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { requireUser } from "~/features/auth/core/user.server"; import * as QSettingsRepository from "~/features/sendouq-settings/QSettingsRepository.server"; import * as UserRepository from "~/features/user-page/UserRepository.server"; diff --git a/app/features/notifications/notifications-schemas.ts b/app/features/notifications/notifications-schemas.ts index 08f98fc42..f15c7670c 100644 --- a/app/features/notifications/notifications-schemas.ts +++ b/app/features/notifications/notifications-schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { id } from "~/utils/zod"; import { NOTIFICATIONS } from "./notifications-contants"; diff --git a/app/features/plus-suggestions/plus-suggestions-schemas.ts b/app/features/plus-suggestions/plus-suggestions-schemas.ts index 33878c16d..1095801ca 100644 --- a/app/features/plus-suggestions/plus-suggestions-schemas.ts +++ b/app/features/plus-suggestions/plus-suggestions-schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { _action, actualNumber, trimmedString } from "~/utils/zod"; import { PLUS_SUGGESTION, PLUS_TIERS } from "./plus-suggestions-constants"; diff --git a/app/features/plus-voting/plus-voting-schemas.ts b/app/features/plus-voting/plus-voting-schemas.ts index 7fc358452..a6386561b 100644 --- a/app/features/plus-voting/plus-voting-schemas.ts +++ b/app/features/plus-voting/plus-voting-schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import type { PlusVoteFromFE } from "~/features/plus-voting/core"; import { assertType } from "~/utils/types"; import { safeJSONParse } from "~/utils/zod"; diff --git a/app/features/scrims/actions/scrims.new.server.ts b/app/features/scrims/actions/scrims.new.server.ts index d9236fbe0..bc83188fb 100644 --- a/app/features/scrims/actions/scrims.new.server.ts +++ b/app/features/scrims/actions/scrims.new.server.ts @@ -1,6 +1,6 @@ import { add } from "date-fns"; import { type ActionFunctionArgs, redirect } from "react-router"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import type { Tables } from "~/db/tables"; import { requireUser } from "~/features/auth/core/user.server"; import { userIsBanned } from "~/features/ban/core/banned.server"; diff --git a/app/features/scrims/routes/scrims.$id.tsx b/app/features/scrims/routes/scrims.$id.tsx index 23b7faecf..25f3c8467 100644 --- a/app/features/scrims/routes/scrims.$id.tsx +++ b/app/features/scrims/routes/scrims.$id.tsx @@ -2,7 +2,7 @@ import clsx from "clsx"; import * as React from "react"; import { useTranslation } from "react-i18next"; import { Link, useLoaderData } from "react-router"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { Alert } from "~/components/Alert"; import { SendouButton } from "~/components/elements/Button"; import { SendouDialog } from "~/components/elements/Dialog"; diff --git a/app/features/scrims/routes/scrims.new.tsx b/app/features/scrims/routes/scrims.new.tsx index 50153ef07..862f64a90 100644 --- a/app/features/scrims/routes/scrims.new.tsx +++ b/app/features/scrims/routes/scrims.new.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { Controller, useFormContext, useWatch } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { useLoaderData } from "react-router"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { TournamentSearch } from "~/components/elements/TournamentSearch"; import { DateFormField } from "~/components/form/DateFormField"; import { SelectFormField } from "~/components/form/SelectFormField"; diff --git a/app/features/scrims/routes/scrims.tsx b/app/features/scrims/routes/scrims.tsx index fbb399a48..0fc83e06c 100644 --- a/app/features/scrims/routes/scrims.tsx +++ b/app/features/scrims/routes/scrims.tsx @@ -4,7 +4,7 @@ import { useTranslation } from "react-i18next"; import type { MetaFunction } from "react-router"; import { useLoaderData } from "react-router"; import * as R from "remeda"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { AddNewButton } from "~/components/AddNewButton"; import { LinkButton, SendouButton } from "~/components/elements/Button"; import { useUser } from "~/features/auth/core/user"; diff --git a/app/features/scrims/scrims-schemas.ts b/app/features/scrims/scrims-schemas.ts index 1596a81ec..12c9024fd 100644 --- a/app/features/scrims/scrims-schemas.ts +++ b/app/features/scrims/scrims-schemas.ts @@ -1,5 +1,5 @@ import { add, sub } from "date-fns"; -import { z } from "zod/v4"; +import { z } from "zod"; import { _action, date, diff --git a/app/features/sendouq-match/q-match-schemas.ts b/app/features/sendouq-match/q-match-schemas.ts index 516a55a40..b6f830f40 100644 --- a/app/features/sendouq-match/q-match-schemas.ts +++ b/app/features/sendouq-match/q-match-schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { SENDOUQ, SENDOUQ_BEST_OF } from "~/features/sendouq/q-constants"; import { _action, diff --git a/app/features/sendouq-settings/q-settings-schemas.server.ts b/app/features/sendouq-settings/q-settings-schemas.server.ts index 7c316e3c4..f6718f1e5 100644 --- a/app/features/sendouq-settings/q-settings-schemas.server.ts +++ b/app/features/sendouq-settings/q-settings-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { languagesUnified } from "~/modules/i18n/config"; import { _action, diff --git a/app/features/sendouq/q-schemas.server.ts b/app/features/sendouq/q-schemas.server.ts index 15581e9bd..62f6915e0 100644 --- a/app/features/sendouq/q-schemas.server.ts +++ b/app/features/sendouq/q-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { _action, deduplicate, diff --git a/app/features/settings/settings-schemas.ts b/app/features/settings/settings-schemas.ts index b72102877..41d9e5dea 100644 --- a/app/features/settings/settings-schemas.ts +++ b/app/features/settings/settings-schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { _action } from "~/utils/zod"; export const settingsEditSchema = z.union([ diff --git a/app/features/team/team-schemas.server.ts b/app/features/team/team-schemas.server.ts index 1bba54aa5..f98d6e0c7 100644 --- a/app/features/team/team-schemas.server.ts +++ b/app/features/team/team-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { _action, customCssVarObject, diff --git a/app/features/tier-list-maker/hooks/useTierList.ts b/app/features/tier-list-maker/hooks/useTierList.ts index 1c86cc585..a4ccc2379 100644 --- a/app/features/tier-list-maker/hooks/useTierList.ts +++ b/app/features/tier-list-maker/hooks/useTierList.ts @@ -7,7 +7,7 @@ import { arrayMove } from "@dnd-kit/sortable"; import JSONCrush from "jsoncrush"; import * as React from "react"; import { useSearchParams } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { useSearchParamState, useSearchParamStateEncoder, diff --git a/app/features/tier-list-maker/tier-list-maker-schemas.ts b/app/features/tier-list-maker/tier-list-maker-schemas.ts index 4176b06c9..19f89e011 100644 --- a/app/features/tier-list-maker/tier-list-maker-schemas.ts +++ b/app/features/tier-list-maker/tier-list-maker-schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { assertType } from "~/utils/types"; import { hexCode, diff --git a/app/features/tournament-bracket/tournament-bracket-schemas.server.ts b/app/features/tournament-bracket/tournament-bracket-schemas.server.ts index f7ebf786a..01dac677e 100644 --- a/app/features/tournament-bracket/tournament-bracket-schemas.server.ts +++ b/app/features/tournament-bracket/tournament-bracket-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { _action, checkboxValueToBoolean, diff --git a/app/features/tournament-organization/components/BanUserModal.tsx b/app/features/tournament-organization/components/BanUserModal.tsx index edd664d48..ea77a89ad 100644 --- a/app/features/tournament-organization/components/BanUserModal.tsx +++ b/app/features/tournament-organization/components/BanUserModal.tsx @@ -1,5 +1,5 @@ import { useTranslation } from "react-i18next"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { SendouButton } from "~/components/elements/Button"; import { SendouDialog } from "~/components/elements/Dialog"; import { DateFormField } from "~/components/form/DateFormField"; diff --git a/app/features/tournament-organization/loaders/org.$slug.server.ts b/app/features/tournament-organization/loaders/org.$slug.server.ts index 88498c601..e5bcbc397 100644 --- a/app/features/tournament-organization/loaders/org.$slug.server.ts +++ b/app/features/tournament-organization/loaders/org.$slug.server.ts @@ -1,5 +1,5 @@ import type { LoaderFunctionArgs } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { getUser } from "~/features/auth/core/user.server"; import type { SerializeFrom } from "~/utils/remix"; import { parseSafeSearchParams } from "~/utils/remix.server"; diff --git a/app/features/tournament-organization/routes/org.$slug.edit.tsx b/app/features/tournament-organization/routes/org.$slug.edit.tsx index d801df9d8..821a567bc 100644 --- a/app/features/tournament-organization/routes/org.$slug.edit.tsx +++ b/app/features/tournament-organization/routes/org.$slug.edit.tsx @@ -1,7 +1,7 @@ import { Controller, useFieldArray, useFormContext } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { Link, useLoaderData } from "react-router"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { FormMessage } from "~/components/FormMessage"; import { AddFieldButton } from "~/components/form/AddFieldButton"; import { FormFieldset } from "~/components/form/FormFieldset"; diff --git a/app/features/tournament-organization/routes/org.new.tsx b/app/features/tournament-organization/routes/org.new.tsx index f30a65f55..01fa9f244 100644 --- a/app/features/tournament-organization/routes/org.new.tsx +++ b/app/features/tournament-organization/routes/org.new.tsx @@ -1,5 +1,5 @@ import { useTranslation } from "react-i18next"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { Alert } from "~/components/Alert"; import { InputFormField } from "~/components/form/InputFormField"; import { SendouForm } from "~/components/form/SendouForm"; diff --git a/app/features/tournament-organization/tournament-organization-schemas.ts b/app/features/tournament-organization/tournament-organization-schemas.ts index 34c0f296b..8045b1f95 100644 --- a/app/features/tournament-organization/tournament-organization-schemas.ts +++ b/app/features/tournament-organization/tournament-organization-schemas.ts @@ -1,5 +1,5 @@ import { isFuture } from "date-fns"; -import { z } from "zod/v4"; +import { z } from "zod"; import { TOURNAMENT_ORGANIZATION_ROLES } from "~/db/tables"; import { TOURNAMENT_ORGANIZATION } from "~/features/tournament-organization/tournament-organization-constants"; import { dayMonthYearToDate } from "~/utils/dates"; diff --git a/app/features/tournament-organization/tournament-organization-utils.server.ts b/app/features/tournament-organization/tournament-organization-utils.server.ts index c80a19e38..7d109e69c 100644 --- a/app/features/tournament-organization/tournament-organization-utils.server.ts +++ b/app/features/tournament-organization/tournament-organization-utils.server.ts @@ -1,5 +1,5 @@ import type { LoaderFunctionArgs } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { notFoundIfFalsy, parseParams } from "~/utils/remix.server"; import * as TournamentOrganizationRepository from "./TournamentOrganizationRepository.server"; diff --git a/app/features/tournament-subs/tournament-subs-schemas.server.ts b/app/features/tournament-subs/tournament-subs-schemas.server.ts index f06142151..d0c1145f0 100644 --- a/app/features/tournament-subs/tournament-subs-schemas.server.ts +++ b/app/features/tournament-subs/tournament-subs-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { id, processMany, diff --git a/app/features/tournament/tournament-schemas.server.ts b/app/features/tournament/tournament-schemas.server.ts index 5956935d1..14eb16d89 100644 --- a/app/features/tournament/tournament-schemas.server.ts +++ b/app/features/tournament/tournament-schemas.server.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { _action, checkboxValueToBoolean, diff --git a/app/features/user-page/actions/u.$identifier.builds.new.server.ts b/app/features/user-page/actions/u.$identifier.builds.new.server.ts index 0f2d2e7ff..f15d8cc95 100644 --- a/app/features/user-page/actions/u.$identifier.builds.new.server.ts +++ b/app/features/user-page/actions/u.$identifier.builds.new.server.ts @@ -1,5 +1,5 @@ import { type ActionFunction, redirect } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { requireUser } from "~/features/auth/core/user.server"; import * as BuildRepository from "~/features/builds/BuildRepository.server"; import { BUILD } from "~/features/builds/builds-constants"; diff --git a/app/features/user-page/actions/u.$identifier.builds.server.ts b/app/features/user-page/actions/u.$identifier.builds.server.ts index 293124daf..9da0ab824 100644 --- a/app/features/user-page/actions/u.$identifier.builds.server.ts +++ b/app/features/user-page/actions/u.$identifier.builds.server.ts @@ -1,5 +1,5 @@ import { type ActionFunction, redirect } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { BUILD_SORT_IDENTIFIERS } from "~/db/tables"; import { requireUser } from "~/features/auth/core/user.server"; import * as BuildRepository from "~/features/builds/BuildRepository.server"; diff --git a/app/features/user-page/loaders/u.$identifier.builds.new.server.ts b/app/features/user-page/loaders/u.$identifier.builds.new.server.ts index 920d97f6f..2f13677d1 100644 --- a/app/features/user-page/loaders/u.$identifier.builds.new.server.ts +++ b/app/features/user-page/loaders/u.$identifier.builds.new.server.ts @@ -1,5 +1,5 @@ import type { LoaderFunctionArgs } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { requireUserId } from "~/features/auth/core/user.server"; import * as BuildRepository from "~/features/builds/BuildRepository.server"; import type { Ability } from "~/modules/in-game-lists/types"; diff --git a/app/features/user-page/routes/u.$identifier.admin.tsx b/app/features/user-page/routes/u.$identifier.admin.tsx index 2e1193bf7..0975cebcc 100644 --- a/app/features/user-page/routes/u.$identifier.admin.tsx +++ b/app/features/user-page/routes/u.$identifier.admin.tsx @@ -1,5 +1,5 @@ import { useLoaderData } from "react-router"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { Divider } from "~/components/Divider"; import { SendouButton } from "~/components/elements/Button"; import { SendouDialog } from "~/components/elements/Dialog"; diff --git a/app/features/user-page/user-page-schemas.ts b/app/features/user-page/user-page-schemas.ts index 63d9039d1..129e3ea27 100644 --- a/app/features/user-page/user-page-schemas.ts +++ b/app/features/user-page/user-page-schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { BADGE } from "~/features/badges/badges-constants"; import { isCustomUrl } from "~/utils/urls"; import { diff --git a/app/features/user-search/loaders/u.server.ts b/app/features/user-search/loaders/u.server.ts index 0a2bb7dc1..87c876d08 100644 --- a/app/features/user-search/loaders/u.server.ts +++ b/app/features/user-search/loaders/u.server.ts @@ -1,5 +1,5 @@ import type { LoaderFunctionArgs } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { DANGEROUS_CAN_ACCESS_DEV_CONTROLS } from "~/features/admin/core/dev-controls"; import { getUserId } from "~/features/auth/core/user.server"; import * as UserRepository from "~/features/user-page/UserRepository.server"; diff --git a/app/features/vods/loaders/vods.new.server.ts b/app/features/vods/loaders/vods.new.server.ts index 54b8cad86..6f25ae51a 100644 --- a/app/features/vods/loaders/vods.new.server.ts +++ b/app/features/vods/loaders/vods.new.server.ts @@ -1,5 +1,5 @@ import type { LoaderFunctionArgs } from "react-router"; -import { z } from "zod/v4"; +import { z } from "zod"; import { requireUser } from "~/features/auth/core/user.server"; import { notFoundIfFalsy } from "~/utils/remix.server"; import { actualNumber, id } from "~/utils/zod"; diff --git a/app/features/vods/routes/vods.new.tsx b/app/features/vods/routes/vods.new.tsx index 5ed9d9df7..98bf72b32 100644 --- a/app/features/vods/routes/vods.new.tsx +++ b/app/features/vods/routes/vods.new.tsx @@ -8,7 +8,7 @@ import { } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { useLoaderData } from "react-router"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { SendouButton } from "~/components/elements/Button"; import { UserSearch } from "~/components/elements/UserSearch"; import { FormMessage } from "~/components/FormMessage"; diff --git a/app/features/vods/vods-schemas.ts b/app/features/vods/vods-schemas.ts index 4b02ef339..924c13c0d 100644 --- a/app/features/vods/vods-schemas.ts +++ b/app/features/vods/vods-schemas.ts @@ -1,5 +1,5 @@ import { add } from "date-fns"; -import { z } from "zod/v4"; +import { z } from "zod"; import { dayMonthYear, id, diff --git a/app/features/vods/vods-types.ts b/app/features/vods/vods-types.ts index 869717383..c5efae1cd 100644 --- a/app/features/vods/vods-types.ts +++ b/app/features/vods/vods-types.ts @@ -1,4 +1,4 @@ -import type { z } from "zod/v4"; +import type { z } from "zod"; import type { Tables } from "~/db/tables"; import type { MainWeaponId } from "~/modules/in-game-lists/types"; import type { videoSchema } from "./vods-schemas"; diff --git a/app/modules/patreon/schema.ts b/app/modules/patreon/schema.ts index b4dd53612..07326beb7 100644 --- a/app/modules/patreon/schema.ts +++ b/app/modules/patreon/schema.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import { TIER_1_ID, TIER_2_ID, diff --git a/app/modules/patreon/updater.ts b/app/modules/patreon/updater.ts index a3717b859..ee8b0cada 100644 --- a/app/modules/patreon/updater.ts +++ b/app/modules/patreon/updater.ts @@ -1,4 +1,4 @@ -import type { z } from "zod/v4"; +import type { z } from "zod"; import { STAFF_DISCORD_IDS } from "~/features/admin/admin-constants"; import * as UserRepository from "~/features/user-page/UserRepository.server"; import { dateToDatabaseTimestamp } from "~/utils/dates"; diff --git a/app/modules/twitch/schemas.ts b/app/modules/twitch/schemas.ts index eaa6a1a1a..04e41f405 100644 --- a/app/modules/twitch/schemas.ts +++ b/app/modules/twitch/schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; import type { Unpacked } from "~/utils/types"; export const streamsSchema = z.object({ diff --git a/app/utils/Test.ts b/app/utils/Test.ts index d9241edda..536c6596f 100644 --- a/app/utils/Test.ts +++ b/app/utils/Test.ts @@ -4,7 +4,7 @@ import type { Params, } from "react-router"; import { expect } from "vitest"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import { REGULAR_USER_TEST_ID } from "~/db/seed/constants"; import { db, sql } from "~/db/sql"; import { ADMIN_ID } from "~/features/admin/admin-constants"; diff --git a/app/utils/remix.server.ts b/app/utils/remix.server.ts index de0515f53..2f2fb63d3 100644 --- a/app/utils/remix.server.ts +++ b/app/utils/remix.server.ts @@ -5,7 +5,7 @@ import { nanoid } from "nanoid"; import type { Ok, Result } from "neverthrow"; import type { Params, UIMatch } from "react-router"; import { data, redirect } from "react-router"; -import type { z } from "zod/v4"; +import type { z } from "zod"; import type { navItems } from "~/components/layout/nav-items"; import { uploadStreamToS3 } from "~/features/img-upload/s3.server"; import invariant from "./invariant"; diff --git a/app/utils/zod.ts b/app/utils/zod.ts index dc7a3dd11..720e5ab95 100644 --- a/app/utils/zod.ts +++ b/app/utils/zod.ts @@ -1,5 +1,5 @@ -import type { ZodType } from "zod/v4"; -import { z } from "zod/v4"; +import type { ZodType } from "zod"; +import { z } from "zod"; import { CUSTOM_CSS_VAR_COLORS } from "~/features/user-page/user-page-constants"; import { abilities, diff --git a/package-lock.json b/package-lock.json index 6861bae23..2cf43192e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -67,7 +67,7 @@ "slugify": "^1.6.6", "swr": "^2.3.8", "web-push": "^3.6.7", - "zod": "^3.25.61" + "zod": "^4.2.1" }, "devDependencies": { "@biomejs/biome": "2.3.10", @@ -10808,16 +10808,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/knip/node_modules/zod": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.2.1.tgz", - "integrity": "sha512-0wZ1IRqGGhMP76gLqz8EyfBXKk0J2qo2+H3fi4mcUP/KtTocoX08nmIAHl1Z2kJIZbZee8KOpBCSNPRgauucjw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/kysely": { "version": "0.28.9", "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.28.9.tgz", @@ -15026,9 +15016,9 @@ } }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.2.1.tgz", + "integrity": "sha512-0wZ1IRqGGhMP76gLqz8EyfBXKk0J2qo2+H3fi4mcUP/KtTocoX08nmIAHl1Z2kJIZbZee8KOpBCSNPRgauucjw==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/package.json b/package.json index d3ea70d61..961143954 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "slugify": "^1.6.6", "swr": "^2.3.8", "web-push": "^3.6.7", - "zod": "^3.25.61" + "zod": "^4.2.1" }, "devDependencies": { "@biomejs/biome": "2.3.10", diff --git a/scripts/check-homemade-badges.ts b/scripts/check-homemade-badges.ts index 4894e8321..f39187844 100644 --- a/scripts/check-homemade-badges.ts +++ b/scripts/check-homemade-badges.ts @@ -1,7 +1,7 @@ /** biome-ignore-all lint/suspicious/noConsole: Biome v2 migration */ import fs from "node:fs"; import path from "node:path"; -import { z } from "zod/v4"; +import { z } from "zod"; import badgesJson from "../app/features/badges/homemade.json" with { type: "json", }; diff --git a/scripts/create-analyzer-json.ts b/scripts/create-analyzer-json.ts index 5ce1ce45d..17570b8c6 100644 --- a/scripts/create-analyzer-json.ts +++ b/scripts/create-analyzer-json.ts @@ -10,7 +10,7 @@ import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import { z } from "zod/v4"; +import { z } from "zod"; import type { MainWeaponParams, ParamsJson, diff --git a/scripts/create-league-divisions.ts b/scripts/create-league-divisions.ts index 7ce779e90..1688c69a6 100644 --- a/scripts/create-league-divisions.ts +++ b/scripts/create-league-divisions.ts @@ -1,7 +1,7 @@ // for testing use the command `npx tsx ./scripts/create-league-divisions.ts 6 'https://gist.githubusercontent.com/sendou-ink/38aa4d5d8426035ce178c09598ae627f/raw/17be9bb53a9f017c2097d0624f365d1c5a029f01/league.csv'` import "dotenv/config"; -import { z } from "zod/v4"; +import { z } from "zod"; import { db } from "~/db/sql"; import { ADMIN_ID } from "~/features/admin/admin-constants"; import * as CalendarRepository from "~/features/calendar/CalendarRepository.server"; diff --git a/scripts/placements/schemas.ts b/scripts/placements/schemas.ts index 90348ecf5..0ebf7ff05 100644 --- a/scripts/placements/schemas.ts +++ b/scripts/placements/schemas.ts @@ -1,4 +1,4 @@ -import { z } from "zod/v4"; +import { z } from "zod"; const placements = z.object({ edges: z.array(