mirror of
https://github.com/hanzoai/zod.git
synced 2026-09-24 17:04:49 +00:00
* Add continuability tests * Update docs for custom string formats (#4868) * docs: add stringFormat examples * Improve * Improve regex * Improve regex * Add console output guard (#4869) * test: fail on console output * Fmt * feat(object): add safeExtend (#4865) * `z.hash()` (#5049) * Implement z.hash() * Implement tests * Document z.hash * Update packages/zod/src/v4/core/regexes.ts * Throw on unrecognized --------- * Drop JIT in Zod Mini `z.object()` (reduces bundle size by 20%) (#5051) * WIP * WIP * No comments * feat: add openapi target to json schema (#5052) * Implement `z.codec` (#5113) * WIP * WIP * WIP * Fix pipe * Add mini codec tests * Fix test * WIP * Add codecs graphic * Add reverse tests for pipe * WIP * More fixes * Remove logs * WIP * Make `z.function()` extend $ZodType (#5121) * WIP * Add back function schemas * Drop unneeded import * Implement z.hex() (#5122) * Document codec examples (#5123) * Document codec examples * Avoid zodtypeany * Tweaks * Improve docs * Improve docs * Tweak * Tweak * Update json codec * Update disc union docs. Closes #5108 * Add .options to ZodMiniEnum. Closes #5116 * Implement two-phase parsing for codecs * Add mutating test * Improve when docs * Support the Max UUID in z.uuid(). Closes #5127 * Make z.hash format properly inferred * Update snapshots with new uuid regex * Add hex,hash to docs. * Throw on .extend() when refinements are present. Document safeExtend() * Update safeExtend docs * Update meta docs * Update packages/docs/content/api.mdx Co-authored-by: Sam Chung <[email protected]> * Add section for customizing z.coerce inputs * Tweak * Docs tweak --------- Co-authored-by: Sam Chung <[email protected]> Co-authored-by: Hanzo Dev <[email protected]>
25 lines
625 B
TypeScript
25 lines
625 B
TypeScript
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { type ViteUserConfig, defineConfig } from "vitest/config";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
conditions: ["@zod/source"],
|
|
},
|
|
test: {
|
|
watch: false,
|
|
isolate: true,
|
|
setupFiles: [resolve(__dirname, "scripts/fail-on-console.ts")],
|
|
typecheck: {
|
|
include: ["**/*.test.ts"],
|
|
enabled: true,
|
|
ignoreSourceErrors: false,
|
|
checker: "tsc",
|
|
tsconfig: "./tsconfig.json",
|
|
},
|
|
silent: true,
|
|
},
|
|
}) as ViteUserConfig;
|