From 04fb8fe376e0b85e3dff5bc1cef03c03dd0a1986 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Fri, 29 Mar 2024 18:50:03 +0100 Subject: [PATCH] Import zod differently to better tree shake it --- frontend/src/pagination.ts | 2 +- frontend/src/routes/__root.tsx | 2 +- frontend/src/routes/reset-cross-signing.tsx | 2 +- tools/syn2mas/src/schemas/mas.mts | 2 +- tools/syn2mas/src/schemas/synapse.mts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/pagination.ts b/frontend/src/pagination.ts index 54c028afd..937ee9f67 100644 --- a/frontend/src/pagination.ts +++ b/frontend/src/pagination.ts @@ -13,7 +13,7 @@ // limitations under the License. import { useState } from "react"; -import { z } from "zod"; +import * as z from "zod"; import { PageInfo } from "./gql/graphql"; diff --git a/frontend/src/routes/__root.tsx b/frontend/src/routes/__root.tsx index 4c4d8e5e3..289a5d487 100644 --- a/frontend/src/routes/__root.tsx +++ b/frontend/src/routes/__root.tsx @@ -19,7 +19,7 @@ import { } from "@tanstack/react-router"; import { TanStackRouterDevtools } from "@tanstack/router-devtools"; import { Client } from "urql"; -import { z } from "zod"; +import * as z from "zod"; import Layout from "../components/Layout"; import NotFound from "../components/NotFound"; diff --git a/frontend/src/routes/reset-cross-signing.tsx b/frontend/src/routes/reset-cross-signing.tsx index c17b804f2..cb76d0dfd 100644 --- a/frontend/src/routes/reset-cross-signing.tsx +++ b/frontend/src/routes/reset-cross-signing.tsx @@ -18,7 +18,7 @@ import IconKey from "@vector-im/compound-design-tokens/icons/key.svg?react"; import { Alert, Button, Text } from "@vector-im/compound-web"; import { useTranslation } from "react-i18next"; import { useMutation, useQuery } from "urql"; -import { z } from "zod"; +import * as z from "zod"; import BlockList from "../components/BlockList"; import { ButtonLink } from "../components/ButtonLink"; diff --git a/tools/syn2mas/src/schemas/mas.mts b/tools/syn2mas/src/schemas/mas.mts index 936460260..34481ced3 100644 --- a/tools/syn2mas/src/schemas/mas.mts +++ b/tools/syn2mas/src/schemas/mas.mts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { z } from "zod"; +import * as z from "zod"; const uriDatabaseConfig = z.object({ uri: z.string(), diff --git a/tools/syn2mas/src/schemas/synapse.mts b/tools/syn2mas/src/schemas/synapse.mts index f7efe8501..ef740b550 100644 --- a/tools/syn2mas/src/schemas/synapse.mts +++ b/tools/syn2mas/src/schemas/synapse.mts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { z } from "zod"; +import * as z from "zod"; const sqlite3DatabaseConfig = z.object({ name: z.literal("sqlite3"),