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]>
28 lines
908 B
JavaScript
28 lines
908 B
JavaScript
import commonjs from "@rollup/plugin-commonjs";
|
|
import resolve from "@rollup/plugin-node-resolve";
|
|
// import terser from "@rollup/plugin-terser";
|
|
import typescript from "@rollup/plugin-typescript";
|
|
import bundleSize from "rollup-plugin-bundle-size";
|
|
import filesize from "rollup-plugin-filesize";
|
|
|
|
/** @type {import('rollup').RollupOptions} */
|
|
export default {
|
|
// input: "./in.ts", // Your TypeScript entry file
|
|
output: {
|
|
file: "./out.js", // Output file
|
|
format: "esm", // ES module format to enable tree-shaking
|
|
// sourcemap: true, // Generate sourcemaps for easier debugging
|
|
},
|
|
plugins: [
|
|
resolve(), // Resolve node_modules
|
|
commonjs(), // Convert CommonJS modules to ES6
|
|
typescript(), // Compile TypeScript
|
|
filesize(), // Display bundle size
|
|
],
|
|
treeshake: {
|
|
preset: "smallest",
|
|
// preset: "recommended",
|
|
annotations: true,
|
|
}, // Enable tree-shaking
|
|
};
|