This commit is contained in:
Kalle 2025-06-11 18:59:54 +03:00 committed by GitHub
parent c36b450382
commit 45cf5ba5cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
78 changed files with 103 additions and 97 deletions

View File

@ -1,9 +1,9 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
import { useFetcher } from "@remix-run/react";
import * as React from "react";
import { type DefaultValues, FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
import type { z } from "zod";
import type { z } from "zod/v4";
import { logger } from "~/utils/logger";
import type { ActionError } from "~/utils/remix.server";
import { SubmitButton } from "../SubmitButton";
@ -27,7 +27,7 @@ export function SendouForm<T extends z.ZodTypeAny>({
const { t } = useTranslation(["common"]);
const fetcher = useFetcher<any>();
const methods = useForm({
resolver: zodResolver(schema),
resolver: standardSchemaResolver(schema),
defaultValues,
});
@ -47,7 +47,10 @@ export function SendouForm<T extends z.ZodTypeAny>({
const onSubmit = React.useCallback(
methods.handleSubmit((values) =>
fetcher.submit(values, { method: "post", encType: "application/json" }),
fetcher.submit(values as Parameters<typeof fetcher.submit>[0], {
method: "post",
encType: "application/json",
}),
),
[],
);

View File

@ -1,5 +1,5 @@
import type { ActionFunctionArgs } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import * as AdminRepository from "~/features/admin/AdminRepository.server";
import { makeArtist } from "~/features/art/queries/makeArtist.server";
import { requireUser } from "~/features/auth/core/user.server";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { friendCode } from "~/utils/zod";
export const adminActionSearchParamsSchema = z.object({

View File

@ -1,5 +1,5 @@
import type { ActionFunction } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { seed } from "~/db/seed";
import { parseRequestPayload } from "~/utils/remix.server";

View File

@ -1,6 +1,6 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
import { db } from "~/db/sql";
import {
databaseTimestampToDate,

View File

@ -1,7 +1,7 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { jsonArrayFrom } from "kysely/helpers/sqlite";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
import { db } from "~/db/sql";
import { notFoundIfFalsy, parseParams } from "~/utils/remix.server";
import { userSubmittedImage } from "~/utils/urls";

View File

@ -1,6 +1,6 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
import { findCurrentGroupByUserId } from "~/features/sendouq/queries/findCurrentGroupByUserId.server";
import { parseParams } from "~/utils/remix.server";
import { id } from "~/utils/zod";

View File

@ -1,6 +1,6 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
import * as QMatchRepository from "~/features/sendouq-match/QMatchRepository.server";
import i18next from "~/modules/i18n/i18next.server";
import invariant from "~/utils/invariant";

View File

@ -1,7 +1,7 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { jsonArrayFrom } from "kysely/helpers/sqlite";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
import { db } from "~/db/sql";
import { tournamentFromDBCached } from "~/features/tournament-bracket/core/Tournament.server";
import { resolveMapList } from "~/features/tournament-bracket/core/mapList.server";

View File

@ -1,6 +1,6 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
import { tournamentFromDB } from "~/features/tournament-bracket/core/Tournament.server";
import { notFoundIfFalsy, parseParams } from "~/utils/remix.server";
import { id } from "~/utils/zod";

View File

@ -1,6 +1,6 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
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";

View File

@ -1,6 +1,6 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
import { db } from "~/db/sql";
import { notFoundIfFalsy, parseParams } from "~/utils/remix.server";
import { id } from "~/utils/zod";

View File

@ -1,7 +1,7 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { jsonArrayFrom, jsonObjectFrom } from "kysely/helpers/sqlite";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
import { db } from "~/db/sql";
import { ordinalToSp } from "~/features/mmr/mmr-utils";
import * as TournamentRepository from "~/features/tournament/TournamentRepository.server";

View File

@ -1,7 +1,7 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { jsonArrayFrom } from "kysely/helpers/sqlite";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
import { db } from "~/db/sql";
import { HACKY_resolvePicture } from "~/features/tournament/tournament-utils";
import { databaseTimestampToDate } from "~/utils/dates";

View File

@ -1,7 +1,7 @@
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { jsonArrayFrom } from "kysely/helpers/sqlite";
import { cors } from "remix-utils/cors";
import { z } from "zod";
import { z } from "zod/v4";
import { db } from "~/db/sql";
import { i18next } from "~/modules/i18n/i18next.server";
import { safeNumberParse } from "~/utils/number";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import {
_action,
checkboxValueToDbBoolean,

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
const authorName = z.string().min(1);

View File

@ -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";
import { ZodError, type z } from "zod/v4";
import { ARTICLES_FOLDER_PATH } from "../articles-constants";
import { articleDataSchema } from "../articles-schemas.server";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { _action, id, inviteCode, safeStringSchema } from "~/utils/zod";
import { ASSOCIATION } from "./associations-constants";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import type { z } from "zod";
import type { z } from "zod/v4";
import { SendouDialog } from "~/components/elements/Dialog";
import { InputFormField } from "~/components/form/InputFormField";
import { SendouForm } from "~/components/form/SendouForm";

View File

@ -1,5 +1,5 @@
import { OAuth2Strategy } from "remix-auth-oauth2";
import { z } from "zod";
import { z } from "zod/v4";
import * as UserRepository from "~/features/user-page/UserRepository.server";
import invariant from "~/utils/invariant";
import { logger } from "~/utils/logger";

View File

@ -1,7 +1,7 @@
import type { ActionFunction, LoaderFunction } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { isbot } from "isbot";
import { z } from "zod";
import { z } from "zod/v4";
import * as UserRepository from "~/features/user-page/UserRepository.server";
import { requireRole } from "~/modules/permissions/guards.server";
import { logger } from "~/utils/logger";

View File

@ -1,6 +1,6 @@
import type { ActionFunction } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { requireUser } from "~/features/auth/core/user.server";
import { notify } from "~/features/notifications/core/notify.server";
import {

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { _action, id, noDuplicates, safeJSONParse } from "~/utils/zod";
export const editBadgeActionSchema = z.union([

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { ability, modeShort, safeJSONParse } from "~/utils/zod";
import { MAX_BUILD_FILTERS } from "./builds-constants";

View File

@ -40,7 +40,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
if (!filters.success) {
console.error(
"Invalid filters",
JSON.stringify(filters.error.errors, null, 2),
JSON.stringify(filters.error.issues, null, 2),
);
}

View File

@ -1,6 +1,6 @@
import type { ActionFunction } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
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";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
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";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { type CalendarEventTag, TOURNAMENT_STAGE_TYPES } from "~/db/tables";
import * as Progression from "~/features/tournament-bracket/core/Progression";
import { TOURNAMENT } from "~/features/tournament/tournament-constants";

View File

@ -1,4 +1,4 @@
import type { z } from "zod";
import type { z } from "zod/v4";
import type { CalendarEventTag, Tables } from "~/db/tables";
import type { calendarFiltersSearchParamsSchema } from "~/features/calendar/calendar-schemas";
import type { ModeShortWithSpecial } from "~/modules/in-game-lists/types";

View File

@ -1,5 +1,5 @@
import { formatDistance } from "date-fns";
import { z } from "zod";
import { z } from "zod/v4";
import { logger } from "~/utils/logger";
const BSKY_URL =

View File

@ -5,7 +5,7 @@ import {
unstable_parseMultipartFormData as parseMultipartFormData,
redirect,
} from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { requireUser } from "~/features/auth/core/user.server";
import * as TeamRepository from "~/features/team/TeamRepository.server";
import { isTeamManager } from "~/features/team/team-utils";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { _action, id, safeJSONParse } from "~/utils/zod";
const validateManySchema = z.object({

View File

@ -1,6 +1,6 @@
import type { ActionFunctionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { requireUser } from "~/features/auth/core/user.server";
import * as UserRepository from "~/features/user-page/UserRepository.server";
import { errorToastIfFalsy, parseRequestPayload } from "~/utils/remix.server";

View File

@ -1,5 +1,5 @@
import type { ActionFunctionArgs } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { requireUser } from "~/features/auth/core/user.server";
import { errorToastIfFalsy, parseRequestPayload } from "~/utils/remix.server";
import { _action, id } from "~/utils/zod";

View File

@ -1,5 +1,5 @@
import type { LoaderFunctionArgs } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
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";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { id } from "~/utils/zod";
import { NOTIFICATIONS } from "./notifications-contants";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { _action, actualNumber, trimmedString } from "~/utils/zod";
import { PLUS_SUGGESTION, PLUS_TIERS } from "./plus-suggestions-constants";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import type { PlusVoteFromFE } from "~/features/plus-voting/core";
import { assertType } from "~/utils/types";
import { safeJSONParse } from "~/utils/zod";

View File

@ -1,5 +1,5 @@
import { type ActionFunctionArgs, redirect } from "@remix-run/node";
import type { z } from "zod";
import type { z } from "zod/v4";
import type { Tables } from "~/db/tables";
import { requireUser } from "~/features/auth/core/user.server";
import { userIsBanned } from "~/features/ban/core/banned.server";

View File

@ -1,7 +1,7 @@
import { Link, useLoaderData } from "@remix-run/react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import type { z } from "zod";
import type { z } from "zod/v4";
import { Alert } from "~/components/Alert";
import TimePopover from "~/components/TimePopover";
import { SendouButton } from "~/components/elements/Button";

View File

@ -2,7 +2,7 @@ import { useLoaderData } from "@remix-run/react";
import * as React from "react";
import { Controller, useFormContext, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next";
import type { z } from "zod";
import type { z } from "zod/v4";
import { Label } from "~/components/Label";
import { DateFormField } from "~/components/form/DateFormField";
import { SendouForm } from "~/components/form/SendouForm";

View File

@ -4,7 +4,7 @@ import clsx from "clsx";
import * as React from "react";
import { useTranslation } from "react-i18next";
import * as R from "remeda";
import type { z } from "zod";
import type { z } from "zod/v4";
import { AddNewButton } from "~/components/AddNewButton";
import { Avatar } from "~/components/Avatar";
import { Divider } from "~/components/Divider";

View File

@ -1,5 +1,5 @@
import { add, sub } from "date-fns";
import { z } from "zod";
import { z } from "zod/v4";
import {
_action,
date,

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { SENDOUQ, SENDOUQ_BEST_OF } from "~/features/sendouq/q-constants";
import {
_action,

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { languagesUnified } from "~/modules/i18n/config";
import { modesShort } from "~/modules/in-game-lists/modes";
import {

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import {
_action,
deduplicate,

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { _action } from "~/utils/zod";
export const settingsEditSchema = z.union([

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import {
_action,
customCssVarObject,

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import {
_action,
checkboxValueToBoolean,

View File

@ -1,5 +1,5 @@
import type { LoaderFunctionArgs } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { getUser } from "~/features/auth/core/user.server";
import { parseSafeSearchParams } from "~/utils/remix.server";
import { id } from "~/utils/zod";

View File

@ -1,7 +1,7 @@
import { Link, useLoaderData } from "@remix-run/react";
import { Controller, useFieldArray, useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next";
import type { z } from "zod";
import type { z } from "zod/v4";
import { FormMessage } from "~/components/FormMessage";
import { Label } from "~/components/Label";
import { Main } from "~/components/Main";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { TOURNAMENT_ORGANIZATION_ROLES } from "~/db/tables";
import { mySlugify } from "~/utils/urls";
import { falsyToNull, id } from "~/utils/zod";

View File

@ -1,5 +1,5 @@
import type { LoaderFunctionArgs } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { notFoundIfFalsy, parseParams } from "~/utils/remix.server";
import * as TournamentOrganizationRepository from "./TournamentOrganizationRepository.server";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { mainWeaponIds } from "~/modules/in-game-lists/weapon-ids";
import { id, processMany, removeDuplicates, safeJSONParse } from "~/utils/zod";
import { TOURNAMENT_SUB } from "./tournament-subs-constants";

View File

@ -1,5 +1,5 @@
import type { ActionFunction } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { requireUser } from "~/features/auth/core/user.server";
import { userIsBanned } from "~/features/ban/core/banned.server";
import { bracketProgressionSchema } from "~/features/calendar/calendar-schemas";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import {
_action,
checkboxValueToBoolean,

View File

@ -1,6 +1,6 @@
import { type ActionFunction, redirect } from "@remix-run/node";
import * as R from "remeda";
import { z } from "zod";
import { z } from "zod/v4";
import { requireUser } from "~/features/auth/core/user.server";
import * as BuildRepository from "~/features/builds/BuildRepository.server";
import { BUILD } from "~/features/builds/builds-constants";

View File

@ -1,5 +1,5 @@
import { type ActionFunction, redirect } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { BUILD_SORT_IDENTIFIERS } from "~/db/tables";
import { requireUser } from "~/features/auth/core/user.server";
import * as BuildRepository from "~/features/builds/BuildRepository.server";

View File

@ -1,5 +1,5 @@
import type { LoaderFunctionArgs } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
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";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import { BADGE } from "~/features/badges/badges-constants";
import { isCustomUrl } from "~/utils/urls";
import {

View File

@ -1,5 +1,5 @@
import type { LoaderFunctionArgs, SerializeFrom } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { getUserId } from "~/features/auth/core/user.server";
import * as UserRepository from "~/features/user-page/UserRepository.server";
import { parseSearchParams } from "~/utils/remix.server";

View File

@ -1,5 +1,5 @@
import type { LoaderFunctionArgs } from "@remix-run/node";
import { z } from "zod";
import { z } from "zod/v4";
import { requireUser } from "~/features/auth/core/user.server";
import { notFoundIfFalsy } from "~/utils/remix.server";
import { actualNumber, id } from "~/utils/zod";

View File

@ -8,7 +8,7 @@ import {
useWatch,
} from "react-hook-form";
import { useTranslation } from "react-i18next";
import type { z } from "zod";
import type { z } from "zod/v4";
import { WeaponCombobox } from "~/components/Combobox";
import { FormMessage } from "~/components/FormMessage";
import { Label } from "~/components/Label";

View File

@ -1,5 +1,5 @@
import { add } from "date-fns";
import { z } from "zod";
import { z } from "zod/v4";
import {
dayMonthYear,
id,

View File

@ -1,4 +1,4 @@
import type { z } from "zod";
import type { z } from "zod/v4";
import type { Tables } from "~/db/tables";
import type { MainWeaponId } from "~/modules/in-game-lists/types";
import type { videoMatchSchema, videoSchema } from "./vods-schemas";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import {
TIER_1_ID,
TIER_2_ID,

View File

@ -1,4 +1,4 @@
import type { z } from "zod";
import type { z } from "zod/v4";
import { STAFF_DISCORD_IDS } from "~/features/admin/admin-constants";
import * as UserRepository from "~/features/user-page/UserRepository.server";
import { dateToDatabaseTimestamp } from "~/utils/dates";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
import type { Unpacked } from "~/utils/types";
export const streamsSchema = z.object({

View File

@ -1,7 +1,7 @@
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@remix-run/node";
import type { Params } from "@remix-run/react";
import { expect } from "vitest";
import type { z } from "zod";
import type { z } from "zod/v4";
import { REGULAR_USER_TEST_ID } from "~/db/seed/constants";
import { db, sql } from "~/db/sql";
import { ADMIN_ID } from "~/features/admin/admin-constants";
@ -27,7 +27,7 @@ export function wrappedAction<T extends z.ZodTypeAny>({
params = {},
}: { user?: "admin" | "regular"; params?: Params<string> } = {},
) => {
const body = new URLSearchParams(args);
const body = new URLSearchParams(args as any);
const request = new Request("http://app.com/path", {
method: "POST",
body,

View File

@ -7,7 +7,7 @@ import {
import type { Params, UIMatch } from "@remix-run/react";
import type { Namespace, TFunction } from "i18next";
import { nanoid } from "nanoid";
import type { z } from "zod";
import type { z } from "zod/v4";
import type { navItems } from "~/components/layout/nav-items";
import { s3UploadHandler } from "~/features/img-upload";
import invariant from "./invariant";
@ -65,7 +65,7 @@ export function parseSafeSearchParams<T extends z.ZodTypeAny>({
}: {
request: Request;
schema: T;
}): z.SafeParseReturnType<any, z.infer<T>> {
}) {
const url = new URL(request.url);
return schema.safeParse(Object.fromEntries(url.searchParams));
}
@ -152,7 +152,9 @@ export async function safeParseRequestFormData<T extends z.ZodTypeAny>({
if (!parsed.success) {
return {
success: false,
errors: parsed.error.errors.map((error) => error.message),
errors: parsed.error.issues.map(
(issue: { message: string }) => issue.message,
),
};
}

View File

@ -1,5 +1,5 @@
import type { ZodType } from "zod";
import { z } from "zod";
import type { ZodType } from "zod/v4";
import { z } from "zod/v4";
import { CUSTOM_CSS_VAR_COLORS } from "~/features/user-page/user-page-constants";
import {
abilities,
@ -318,7 +318,7 @@ export function checkboxValueToDbBoolean(value: unknown) {
return 0;
}
export const _action = <T extends z.Primitive>(value: T) =>
export const _action = <T extends string>(value: T) =>
z.preprocess(deduplicate, z.literal(value));
// Fix bug at least in Safari 15 where SubmitButton value might get sent twice
@ -341,9 +341,10 @@ export function numericEnum<TValues extends readonly number[]>(
return z.number().superRefine((val, ctx) => {
if (!values.includes(val)) {
ctx.addIssue({
code: z.ZodIssueCode.invalid_enum_value,
options: [...values],
received: val,
code: z.ZodIssueCode.invalid_value,
input: val,
values: [...values],
message: `Expected one of: ${values.join(", ")}, received ${val}`,
});
}
}) as ZodType<TValues[number]>;

16
package-lock.json generated
View File

@ -17,7 +17,7 @@
"@epic-web/cachified": "^5.5.2",
"@faker-js/faker": "^9.7.0",
"@headlessui/react": "^1.7.19",
"@hookform/resolvers": "^5.0.1",
"@hookform/resolvers": "^5.1.1",
"@remix-run/node": "^2.16.5",
"@remix-run/react": "^2.16.5",
"@remix-run/serve": "^2.16.5",
@ -62,7 +62,7 @@
"slugify": "^1.6.6",
"swr": "^2.3.3",
"web-push": "^3.6.7",
"zod": "^3.24.3"
"zod": "^3.25.61"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
@ -2267,9 +2267,9 @@
}
},
"node_modules/@hookform/resolvers": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-5.0.1.tgz",
"integrity": "sha512-u/+Jp83luQNx9AdyW2fIPGY6Y7NG68eN2ZW8FOJYL+M0i4s49+refdJdOp/A9n9HFQtQs3HIDHQvX3ZET2o7YA==",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-5.1.1.tgz",
"integrity": "sha512-J/NVING3LMAEvexJkyTLjruSm7aOFx7QX21pzkiJfMoNG0wl5aFEjLTl7ay7IQb9EWY6AkrBy7tHL2Alijpdcg==",
"license": "MIT",
"dependencies": {
"@standard-schema/utils": "^0.3.0"
@ -18693,9 +18693,9 @@
}
},
"node_modules/zod": {
"version": "3.24.3",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.24.3.tgz",
"integrity": "sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==",
"version": "3.25.61",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.61.tgz",
"integrity": "sha512-fzfJgUw78LTNnHujj9re1Ov/JJQkRZZGDMcYqSx7Hp4rPOkKywaFHq0S6GoHeXs0wGNE/sIOutkXgnwzrVOGCQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"

View File

@ -36,7 +36,7 @@
"@epic-web/cachified": "^5.5.2",
"@faker-js/faker": "^9.7.0",
"@headlessui/react": "^1.7.19",
"@hookform/resolvers": "^5.0.1",
"@hookform/resolvers": "^5.1.1",
"@remix-run/node": "^2.16.5",
"@remix-run/react": "^2.16.5",
"@remix-run/serve": "^2.16.5",
@ -81,7 +81,7 @@
"slugify": "^1.6.6",
"swr": "^2.3.3",
"web-push": "^3.6.7",
"zod": "^3.24.3"
"zod": "^3.25.61"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",

View File

@ -1,6 +1,6 @@
import fs from "node:fs";
import path from "node:path";
import { z } from "zod";
import { z } from "zod/v4";
import badgesJson from "../app/features/badges/homemade.json" with {
type: "json",
};

View File

@ -8,7 +8,7 @@
// 5) params (weapon folder) inside dicts
import fs from "node:fs";
import { z } from "zod";
import { z } from "zod/v4";
import type { MainWeaponParams, SubWeaponParams } from "~/modules/analyzer";
import type { ParamsJson } from "~/modules/analyzer/types";
import {

View File

@ -1,7 +1,7 @@
// for testing use the command `npx tsx ./scripts/create-league-divisions.ts 6 'https://gist.githubusercontent.com/Sendouc/38aa4d5d8426035ce178c09598ae627f/raw/17be9bb53a9f017c2097d0624f365d1c5a029f01/league.csv'`
import "dotenv/config";
import { z } from "zod";
import { z } from "zod/v4";
import { db } from "~/db/sql";
import { ADMIN_ID } from "~/features/admin/admin-constants";
import * as CalendarRepository from "~/features/calendar/CalendarRepository.server";

View File

@ -1,4 +1,4 @@
import { z } from "zod";
import { z } from "zod/v4";
const placements = z.object({
edges: z.array(