fix(core): prototype pollution in generateFastpass#4359
fix(core): prototype pollution in generateFastpass#4359colinhacks merged 1 commit intocolinhacks:v4from
generateFastpass#4359Conversation
✅ Deploy Preview for guileless-rolypoly-866f8a ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
WalkthroughThis change is a major project-wide refactor and cleanup. It removes a large number of configuration, test, benchmark, and documentation files, especially those related to Deno, Jest, and legacy build/test setups. It introduces new configuration files for TypeScript, Rollup, Biome, and workspace/package management, and updates documentation and CI workflows to use pnpm and Vitest. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant CI as CI/CD Workflow
participant PM as Package Manager (pnpm)
participant Tool as Tooling (Biome, Rollup, TypeScript)
participant Repo as Repository
Dev->>Repo: Push code / open PR
CI->>Repo: Detect push/PR on main/v4
CI->>PM: Install dependencies (pnpm)
CI->>Tool: Run linter (Biome), formatter, build (Rollup/tsc)
CI->>Tool: Run tests (Vitest)
CI->>Repo: (On beta/v4) Publish beta (if enabled)
CI->>Repo: (On main) Skip publish (steps commented out)
Dev->>Repo: Review results, update as needed
Assessment against linked issues
Possibly related PRs
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Whoops! Targeted |
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 18
🔭 Outside diff range comments (3)
README.md (2)
113-120: 🧹 Nitpick (assertive)Fix Markdown link fragment for ZodTransform anchor
The anchor link#zodtype-with-ZodTransformshould be lowercase to match GitHub’s automatic fragment generation.
Apply this diff:- - [ZodType with ZodTransform](#zodtype-with-ZodTransform) + - [ZodType with ZodTransform](#zodtype-with-zodtransform)🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
117-117: Link fragments should be valid
Expected: #zodtype-with-zodtransform; Actual: #zodtype-with-ZodTransform(MD051, link-fragments)
765-772: 🧹 Nitpick (assertive)Typo: IPv6 formatting
Change "IP 6" to "IPv6" for consistency:- The `z.string().ip()` method by default validate IPv4 and IP 6. + The `z.string().ip()` method by default validates IPv4 and IPv6..configs/rollup.config.js (1)
1-26: 🧹 Nitpick (assertive)Consider enabling sourcemaps for debugging
You’ve got thesourcemapoption commented out. It can be super handy during development:-output: { - file: "./scratch/out_rollup.js", // Output file - format: "esm", // ES module format to enable tree-shaking - // sourcemap: true, // Generate sourcemaps for easier debugging -}, +output: { + file: "./scratch/out_rollup.js", // Output file + format: "esm", // ES module format to enable tree-shaking + sourcemap: true, // Generate sourcemaps for easier debugging +},If you’d rather keep it off by default, consider gating it behind an env var or CLI flag. Otherwise, this config looks solid.
🛑 Comments failed to post (18)
ERROR_HANDLING.md (3)
188-197: 🧹 Nitpick (assertive)
Fix typo in Locales section
There's a small typo in the Locales intro: "deafult" should be "default".-There are locale-specific error maps built into Zod for various languages. To set the deafult error map based on your locale, you can import... +There are locale-specific error maps built into Zod for various languages. To set the default error map based on your locale, you can import...📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.## Locales There are locale-specific error maps built into Zod for various languages. To set the default error map based on your locale, you can import the error map from the `zod/locales` directory.🤖 Prompt for AI Agents (early access)
In ERROR_HANDLING.md around lines 188 to 197, fix the typo in the Locales section by changing "deafult" to "default" in the sentence describing setting the default error map based on locale.
43-57: 🧹 Nitpick (assertive)
Remove inline HTML
<br>tags for cleaner Markdown
The<br>tags flagged by markdownlint can be replaced with Markdown-native line breaks (two spaces + newline) or list items. This will improve portability and linting compliance without altering the table content.Suggested diff for one case (apply similarly to other rows):
-| ZodIssueCode.invalid_type | `expected: ZodParsedType` <br> `received: ZodParsedType` | +| ZodIssueCode.invalid_type | `expected: ZodParsedType` \ + `received: ZodParsedType` |Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 LanguageTool
[style] ~57-~57: As a shorter alternative for ‘able to’, consider using “can”.
Context: ...hrow issues of anyZodIssueCode). You are able to pass in aparamsobject here that is ...(BE_ABLE_TO)
🪛 markdownlint-cli2 (0.17.2)
45-45: Inline HTML
Element: br(MD033, no-inline-html)
45-45: Inline HTML
Element: br(MD033, no-inline-html)
45-45: Inline HTML
Element: br(MD033, no-inline-html)
46-46: Inline HTML
Element: br(MD033, no-inline-html)
46-46: Inline HTML
Element: br(MD033, no-inline-html)
47-47: Inline HTML
Element: br(MD033, no-inline-html)
48-48: Inline HTML
Element: br(MD033, no-inline-html)
49-49: Inline HTML
Element: br(MD033, no-inline-html)
50-50: Inline HTML
Element: br(MD033, no-inline-html)
52-52: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
55-55: Inline HTML
Element: br(MD033, no-inline-html)
55-55: Inline HTML
Element: br(MD033, no-inline-html)
56-56: Inline HTML
Element: br(MD033, no-inline-html)
56-56: Inline HTML
Element: br(MD033, no-inline-html)
57-57: Inline HTML
Element: br(MD033, no-inline-html)
57-57: Link fragments should be valid
Expected: #customizing-errors-with-zoderrormap; Actual: #Customizing-errors-with-ZodErrorMap(MD051, link-fragments)
🤖 Prompt for AI Agents (early access)
In ERROR_HANDLING.md between lines 43 and 57, the table uses inline HTML <br> tags for line breaks, which markdownlint flags as non-compliant. Replace all <br> tags with Markdown-native line breaks by adding two spaces at the end of the line followed by a newline, or convert the content into proper list items within the table cells. Apply this change consistently across all rows to improve Markdown portability and linting compliance without changing the content.
43-57: 🧹 Nitpick (assertive)
Fix link fragment to match actual heading ID
The reference to#Customizing-errors-with-ZodErrorMapwon’t work with GitHub’s slugging. Use a lowercase slug#customizing-errors-with-zoderrormapto ensure the link jumps correctly.Example diff:
-(see [ZodErrorMap](#Customizing-errors-with-ZodErrorMap) below for details) +(see [ZodErrorMap](#customizing-errors-with-zoderrormap) below for details)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.| ZodIssueCode.custom | `params: { [k: string]: any }` <br> This is the error code throw by refinements (unless you are using `superRefine` in which case it's possible to throw issues of any `ZodIssueCode`). You are able to pass in a `params` object here that is available in your custom error maps (see [ZodErrorMap](#customizing-errors-with-zoderrormap) below for details on error maps) |🧰 Tools
🪛 LanguageTool
[style] ~57-~57: As a shorter alternative for ‘able to’, consider using “can”.
Context: ...hrow issues of anyZodIssueCode). You are able to pass in aparamsobject here that is ...(BE_ABLE_TO)
🪛 markdownlint-cli2 (0.17.2)
45-45: Inline HTML
Element: br(MD033, no-inline-html)
45-45: Inline HTML
Element: br(MD033, no-inline-html)
45-45: Inline HTML
Element: br(MD033, no-inline-html)
46-46: Inline HTML
Element: br(MD033, no-inline-html)
46-46: Inline HTML
Element: br(MD033, no-inline-html)
47-47: Inline HTML
Element: br(MD033, no-inline-html)
48-48: Inline HTML
Element: br(MD033, no-inline-html)
49-49: Inline HTML
Element: br(MD033, no-inline-html)
50-50: Inline HTML
Element: br(MD033, no-inline-html)
52-52: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
53-53: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
54-54: Inline HTML
Element: br(MD033, no-inline-html)
55-55: Inline HTML
Element: br(MD033, no-inline-html)
55-55: Inline HTML
Element: br(MD033, no-inline-html)
56-56: Inline HTML
Element: br(MD033, no-inline-html)
56-56: Inline HTML
Element: br(MD033, no-inline-html)
57-57: Inline HTML
Element: br(MD033, no-inline-html)
57-57: Link fragments should be valid
Expected: #customizing-errors-with-zoderrormap; Actual: #Customizing-errors-with-ZodErrorMap(MD051, link-fragments)
🤖 Prompt for AI Agents (early access)
In ERROR_HANDLING.md around lines 43 to 57, the link fragment `#Customizing-errors-with-ZodErrorMap` does not match GitHub's slugging rules and will not navigate correctly. Change the fragment to lowercase `#customizing-errors-with-zoderrormap` to ensure the link works properly..nvmrc (1)
1-1: 🧹 Nitpick (assertive)
Use an LTS-friendly version specifier
Locking to22could mismatch the current Node LTS schedule. Consider usinglts/*or pinning to a released LTS (e.g.,20) to ensure contributors don’t accidentally run on an unsupported version.🤖 Prompt for AI Agents (early access)
In the .nvmrc file at line 1, the Node version is locked to "22", which may not align with the current LTS schedule. Replace "22" with "lts/*" to always use the latest LTS version or pin it to a specific released LTS version like "20" to ensure consistency and avoid using unsupported Node versions..gitignore (1)
9-22: 🧹 Nitpick (assertive)
Anchor ignore patterns to the repo root
Patterns likescratch,out.png,logos, etc., will match those names anywhere in the tree. To avoid unintended ignores, prefix them with/(e.g.,/scratch,/out.png,/logos/).🤖 Prompt for AI Agents (early access)
In the .gitignore file from lines 9 to 22, the ignore patterns are not anchored to the repository root, causing them to match files or directories with the same names anywhere in the project tree. To fix this, prefix each pattern with a slash (/) to anchor it to the root, for example, change "scratch" to "/scratch" and "logos" to "/logos/". This ensures only the intended files or directories at the root are ignored.README_ZH.md (1)
1250-1251: 🧹 Nitpick (assertive)
Translate inline English comments
This Chinese README includes an English comment// cast to z.ZodType<Category>. For consistency, either translate it into Chinese or remove it if it’s redundant for readers.🤖 Prompt for AI Agents (early access)
In README_ZH.md around lines 1250 to 1251, the inline English comment "// cast to z.ZodType<Category>" should be translated into Chinese for consistency with the rest of the document or removed if it is redundant. Update the comment to a clear Chinese equivalent or delete it to maintain language uniformity in the README..changeset/config.json (1)
1-11: 🧹 Nitpick (assertive)
Confirm changeset commit behavior
With"commit": false, changesets won’t be auto-committed by the CLI. If you’d prefer automation, you might toggle this totrue.🤖 Prompt for AI Agents (early access)
In .changeset/config.json from lines 1 to 11, the "commit" property is set to false, which disables automatic committing of changesets by the CLI. To enable automated commits of changesets, change the value of "commit" from false to true..github/pull_request_template.md (1)
3-3: 🧹 Nitpick (assertive)
Fix typo in PR template
There's a small spelling slip—“contribting” should be “contributing.”- Thanks for contribting to OSS! + Thanks for contributing to OSS!📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.Development of the next major version of Zod (`v4`) is currently underway. During this phase, only bugfixes and documentation improvements are being accepted into the `main` branch. All other PRs should target the `v4` branch. Thanks for contributing to OSS!🤖 Prompt for AI Agents (early access)
In .github/pull_request_template.md at line 3, fix the typo by changing "contribting" to "contributing" to correct the spelling error in the PR template message.CONTRIBUTING.md (3)
73-75: 🧹 Nitpick (assertive)
Tighten wording and drop extra punctuation
Reduce unnecessary parentheses and smooth out line 75:- > Zod uses git hooks to execute tests before `git push`. Before submitting your PR, run `pnpm test` to make sure there are no (unintended) breaking changes. + > Zod uses git hooks to execute tests before `git push`. Before submitting your PR, run `pnpm test` to make sure there are no unintended breaking changes.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.Zod uses Vitest for testing. After implementing your contribution, write tests for it. Just create a new file in the `tests` directory of any workspace, or add additional tests to an existing file if appropriate. > Zod uses git hooks to execute tests before `git push`. Before submitting your PR, run `pnpm test` to make sure there are no unintended breaking changes.🧰 Tools
🪛 LanguageTool
[uncategorized] ~75-~75: You might be missing the article “the” here.
Context: ...t push. Before submitting your PR, runpnpm test` to make sure there are no (un...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
🤖 Prompt for AI Agents (early access)
In CONTRIBUTING.md lines 73 to 75, improve clarity by tightening the wording and removing extra punctuation. Specifically, rephrase line 75 to eliminate unnecessary parentheses around "unintended" and smooth the sentence flow for better readability without changing the meaning.
30-32: 🧹 Nitpick (assertive)
Unify install command for consistency
The guide currently sayspnpm i, but elsewhere we usepnpm install. Let’s stick to the full form for clarity:- 3. Run `pnpm i` to install dependencies. + 3. Run `pnpm install` to install dependencies.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.3. Run `pnpm install` to install dependencies. 4. Start playing with the code! You can do some simple experimentation in [`playground.ts`](playground.ts) (see `pnpm play` below) or start implementing a feature right away.🤖 Prompt for AI Agents (early access)
In CONTRIBUTING.md around lines 30 to 32, replace the shorthand command `pnpm i` with the full command `pnpm install` to maintain consistency and clarity throughout the documentation.
47-57: 🧹 Nitpick (assertive)
Clarify test command descriptions
The description forpnpm test:watchis cut off, and thepnpm testline is missing an article. Here’s a tweak:- **`pnpm test:watch`** - - runs all Vitest tests and + **`pnpm test:watch`** + - runs all Vitest tests in watch mode - - runs all Vitest tests and generates coverage badge + - runs all Vitest tests and generates a coverage badge📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.**`pnpm build`** - deletes `lib` and re-compiles `src` to `lib` **`pnpm test`** - runs all Vitest tests and generates a coverage badge **`pnpm test:watch`** - runs all Vitest tests in watch mode🧰 Tools
🪛 LanguageTool
[uncategorized] ~53-~53: You might be missing the article “a” here.
Context: ... - runs all Vitest tests and generates coverage badgepnpm test:watch- runs al...(AI_EN_LECTOR_MISSING_DETERMINER_A)
🤖 Prompt for AI Agents (early access)
In CONTRIBUTING.md around lines 47 to 57, the description for the `pnpm test:watch` command is incomplete and the `pnpm test` description is missing an article. Complete the `pnpm test:watch` description to fully explain its behavior and add the missing article ("runs all the Vitest tests") in the `pnpm test` description for clarity and correctness..github/workflows/release-beta.yaml (4)
21-21: 🧹 Nitpick (assertive)
Remove trailing whitespace
Line 21 has extra spaces triggering YAML lint errors—please trim them.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 21-21: trailing spaces
(trailing-spaces)
🤖 Prompt for AI Agents (early access)
In .github/workflows/release-beta.yaml at line 21, there are trailing whitespace characters causing YAML lint errors. Remove all extra spaces at the end of this line to fix the linting issue.
32-32: 🧹 Nitpick (assertive)
Remove trailing whitespace
Line 32 ends with unwanted spaces; please delete them to satisfy the linter.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 32-32: trailing spaces
(trailing-spaces)
🤖 Prompt for AI Agents (early access)
In .github/workflows/release-beta.yaml at line 32, remove the trailing whitespace characters at the end of the line to comply with the linter requirements.
26-26: 🧹 Nitpick (assertive)
Remove trailing whitespace
Line 26 also has stray spaces at the end—let’s clean that up.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 26-26: trailing spaces
(trailing-spaces)
🤖 Prompt for AI Agents (early access)
In .github/workflows/release-beta.yaml at line 26, remove any trailing whitespace characters at the end of the line to clean up stray spaces.
1-3: 🧹 Nitpick (assertive)
Correct workflow header comment
The top comment mentionsrelease.yml, but this file isrelease-beta.yaml. Let’s update it:- # .github/release.yml + # .github/workflows/release-beta.yaml📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.# .github/workflows/release-beta.yaml name: Release betas🤖 Prompt for AI Agents (early access)
In .github/workflows/release-beta.yaml at lines 1 to 3, the top comment incorrectly references release.yml instead of release-beta.yaml. Update the comment to correctly reflect the current file name as release-beta.yaml..github/workflows/test.yml (1)
24-26: 🧹 Nitpick (assertive)
🚀 Speed up CI with pnpm cache
Consider caching the pnpm store to cut install times. For example:+ - name: Cache pnpm store + uses: actions/cache@v3 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-🤖 Prompt for AI Agents (early access)
In .github/workflows/test.yml around lines 24 to 26, the pnpm install step does not use caching, which slows down CI. Add a cache step for the pnpm store before running pnpm install by using actions/cache with the path set to the pnpm store directory and a key based on the OS and pnpm lockfile. This will speed up subsequent installs by reusing cached dependencies..github/workflows/release.yml (1)
22-22: 🧹 Nitpick (assertive)
🧹 Remove trailing spaces
YAMLlint flagged trailing spaces on these lines. Cleaning them up will keep the file tidy.Also applies to: 51-51
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 22-22: trailing spaces
(trailing-spaces)
🤖 Prompt for AI Agents (early access)
In .github/workflows/release.yml at lines 22 and 51, there are trailing spaces that cause YAMLlint warnings. Remove any trailing whitespace characters at the end of these lines to clean up the file and comply with YAML formatting standards..configs/tsconfig.base.json (1)
15-15: 🧹 Nitpick (assertive)
⚡️ Consider enabling noUnusedLocals
You’ve set"noUnusedLocals": falseto avoid noise, but turning it on could catch dead code and improve maintainability down the line.🤖 Prompt for AI Agents (early access)
In .configs/tsconfig.base.json at line 15, the "noUnusedLocals" option is set to false, which disables detection of unused local variables. To improve code quality and maintainability, change the value of "noUnusedLocals" from false to true to enable this compiler check.
|
Beautiful thanks! Most tests are under |
* feat(lang): Added initial Azerbaijani locale (#4158) * feat(lang): Added initial Azerbaijani locale * Format --------- Co-authored-by: Colin McDonnell <[email protected]> * fix(docs): Typo fro (#4157) * Fix broken logo link (#3974) * Fix broken logo link * Use absolute URL * Absolute url --------- Co-authored-by: Colin McDonnell <[email protected]> * Add packages/docs * Remove packages/docs * Clean up zodmini exports with underscores * Add precommit format * Fix error generic * Fix optionality docs * tweak (#4173) Co-authored-by: Colin McDonnell <[email protected]> * fix: dev:play script to use play.ts instead of playground.ts (#4177) * Optimize `extendShape` (#4150) Co-authored-by: Anders Hejlsberg <[email protected]> * 3.24.3 * add back packages/docs * Update * Update benchmark * Refactor `Extend` to preserve declaration links (#4155) * Refactor `ExtendShape` to preserve declaration links * fix type issues * Simplify aliases * Fix lint * Fix * Update benchmarks --------- Co-authored-by: Colin McDonnell <[email protected]> * Fix en.ts * 0.5.2 * 0.6.0 * Fix enum type portability * Clean up passthrough schemas in toJSONSchema * 0.6.3 * v4: fix typos in basics guide (#4211) - Removed redundant whitespaces before `string()` method - Fixed typo in the note to `.parse()` method * v4: fix typo in defining schemas section (#4219) * fix migration guide typos (#4205) * partial record * Clean up toJSONSchema behavior. extract schemas with ids * Improve core.mdx * Fix missing methods * 0.7.0 * Fix unrepresentable literals and onattach issues * 0.8.0 * Improve error customization docs * Clarify error docs * Closes #4089 * Fix starts_with * docs: add zod-schema-faker to ecosystem (#4247) * fix(docs): Correct "with with" typo. (#4243) Correct "with with" typo. * fix(docs): Correct typo in Records (#4244) Correct typo in Records "that as" instead of "that is". * fix(docs): Typo in `z.object()` vs `z.interface()` (#4241) Update documentation to clarify that optional properties in `z.interface()` are defined with a `?` suffix, not a prefix. * Correcting the default numeric range to be inclusive. (#4224) * Reusing `Number.MAX_VALUE` for `float64` range (#4222) * Clarify defaults for `toJsonSchema` options (#4223) * docs: add GQLoom to ecosystem (#4225) * fix(docs): Swap Enum `.exclude() / .extract()` code samples. (#4242) The code samples in `.exclude()` belong to `.extract()` and vice versa. * fix(docs): Grammatical error in Refinements (#4252) Correct grammatical error in Refinements * Improve handling of `.meta()`/`.describe()` in JSON Schema converter (#4255) * WIP * Big improvements to meta and describe handling * WIP * Lazy disc * Add cybozu * 0.9.0 * Feature Stainless * Edit alt text * doc: fixed missing comment in migration guide (#4293) * fix migration guide typo (#4291) * Add "zod-config" to ecosystem.tsx (v4 support via pre-release) (#4282) * Update ecosystem.tsx to add "zod-config" with v4 support via RC * fix(docs): Correct formatting in ecosystem.tsx for "zod-config" entry --------- Co-authored-by: Alexandre Marques <[email protected]> * docs: add support for `kubb` as part of the v4 upgrade (#4260) * Add methods to string formats (#4296) * 0.10.0 * Tweak * Tweak * z._default * Correct conditions for error in docs (#4312) - Make schema a strict object - Add extra key to induce error described later * fix vscode debug issue with tsx runtime (#4306) * Tweak default docs * correction in documentation (#4303) (zod example using @zod/mini import) * WIP * Make ulid case insensitive * v0.10.1 * Improve jsdoc * ULID * docs: in v4, `strict()` is not deprecated (#4298) * docs: in v4, `strict()` is not deprecated * Tweak --------- Co-authored-by: Colin McDonnell <[email protected]> * chore: add `orval` to XtoZod ecosystems in v4 (#4256) Co-authored-by: Colin McDonnell <[email protected]> * Add composable-functions as a library powered by Zod supporting v4 (#4261) * Add composable-functions as a library powered by Zod supporting v4 * docs: in v4, `strict()` is not deprecated (#4298) * docs: in v4, `strict()` is not deprecated * Tweak --------- Co-authored-by: Colin McDonnell <[email protected]> * chore: add `orval` to XtoZod ecosystems in v4 (#4256) Co-authored-by: Colin McDonnell <[email protected]> --------- Co-authored-by: Shodai Suzuki <[email protected]> Co-authored-by: Colin McDonnell <[email protected]> * Support recursive types in `z.object()`, drop `z..interface()` (#4271) * WIP * WIP * Add qin * WIP * Refactor object-like internals. use optionality in zodinterface shape. remove ?-prefixing for defaulted. handle optionals/defaults in json schema * WIP * WIP * Generics are working * WIP * WIP * Fix * Fix tests * Fix tests * WIP * WIP * Drop `z.interface()` from docs (#4316) * Drop interface * Format * Feature * Allow HH:MM format in `z.string().datetime()` and `z.string().time()` (#4315) * feat: allow omitting seconds in time string * docs: include examples of omitted seconds * docs: remove whitespace * 3.23.4 * V4(fix): generate json-schema with min/max(0) (#4267) * fix: generate number json schema * fix: generate json schema with min/max(0) * Apply suggestions from code review fix: format Co-authored-by: Anna Bocharova <[email protected]> --------- Co-authored-by: Panda <[email protected]> Co-authored-by: Anna Bocharova <[email protected]> * 0.11.1 * docs: added @regle/schemas to form ecosystem (#4169) * docs: added @regle/schemas to form ecosystem In my previous MR you said to edit `components/ecosystem.mdx` but couldn't find it, if it was a typo i guessed it was this file! 👍 * Add to ecosystem.tsx --------- Co-authored-by: Colin McDonnell <[email protected]> * Fix union inferred type issue * v0.11.2 * optionalObjectKeys -> optionalKeys * 0.11.3 * Add test for union types * Fix assignability * 0.11.4 * Add assignability tests * Stack trace in parse and parseAsync * Biome * Clean up code, fix lock * Document default changes * Clarify deprecations * Update changelog * v0.11.6. support recursive types in zodmini * Add recursive type tests for zod mini * Add recursive tests for zod mini * fix(core): use `Object.create(null)` to cache ids (#4359) * Jazz sponsorship * Update Speakeasy sponsor URL (#4337) * fix: use input, not output, for input of ZodUnionInternals (#4330) * Languages: Add Japanese language (#4170) * Add Japanese locale * format * fix(ja): Fixed comparison operator in error messages * Tweak --------- Co-authored-by: Colin McDonnell <[email protected]> * New parse signature * Fix parse functions * Add Jazz * Languages: Add Portuguese language (#4171) * Adding portuguese translations * Adding portuguese * Adding language to docs * Adding spanish language in docs * Tweak * Updating references from string to texto * Updating faixa to faixa de * Updating from elementos to itens * Mirroring validation from original file * Updating regex to padrao * Updating entrada by tipo * Replacing entrada by campo --------- Co-authored-by: Helmer <[email protected]> Co-authored-by: Colin McDonnell <[email protected]> * Languages: Add french language (#4172) * Adding french and exporting it * Adding french in docs * Update fr.ts Co-authored-by: Florian Lefebvre <[email protected]> * Translating datetime * Tweak * Update elements * Update packages/core/src/locales/fr.ts Co-authored-by: Fabrice Cipolla <[email protected]> --------- Co-authored-by: Helmer <[email protected]> Co-authored-by: Florian Lefebvre <[email protected]> Co-authored-by: Colin McDonnell <[email protected]> Co-authored-by: Fabrice Cipolla <[email protected]> * Languages: Add Arabic language (#4176) * feat(lang): Add Arabic locale support * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * remove period * fix: add space after comparison operator * feat(lang): Add Arabic locale support * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * Update packages/core/src/locales/ar.ts Co-authored-by: Abdullah Mohammed <[email protected]> * remove period * fix: add space after comparison operator * Tweak * Updated ar.ts with new edits discussed in #4176 * Update packages/core/src/locales/ar.ts * Update packages/core/src/locales/ar.ts * Update packages/core/src/locales/ar.ts * chore: format * fix: update translation for template_literal * fix: correct translation for invalid input error message * fix: spacing in error messages * fix: show correct prefix * fix: remove unused template literal * Update error-customization.mdx --------- Co-authored-by: Abdullah Mohammed <[email protected]> Co-authored-by: Colin McDonnell <[email protected]> Co-authored-by: Hosam Hamdy <[email protected]> * Languages: Add Hebrew language (#4183) * Create he.ts * Update locales.ts * Update error-customization.mdx * Tweak --------- Co-authored-by: Colin McDonnell <[email protected]> * Languages: add Polish 🇵🇱 language (#4184) * Languages: add polish language * Fix: apply formatting * Tweak * Fix: add missing fallbacks * Update packages/core/src/locales/pl.ts Co-authored-by: Marcel <[email protected]> * Update packages/core/src/locales/pl.ts Co-authored-by: Marcel <[email protected]> --------- Co-authored-by: Colin McDonnell <[email protected]> Co-authored-by: Marcel <[email protected]> * Languages: add Ukrainian language (#4185) * locale: add ukrainian language * Tweak --------- Co-authored-by: Colin McDonnell <[email protected]> * Languages: add Finnish language (#4188) * feat: add initial finnish translations * chore: add export and docs * Tweak * feat: add more translations for different data types * fix: lint errors * fix: map translation * feat: only handle used cases in TypeNames * refactor: pr comments * refactor: map translation * refactor: heavily simplify finnish translations * chore: use unioni instead of yhdiste Might be more commonly used (gut feeling). * style: remove unused imports --------- Co-authored-by: Colin McDonnell <[email protected]> * Languages: add Hungarian language (#4186) * add hungarian * Tweak --------- Co-authored-by: Colin McDonnell <[email protected]> * Add Simplified Chinese (#4189) * feat(lang): add Simplified Chinese * fix: locale * fix: space format * Tweak --------- Co-authored-by: Colin McDonnell <[email protected]> * feat(lang): add Vietnamese (vi) locale (#4191) * feat(lang): add Vietnamese (vi) locale * Tweak --------- Co-authored-by: Colin McDonnell <[email protected]> * Languages: add Czech language 🇨🇿 (#4192) * feat: add czech error locales * fix(locales): improve Czech error messages for clarity * Fmt * fix(locales): use correct string error prefix in error message For Czech language. Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix(locales): translate other data types as well For Czech language. Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix(locales): handle nullable variables in error messages For Czech langauge. --------- Co-authored-by: Colin McDonnell <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Languages: add italian language (#4194) * feat: added italian language * Fmt * Tweak --------- Co-authored-by: Colin McDonnell <[email protected]> * Languages: add Indonesia language (#4195) * Languages: add Bahasa Indonesia language * tweak * Tweak * Update packages/core/src/locales/id.ts Co-authored-by: Griko Nibras <[email protected]> * Update packages/core/src/locales/id.ts Co-authored-by: Griko Nibras <[email protected]> * Update packages/core/src/locales/id.ts Co-authored-by: Griko Nibras <[email protected]> * Update packages/core/src/locales/id.ts Co-authored-by: Griko Nibras <[email protected]> * Update packages/core/src/locales/id.ts Co-authored-by: Griko Nibras <[email protected]> --------- Co-authored-by: Colin McDonnell <[email protected]> Co-authored-by: Griko Nibras <[email protected]> * feat(lang): Added initial Turkish locale (#4196) * feat(lang): Added initial Turkish locale * fix(lang): Improve formatting in Turkish error messages * fix(lang): Update Turkish translations for various terms * fix(lang): Update Turkish translations for base64 and template literal terms * fix(lang): Correct Turkish error message for 'starts_with' format * test(lang): Add unit tests for Turkish locale parsing and validation * test(lang): Remove console log from Turkish locale test for cleaner output Co-authored-by: Mert Şişmanoğlu <[email protected]> * fix(lang): Correct variable reference in Turkish 'starts_with' error message Co-authored-by: Mert Şişmanoğlu <[email protected]> --------- Co-authored-by: Mert Şişmanoğlu <[email protected]> Co-authored-by: Colin McDonnell <[email protected]> * feat(locale): add russian language (#4197) * feat(locale): add russian language * updates * feat(locale): add Russian pluralization rules * fix: tests * fixes * fix(locale): correct error message for string format validation in Russian locale --------- Co-authored-by: Colin McDonnell <[email protected]> * feat(locale): add belarusian language (#4199) * feat(locale): add belarusian language * feat: add belarusian plurals support * fix(locale): correct Belarusian error message formatting for string validation --------- Co-authored-by: Colin McDonnell <[email protected]> * feat(lang): Add ota locale in Latin script (#4200) Co-authored-by: Colin McDonnell <[email protected]> * Languages: Add Korean language (#4206) * chore: run format * feat(locale): add Korean language --------- Co-authored-by: Colin McDonnell <[email protected]> * Languages: Add Farsi language (#4207) * feat(lang): add farsi language * fix: joinValues in invalid_value --------- Co-authored-by: Colin McDonnell <[email protected]> * feat(locale): Add Urdu language (#4208) * feat(locale): add urdu language * Fix formatting for ur.ts file * Fix formatting for ur.ts file --------- Co-authored-by: Colin McDonnell <[email protected]> * Add Macedonian locale support and update documentation (#4214) Co-authored-by: Antonio Ivanovski <[email protected]> Co-authored-by: Colin McDonnell <[email protected]> * Add-fr-ca-locale (#4218) * chore: Add .pnpm-store to .gitignore * chore: Add Canadian French locale support --------- Co-authored-by: Colin McDonnell <[email protected]> * feat(locale): add Traditional Chinese (#4226) * feat(locale): add Traditional Chinese * fix --------- Co-authored-by: Colin McDonnell <[email protected]> * feat(locale): Add Norwegian (#4229) * feat: added Norwegian (Bokmål) * fix: renamed locale to no + improved translations * fix: forgot to add the file to git... * fix: more accurate verb for collections * chore: removed commented out code * chore: ran linter * fix: minor tweaks to error messages * Update packages/core/src/locales/no.ts I agree, that's better! Co-authored-by: Steffen Holanger <[email protected]> --------- Co-authored-by: Magne Skutle <[email protected]> Co-authored-by: Steffen Holanger <[email protected]> Co-authored-by: Colin McDonnell <[email protected]> * feat(lang): Added initial Thai locale (#4230) * feat(lang): Added initial Thai locale * fix(lang): improve thai translation for clarify meaning --------- Co-authored-by: Colin McDonnell <[email protected]> * feat(locale): Add SL locale (#4231) Co-authored-by: Colin McDonnell <[email protected]> * feat(lang): Added initial `Tamil` locale (#4237) Co-authored-by: Colin McDonnell <[email protected]> * Languages: add German language (#4253) * feat(locales): add Catalan locale support and update documentation (#4287) Co-authored-by: Colin McDonnell <[email protected]> * Languages: Add Malay language (#4204) * feat(lang): add Malay support * chore: run format --------- Co-authored-by: Colin McDonnell <[email protected]> * Fix issue issue * Subclass Error * Update Error inheritance * Clean up Error inheritance * Fix prom test * Refactor: add subpath imports `zod/v4` (#4364) * Refactor to subpaths * Tweak * Roll back to tshy 1 * Use supershy * Lint * drop dryrun * Add root re-export * Add file * Update docs * Update guide * Docs and locales barrel file * Update announcement and changelog * Update anno * Add accordion * Fix readonly issue on zodminienum. Rename _getter to innerType on zodlazy * Fix diagonal enum issue * Improve `z.url()`: support `hostname` and `protocol` regexes (#4367) * Improve z.url(). Add support for hostname and protocol regexes * Add docs * Add z.core.$ZodBranded * Add jitless config flag (#4368) * Remove util.Exactly from zod-mini masks * Roll back never toJSONSchema * Update snaps * v4: set additionalProperties to false when catchall is never (#4365) * Document dropping of ctx.path in changelog * Remove z.core from zod/v4-mini * Add back z.core * Document .refine overload drop * Fix input type for ZodMiniDate * Add zodpipe mini test * Clean up params * Fix test * docs: escape `.` in the example regex for `z.url` with `hostname` (#4375) * Document moduleResolution * typo * Implement `z.prefault` (#4376) * WIP * Implement prefault * Document prefault * Add link to function workaround * Defer initialization to avoid crashes with z.lazy. Closes #4324. (#4377) * noPrecompilation -> jitless * Update ZodError section in changelog. Deprecate isOptional and isNullable * Return data on best-effort basis despite errors * Fix prefixIssues issue * Add fallback File interface * Add back formatError and flattenError functions * Allow generic on coerce functions (#4379) * Allow generic on coerce functions * Clean up * Add union values test * Add another lazy schema init test * Clean up * Add docs for recursive type debugging. * Update recursive type docs * F * Improve discriminateduion errors (#4384) * Remove abort property from ZodTransformDef. Add discriminator key to no_discriminator_found issue. * Clean up * Clean up Error inheritance * Remove examples from JSON Schema when io=input * `z.toJSONSchema`: Defer execution of `override`, improve ref handling (#4385) * Defer override execution * Improve refs in json schema. Cleanup. * Clean up * Clean up * Clean up enum input type * Improve base64 perf. Disallow padding in base64url. (#4386) * Improve base64 perf. Disallow padding in base64url * Allow empty base64 string * Allow empty base64 string * Clean up * Document base64url change * Tweak * Fix treeify error invalid_union handling * fix ensure catchValue is applied correctly on validation error (#4382) * Simplify object generics, add test for empty objects (#4387) * Simplify object generics. Add tests for empty object types. * Fix tests * Fix tests, rename pickomit * Fix typo in json-schema.mdx (#4380) * fix: use JSON.stringify to escape toDotPath keys w/ quotes (#4374) This should also correctly handle even weirder stuff like newlines in proeprty keys. JSON.stringify should do all the right escaping - if it's a valid JSON string, it's a valid key. Note: one existing test was updated: ``` expect(z.core.toDotPath(["data[0]", "value"])).toMatchInlineSnapshot(`"data[0].value"`); // <- before expect(z.core.toDotPath(["data[0]", "value"])).toMatchInlineSnapshot(`"["data[0]"].value"`); // <- after ``` This looks correct to me? Previously it was implying a shape of `{data: [{value: '...'}]}` when actually it should be a shape of `{'data[0]': {value: '...'}}` (updated 12:30) Co-authored-by: Misha Kaletsky <[email protected]> * Improve min/max in JSON Schema (#4388) * Add types for bag. Fix setting of min/max in json schema * Fix minValue/maxValue * Improve number tests * Trim * Remove type on base class * Fix err * Mark internals * Remove partial record accordion * Update ecosystem * Add reference to instanceof Class * Add JSON Schema (#4390) * Update prefault changelog * Lazy initialization in union and discunion * Clean up util * Fix override execution order * Add test for override execution order * Preserve shape key ordering in result (#4396) * Clean up object parser * Fix discriminated union * Add disc union test * Fix inheritance on ZodDiscriminatedUnion * Document metadata inheritance * Metadata inherited across clones (#4401) * Add back discriminator to `z.discriminatedUnion()` API (#4402) * WIP * Add back discriminator, add benchmark * Update docs * Play * Add disc union test, improve docs * chore: add oRPC to the API Libraries ecosystem (#4349) oRPC 1.2.0 has full support for Zod 4, from validation to OpenAPI spec generation Co-authored-by: Colin McDonnell <[email protected]> * Update benchmark * [v3] Allow missing `type` in JWT (#4404) * WIP * Improve JWT tests * Implement pipe optionality. Drop `._zod.optionality` in favor of `._zod.optin` and `._zod.optout`. (#4405) * Implement pipe optionalty. Switch to optin and optout * Clean up * Redirect * WIP * Page events * Move up sponsors * Try scroller * Suspense * No animation * Add redirects * Remove logs * Add Juno (new silver sponsor) (#4408) * Add Juno (new silver sponsor) * chore: redo * chore: redo * Add redirects * WIP * Audit redirects * Tweak * v4: Doc updates for release (#4409) * v4 release updates * Tweak * REmove banners * Add tabs * Update intro * Zod 4 * Fix lint * Simplify readme * Simplify readme * Simplify readme * Simplify readme --------- Co-authored-by: Chingiz Mammadov <[email protected]> Co-authored-by: Henrikh Kantuni <[email protected]> Co-authored-by: Shivam Vijaywargi <[email protected]> Co-authored-by: Abdalrhman Almarakeby <[email protected]> Co-authored-by: Mateusz Burzyński <[email protected]> Co-authored-by: Anders Hejlsberg <[email protected]> Co-authored-by: Andrii Andreichenko <[email protected]> Co-authored-by: Mohammed Alaa Alhaj <[email protected]> Co-authored-by: Jonathan Waltz <[email protected]> Co-authored-by: Ernest <[email protected]> Co-authored-by: Juan Giordana <[email protected]> Co-authored-by: Anna Bocharova <[email protected]> Co-authored-by: xcfox <[email protected]> Co-authored-by: Shodai Suzuki <[email protected]> Co-authored-by: Dan Michael O. Heggø <[email protected]> Co-authored-by: Alexandre Marques <[email protected]> Co-authored-by: Alexandre Marques <[email protected]> Co-authored-by: Stijn Van Hulle <[email protected]> Co-authored-by: George Kormaris <[email protected]> Co-authored-by: Lakshan Perera <[email protected]> Co-authored-by: Kevin Damm <[email protected]> Co-authored-by: Guga Guichard <[email protected]> Co-authored-by: Timothy Ng <[email protected]> Co-authored-by: Panda <[email protected]> Co-authored-by: Panda <[email protected]> Co-authored-by: Victor Garcia <[email protected]> Co-authored-by: andrew jarrett <[email protected]> Co-authored-by: Nolan Di Mare Sullivan <[email protected]> Co-authored-by: Rik Brown <[email protected]> Co-authored-by: Kio Yoshimatsu <[email protected]> Co-authored-by: Helmer <[email protected]> Co-authored-by: Helmer <[email protected]> Co-authored-by: Florian Lefebvre <[email protected]> Co-authored-by: Fabrice Cipolla <[email protected]> Co-authored-by: Abdullah Mohammed <[email protected]> Co-authored-by: Hosam Hamdy <[email protected]> Co-authored-by: Shachar Zidon <[email protected]> Co-authored-by: Bartosz Szar <[email protected]> Co-authored-by: Marcel <[email protected]> Co-authored-by: Dmytro Dobrovolskyi <[email protected]> Co-authored-by: Henri Södergård <[email protected]> Co-authored-by: Lőrik Levente <[email protected]> Co-authored-by: GrahamQuan <[email protected]> Co-authored-by: Nguyễn Hoàng Trung <[email protected]> Co-authored-by: Filip Ditrich <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Davide Lombardi <[email protected]> Co-authored-by: Krisna Wijaya <[email protected]> Co-authored-by: Griko Nibras <[email protected]> Co-authored-by: Özgür ÖZALP <[email protected]> Co-authored-by: Mert Şişmanoğlu <[email protected]> Co-authored-by: Vlad Sazonau <[email protected]> Co-authored-by: KadimElifba <[email protected]> Co-authored-by: Lee Keun Hwee <[email protected]> Co-authored-by: Mojtaba <[email protected]> Co-authored-by: Asharib Ali <[email protected]> Co-authored-by: Antonio <[email protected]> Co-authored-by: Antonio Ivanovski <[email protected]> Co-authored-by: Sofiane <[email protected]> Co-authored-by: Jie Peng <[email protected]> Co-authored-by: Magne Skutle <[email protected]> Co-authored-by: Magne Skutle <[email protected]> Co-authored-by: Steffen Holanger <[email protected]> Co-authored-by: Thada Wangthammang <[email protected]> Co-authored-by: Tadej Polajnar <[email protected]> Co-authored-by: Sasivarnan R <[email protected]> Co-authored-by: Simon Legner <[email protected]> Co-authored-by: Pere Montpeó <[email protected]> Co-authored-by: Khairul Haziq <[email protected]> Co-authored-by: Jacques <[email protected]> Co-authored-by: Loris Sigrist <[email protected]> Co-authored-by: chimame <[email protected]> Co-authored-by: Fabian Hiller <[email protected]> Co-authored-by: Misha Kaletsky <[email protected]> Co-authored-by: Misha Kaletsky <[email protected]> Co-authored-by: unnoq <[email protected]> Co-authored-by: David Dal Busco <[email protected]>
Closes #4358
Related to #4357
Colin when you see this, will you point me to where I should write tests that confirm the fix?
I didn't see any in
core/tests, but can confirm this fixed the issue for me locally (for #4358, have not tested #4357)Summary by CodeRabbit
New Features
.jwt(),.xid(),.ksuid(),.e164()..unique()method for array schemas to ensure uniqueness.z.string().json()for parsing and validating JSON strings.z.file()schema for browser file validation with methods for size, type, and filename checks.z.literal.template()for template literal type schemas.Documentation
Chores
Bug Fixes
Refactor
ZodEffectstoZodTransformfor accuracy.Revert
Style