chore: align zod imports to use namespace import from "zod" (#8300)

This commit is contained in:
Alex Yang
2026-03-13 23:46:35 -07:00
parent 4ef1e144ea
commit 2e5177b79a
12 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import type { AuthContext } from "@better-auth/core";
import { createAuthEndpoint } from "@better-auth/core/api";
import { safeJSONParse } from "@better-auth/core/utils/json";
import { sessionMiddleware } from "better-auth/api";
import * as z from "zod/v4";
import * as z from "zod";
import {
batchMigrateLegacyMetadata,
listApiKeys as listApiKeysFromStorage,
+1 -1
View File
@@ -11,7 +11,7 @@ import chalk from "chalk";
import { Command } from "commander";
import prompts from "prompts";
import yoctoSpinner from "yocto-spinner";
import * as z from "zod/v4";
import * as z from "zod";
import { generateSchema } from "../generators";
import { getConfig } from "../utils/get-config";
@@ -1,6 +1,6 @@
// This is a temporary plugin config file until we support actually using the plugin config files.
import * as z from "zod/v4";
import * as z from "zod";
import type { GetArgumentsOptions } from "../generate-auth";
import type { ImportGroup } from "../utility/imports";
import { createImport } from "../utility/imports";
+1 -1
View File
@@ -6,7 +6,7 @@ import { Command } from "commander";
import open from "open";
import prompts from "prompts";
import yoctoSpinner from "yocto-spinner";
import z from "zod";
import * as z from "zod";
import { cliVersion } from "../..";
import { generateDrizzleSchema } from "../../generators/drizzle";
import { generatePrismaSchema } from "../../generators/prisma";
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import * as z from "zod/v4";
import * as z from "zod";
import type { PluginConfig } from "../configs/temp-plugins.config";
import { tempPluginsConfig } from "../configs/temp-plugins.config";
import type { GetArgumentsFn } from "../generate-auth";
+1 -1
View File
@@ -10,7 +10,7 @@ import chalk from "chalk";
import { Command } from "commander";
import prompts from "prompts";
import yoctoSpinner from "yocto-spinner";
import * as z from "zod/v4";
import * as z from "zod";
import { getConfig } from "../utils/get-config";
/** @internal */
+1 -1
View File
@@ -5,7 +5,7 @@ import { Command } from "commander";
import prompts from "prompts";
import * as semver from "semver";
import yoctoSpinner from "yocto-spinner";
import * as z from "zod/v4";
import * as z from "zod";
import { detectPackageManager } from "../utils/check-package-managers";
import { fetchLatestVersion } from "../utils/fetch-latest-version";
import { getPackageInfo } from "../utils/get-package-info";
@@ -4,7 +4,7 @@ import {
sessionMiddleware,
} from "better-auth/api";
import { generateRandomString } from "better-auth/crypto";
import * as z from "zod/v4";
import * as z from "zod";
import type { SSOOptions, SSOProvider } from "../types";
import { getHostnameFromDomain } from "../utils";
+1 -1
View File
@@ -4,7 +4,7 @@ import {
createAuthEndpoint,
sessionMiddleware,
} from "better-auth/api";
import z from "zod/v4";
import * as z from "zod";
import { DEFAULT_MAX_SAML_METADATA_SIZE } from "../constants";
import { validateConfigAlgorithms } from "../saml";
import type { Member, OIDCConfig, SAMLConfig, SSOOptions } from "../types";
+1 -1
View File
@@ -1,4 +1,4 @@
import z from "zod/v4";
import * as z from "zod";
const oidcMappingSchema = z
.object({
+1 -1
View File
@@ -23,7 +23,7 @@ import saml from "samlify";
import type { BindingContext } from "samlify/types/src/entity";
import type { IdentityProvider } from "samlify/types/src/entity-idp";
import type { FlowResult } from "samlify/types/src/flow";
import z from "zod/v4";
import * as z from "zod";
import { getVerificationIdentifier } from "./domain-verification";
interface AuthnRequestRecord {
+1 -1
View File
@@ -7,7 +7,7 @@ import type { Organization } from "better-auth/plugins/organization";
import { defu } from "defu";
import type Stripe from "stripe";
import type { Stripe as StripeType } from "stripe";
import * as z from "zod/v4";
import * as z from "zod";
import { STRIPE_ERROR_CODES } from "./error-codes";
import {
onCheckoutSessionCompleted,