Skip to content

Add-fr-ca-locale #4218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 13, 2025
Merged

Add-fr-ca-locale #4218

merged 3 commits into from
May 13, 2025

Conversation

sohocine
Copy link
Contributor

@sohocine sohocine commented Apr 17, 2025

Added initial Canadian French locale.

Summary by CodeRabbit

  • New Features

    • Added new string validation methods: .jwt(), .xid(), .ksuid(), .e164(), and .json(schema) for enhanced string schema validation.
    • Introduced .unique() method for array schemas to enforce uniqueness.
    • Added file validation support with z.file() and related methods for browser environments.
    • Added support for template literal schemas via z.literal.template().
  • Documentation

    • Updated and expanded documentation for new methods, features, and usage examples.
    • Added details on locale-specific error maps and clarified error code documentation.
    • Updated migration and contributing guides to reflect new tooling and terminology.
    • Improved and reorganized README content, including new sponsor tiers and table of contents entries.
  • Chores

    • Migrated project tooling from Yarn/Jest to pnpm/Vitest and updated configuration files accordingly.
    • Added and updated configuration files for formatting, linting, editor settings, and CI workflows.
    • Removed obsolete configuration, test, benchmark, and documentation files to streamline the codebase.
  • Style

    • Updated formatting and indentation in configuration files for consistency.
  • Bug Fixes

    • Corrected type annotations, terminology, and minor documentation errors.
  • Refactor

    • Renamed ZodEffects to ZodTransform for improved clarity and consistency.

Copy link
Contributor

coderabbitai bot commented Apr 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This update introduces significant changes to project configuration, documentation, and tooling. It adds new configuration files for Changesets, Rollup, TypeScript, Biome, VSCode, and npm, while removing many legacy configuration files for Babel, Jest, SWC, and Vitest. The project migrates from Yarn to pnpm as the primary package manager, with corresponding updates in documentation, devcontainer, and Git hooks. GitHub Actions workflows are revised to use pnpm and reflect branch renames. The README is extensively updated with new features, schema methods, and clarifications, while references to ZodEffects are replaced with ZodTransform. Numerous test files, benchmarks, and Deno-related scripts are removed, streamlining the codebase and focusing on core functionality.

Changes

File(s) / Path(s) Change Summary
.changeset/README.md, .changeset/config.json Added README and config for Changesets, documenting purpose and configuration for versioning and publishing.
.configs/rollup.config.js, .configs/tsconfig.base.json Added new Rollup and TypeScript base configuration files for bundling and compiling TypeScript projects.
.dependency-cruiser.js, .eslintrc.js, CHANGELOG.md, deno-build.mjs, deno/lib/README.md, Deleted Dependency Cruiser, ESLint, and changelog files, along with Deno build scripts and documentation, removing legacy configuration and documentation artifacts.
deno/lib/ZodError.ts, deno/lib/errors.ts, deno/lib/external.ts Removed core error handling, error mapping, and external re-export modules from Deno source.
.devcontainer/devcontainer.json, .husky/pre-commit, .husky/pre-push Updated devcontainer and Git hooks to use pnpm instead of Yarn, simplified pre-commit and pre-push scripts.
.github/pull_request_template.md, .github/workflows/release-beta.yaml, .github/workflows/release-canary.yml, .github/workflows/release.yml, .github/workflows/test.yml Updated PR template for branch guidance, added beta release workflow, modified release and test workflows to use pnpm, updated branch triggers, and commented out/deactivated certain publishing steps.
.gitignore Updated ignore patterns to reflect new directories, remove old exclusions, and add new build and workspace-related files.
.npmrc, .nvmrc, .prettierrc.yaml, .vscode/launch.json, .vscode/settings.json Added npm, Node version, Prettier, and VSCode configuration files for workspace, formatting, and debugging.
CONTRIBUTING.md, ERROR_HANDLING.md, LICENSE, MIGRATION.md, README.md, README_ZH.md Updated contributing, error handling, license, migration, and main/readme documentation to reflect toolchain changes, new features, updated methods, and terminology (e.g., ZodTransform replacing ZodEffects).
biome.jsonc Added Biome configuration for formatting, linting, and file ignoring.
configs/babel-jest.config.json, configs/babel.config.js, configs/jest.config.json, configs/rollup.config.js, configs/swc-jest.config.json, configs/ts-jest.config.json, configs/tsconfig.base.json, configs/tsconfig.cjs.json, configs/tsconfig.esm.json, configs/tsconfig.test.json, configs/tsconfig.types.json, configs/vitest.config.ts Removed all legacy Babel, Jest, SWC, Rollup, and TypeScript configuration files, as well as Vitest config, reflecting a tooling and build system overhaul.
deno/lib/__tests__/*, deno/lib/benchmarks/* Deleted all Deno test and benchmark files, removing extensive test coverage and performance suites for various schema types and validation scenarios.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant CI as GitHub Actions
    participant PNPM as pnpm
    participant Changesets as Changesets CLI

    Dev->>CI: Pushes code to main/v4 branch
    CI->>PNPM: Installs dependencies
    CI->>PNPM: Runs tests, format, lint (via pnpm)
    CI->>Changesets: Generates changelogs/releases (if configured)
    CI->>CI: Publishes beta or canary (if on correct branch and enabled)
Loading

Possibly related PRs

  • colinhacks/zod#4080: Implements CIDR validation, removes .and() method, and updates related documentation and tests—directly overlapping in code-level changes and feature scope.

Poem

🎉
Out with the old, in with the new,
pnpm’s the boss, and Yarn is through!
Docs refreshed, configs aligned,
Zod’s now sleeker, more refined.
Tests and scripts, we trimmed the fat,
Here’s to a codebase lean and phat!
🚀


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Apr 17, 2025

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 62fa326
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/68011a1fb0c6d90008b6b397
😎 Deploy Preview https://deploy-preview-4218--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 18

🔭 Outside diff range comments (2)
.changeset/README.md (1)

1-9: 🧹 Nitpick (assertive)

Add usage examples for Changesets.
The new README gives a good intro, but consider adding concise sections on "Creating your first Changeset" and "Publishing a Release" so contributors know the full flow.

.github/workflows/release-canary.yml (1)

23-50: 🧹 Nitpick (assertive)

Consider removing or archiving commented steps
You’ve commented out the build and publish steps, which is probably intentional, but leftover commented blocks can get noisy over time. You might archive or document why they’re disabled—or remove them entirely if this workflow is deprecated.

♻️ Duplicate comments (1)
.github/workflows/test.yml (1)

42-45: Same advice applies here
The lint job’s pnpm install could also benefit from caching or lockfile enforcement—same suggestion as for the test job above.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a18d25b and 62fa326.

⛔ Files ignored due to path filters (33)
  • logo/Logo Black.jpg is excluded by !**/*.jpg
  • logo/Logo Black.pdf is excluded by !**/*.pdf
  • logo/Logo Black.png is excluded by !**/*.png
  • logo/Logo Outer Glow.jpg is excluded by !**/*.jpg
  • logo/Logo Outer Glow.pdf is excluded by !**/*.pdf
  • logo/Logo Outer Glow.png is excluded by !**/*.png
  • logo/Logo White.jpg is excluded by !**/*.jpg
  • logo/Logo White.pdf is excluded by !**/*.pdf
  • logo/Logo White.png is excluded by !**/*.png
  • logo/Logo.jpg is excluded by !**/*.jpg
  • logo/Logo.pdf is excluded by !**/*.pdf
  • logo/Logo.png is excluded by !**/*.png
  • packages/docs/app/apple-icon.png is excluded by !**/*.png
  • packages/docs/app/icon.png is excluded by !**/*.png
  • packages/docs/app/logo.ico is excluded by !**/*.ico
  • packages/docs/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • packages/docs/public/github-white.png is excluded by !**/*.png
  • packages/docs/public/logo/logo-black.jpg is excluded by !**/*.jpg
  • packages/docs/public/logo/logo-black.pdf is excluded by !**/*.pdf
  • packages/docs/public/logo/logo-black.png is excluded by !**/*.png
  • packages/docs/public/logo/logo-glow.jpg is excluded by !**/*.jpg
  • packages/docs/public/logo/logo-glow.pdf is excluded by !**/*.pdf
  • packages/docs/public/logo/logo-glow.png is excluded by !**/*.png
  • packages/docs/public/logo/logo-white.jpg is excluded by !**/*.jpg
  • packages/docs/public/logo/logo-white.pdf is excluded by !**/*.pdf
  • packages/docs/public/logo/logo-white.png is excluded by !**/*.png
  • packages/docs/public/logo/logo.jpg is excluded by !**/*.jpg
  • packages/docs/public/logo/logo.pdf is excluded by !**/*.pdf
  • packages/docs/public/logo/logo.png is excluded by !**/*.png
  • packages/docs/public/logo/logo.svg is excluded by !**/*.svg
  • packages/docs/public/logo/logo_square.png is excluded by !**/*.png
  • packages/docs/public/logo/profile_circle.png is excluded by !**/*.png
  • packages/docs/public/logo/profile_square.png is excluded by !**/*.png
📒 Files selected for processing (107)
  • .changeset/README.md (1 hunks)
  • .changeset/config.json (1 hunks)
  • .configs/rollup.config.js (1 hunks)
  • .configs/tsconfig.base.json (1 hunks)
  • .dependency-cruiser.js (0 hunks)
  • .devcontainer/devcontainer.json (1 hunks)
  • .eslintrc.js (0 hunks)
  • .github/pull_request_template.md (1 hunks)
  • .github/workflows/release-beta.yaml (1 hunks)
  • .github/workflows/release-canary.yml (2 hunks)
  • .github/workflows/release.yml (2 hunks)
  • .github/workflows/test.yml (2 hunks)
  • .gitignore (1 hunks)
  • .husky/pre-commit (1 hunks)
  • .husky/pre-push (1 hunks)
  • .npmrc (1 hunks)
  • .nvmrc (1 hunks)
  • .prettierrc.yaml (1 hunks)
  • .vscode/launch.json (1 hunks)
  • .vscode/settings.json (1 hunks)
  • CHANGELOG.md (0 hunks)
  • CONTRIBUTING.md (2 hunks)
  • ERROR_HANDLING.md (2 hunks)
  • LICENSE (1 hunks)
  • MIGRATION.md (1 hunks)
  • README.md (18 hunks)
  • README_ZH.md (4 hunks)
  • biome.jsonc (1 hunks)
  • configs/babel-jest.config.json (0 hunks)
  • configs/babel.config.js (0 hunks)
  • configs/jest.config.json (0 hunks)
  • configs/rollup.config.js (0 hunks)
  • configs/swc-jest.config.json (0 hunks)
  • configs/ts-jest.config.json (0 hunks)
  • configs/tsconfig.base.json (0 hunks)
  • configs/tsconfig.cjs.json (0 hunks)
  • configs/tsconfig.esm.json (0 hunks)
  • configs/tsconfig.test.json (0 hunks)
  • configs/tsconfig.types.json (0 hunks)
  • configs/vitest.config.ts (0 hunks)
  • deno-build.mjs (0 hunks)
  • deno/lib/README.md (0 hunks)
  • deno/lib/ZodError.ts (0 hunks)
  • deno/lib/__tests__/Mocker.ts (0 hunks)
  • deno/lib/__tests__/all-errors.test.ts (0 hunks)
  • deno/lib/__tests__/anyunknown.test.ts (0 hunks)
  • deno/lib/__tests__/array.test.ts (0 hunks)
  • deno/lib/__tests__/async-parsing.test.ts (0 hunks)
  • deno/lib/__tests__/async-refinements.test.ts (0 hunks)
  • deno/lib/__tests__/base.test.ts (0 hunks)
  • deno/lib/__tests__/bigint.test.ts (0 hunks)
  • deno/lib/__tests__/branded.test.ts (0 hunks)
  • deno/lib/__tests__/complex.test.ts (0 hunks)
  • deno/lib/__tests__/crazySchema.ts (0 hunks)
  • deno/lib/__tests__/custom.test.ts (0 hunks)
  • deno/lib/__tests__/date.test.ts (0 hunks)
  • deno/lib/__tests__/deepmasking.test.ts (0 hunks)
  • deno/lib/__tests__/default.test.ts (0 hunks)
  • deno/lib/__tests__/description.test.ts (0 hunks)
  • deno/lib/__tests__/discriminated-unions.test.ts (0 hunks)
  • deno/lib/__tests__/enum.test.ts (0 hunks)
  • deno/lib/__tests__/error.test.ts (0 hunks)
  • deno/lib/__tests__/firstparty.test.ts (0 hunks)
  • deno/lib/__tests__/firstpartyschematypes.test.ts (0 hunks)
  • deno/lib/__tests__/function.test.ts (0 hunks)
  • deno/lib/__tests__/generics.test.ts (0 hunks)
  • deno/lib/__tests__/instanceof.test.ts (0 hunks)
  • deno/lib/__tests__/intersection.test.ts (0 hunks)
  • deno/lib/__tests__/literal.test.ts (0 hunks)
  • deno/lib/__tests__/map.test.ts (0 hunks)
  • deno/lib/__tests__/masking.test.ts (0 hunks)
  • deno/lib/__tests__/mocker.test.ts (0 hunks)
  • deno/lib/__tests__/nan.test.ts (0 hunks)
  • deno/lib/__tests__/nativeEnum.test.ts (0 hunks)
  • deno/lib/__tests__/nullable.test.ts (0 hunks)
  • deno/lib/__tests__/number.test.ts (0 hunks)
  • deno/lib/__tests__/object-augmentation.test.ts (0 hunks)
  • deno/lib/__tests__/object.test.ts (0 hunks)
  • deno/lib/__tests__/optional.test.ts (0 hunks)
  • deno/lib/__tests__/parseUtil.test.ts (0 hunks)
  • deno/lib/__tests__/parser.test.ts (0 hunks)
  • deno/lib/__tests__/partials.test.ts (0 hunks)
  • deno/lib/__tests__/pipeline.test.ts (0 hunks)
  • deno/lib/__tests__/preprocess.test.ts (0 hunks)
  • deno/lib/__tests__/primitive.test.ts (0 hunks)
  • deno/lib/__tests__/promise.test.ts (0 hunks)
  • deno/lib/__tests__/readonly.test.ts (0 hunks)
  • deno/lib/__tests__/record.test.ts (0 hunks)
  • deno/lib/__tests__/recursive.test.ts (0 hunks)
  • deno/lib/__tests__/refine.test.ts (0 hunks)
  • deno/lib/__tests__/safeparse.test.ts (0 hunks)
  • deno/lib/__tests__/set.test.ts (0 hunks)
  • deno/lib/__tests__/tuple.test.ts (0 hunks)
  • deno/lib/__tests__/unions.test.ts (0 hunks)
  • deno/lib/__tests__/validations.test.ts (0 hunks)
  • deno/lib/__tests__/void.test.ts (0 hunks)
  • deno/lib/benchmarks/datetime.ts (0 hunks)
  • deno/lib/benchmarks/discriminatedUnion.ts (0 hunks)
  • deno/lib/benchmarks/index.ts (0 hunks)
  • deno/lib/benchmarks/ipv4.ts (0 hunks)
  • deno/lib/benchmarks/object.ts (0 hunks)
  • deno/lib/benchmarks/primitives.ts (0 hunks)
  • deno/lib/benchmarks/realworld.ts (0 hunks)
  • deno/lib/benchmarks/string.ts (0 hunks)
  • deno/lib/benchmarks/union.ts (0 hunks)
  • deno/lib/errors.ts (0 hunks)
  • deno/lib/external.ts (0 hunks)
⛔ Files not processed due to max files limit (65)
  • deno/lib/helpers/enumUtil.ts
  • deno/lib/helpers/errorUtil.ts
  • deno/lib/helpers/parseUtil.ts
  • deno/lib/helpers/partialUtil.ts
  • deno/lib/helpers/typeAliases.ts
  • deno/lib/helpers/util.ts
  • deno/lib/index.ts
  • deno/lib/locales/en.ts
  • deno/lib/mod.ts
  • index.d.ts
  • jest.config.json
  • lerna.json
  • package.json
  • packages/bench/_temp.ts
  • packages/bench/ab-parse-array.ts
  • packages/bench/ab-parse-checks.ts
  • packages/bench/ab-parse-object.ts
  • packages/bench/ab-parse-record.js
  • packages/bench/ab-parse-string.ts
  • packages/bench/ab-parse-uuid.js
  • packages/bench/array.ts
  • packages/bench/benchUtil.ts
  • packages/bench/boolean.ts
  • packages/bench/check-runner.ts
  • packages/bench/datetime-regex.ts
  • packages/bench/datetime.ts
  • packages/bench/discriminated-union.ts
  • packages/bench/fast-parse-object.ts
  • packages/bench/fast-parse-string.ts
  • packages/bench/index.ts
  • packages/bench/instanceof.ts
  • packages/bench/ipv4-regex.ts
  • packages/bench/key-iteration.ts
  • packages/bench/lazy-box.ts
  • packages/bench/libs.ts
  • packages/bench/metabench.ts
  • packages/bench/number.ts
  • packages/bench/object-async.ts
  • packages/bench/object-creation.ts
  • packages/bench/object-fail.ts
  • packages/bench/object-moltar.ts
  • packages/bench/object-safe.ts
  • packages/bench/object-safeasync.ts
  • packages/bench/object-setup.ts
  • packages/bench/object.ts
  • packages/bench/package.json
  • packages/bench/paths.ts
  • packages/bench/property-access.ts
  • packages/bench/safe.ts
  • packages/bench/string-old.ts
  • packages/bench/string.ts
  • packages/bench/string_instantiations.ts
  • packages/bench/string_parse.ts
  • packages/bench/tsconfig.bench.json
  • packages/bench/union.ts
  • packages/bench/zodbench.ts
  • packages/core/LICENSE
  • packages/core/bump.ts
  • packages/core/jsr.json
  • packages/core/package.json
  • packages/core/src/api.ts
  • packages/core/src/checks.ts
  • packages/core/src/config.ts
  • packages/core/src/core.ts
  • packages/core/src/doc.ts
💤 Files with no reviewable changes (82)
  • configs/tsconfig.cjs.json
  • deno/lib/tests/void.test.ts
  • configs/tsconfig.esm.json
  • deno/lib/tests/description.test.ts
  • configs/tsconfig.types.json
  • deno/lib/tests/firstparty.test.ts
  • deno/lib/tests/date.test.ts
  • configs/tsconfig.base.json
  • deno/lib/tests/complex.test.ts
  • configs/jest.config.json
  • deno/lib/tests/custom.test.ts
  • deno/lib/external.ts
  • configs/tsconfig.test.json
  • deno/lib/tests/object-augmentation.test.ts
  • configs/babel-jest.config.json
  • deno/lib/tests/unions.test.ts
  • deno/lib/tests/parseUtil.test.ts
  • deno/lib/benchmarks/ipv4.ts
  • deno/lib/tests/safeparse.test.ts
  • deno/lib/tests/tuple.test.ts
  • configs/babel.config.js
  • deno/lib/tests/function.test.ts
  • deno/lib/tests/nullable.test.ts
  • configs/vitest.config.ts
  • deno/lib/tests/optional.test.ts
  • deno/lib/tests/firstpartyschematypes.test.ts
  • deno/lib/tests/nativeEnum.test.ts
  • deno/lib/tests/masking.test.ts
  • configs/rollup.config.js
  • configs/swc-jest.config.json
  • deno/lib/tests/generics.test.ts
  • deno/lib/tests/nan.test.ts
  • deno/lib/tests/base.test.ts
  • deno/lib/tests/preprocess.test.ts
  • deno/lib/errors.ts
  • deno/lib/benchmarks/object.ts
  • deno/lib/tests/validations.test.ts
  • deno/lib/tests/deepmasking.test.ts
  • deno/lib/benchmarks/index.ts
  • deno/lib/tests/async-parsing.test.ts
  • CHANGELOG.md
  • deno/lib/tests/array.test.ts
  • deno/lib/tests/default.test.ts
  • deno/lib/benchmarks/realworld.ts
  • deno/lib/tests/Mocker.ts
  • deno/lib/tests/map.test.ts
  • deno-build.mjs
  • deno/lib/tests/intersection.test.ts
  • deno/lib/tests/all-errors.test.ts
  • deno/lib/tests/recursive.test.ts
  • deno/lib/tests/instanceof.test.ts
  • deno/lib/tests/discriminated-unions.test.ts
  • configs/ts-jest.config.json
  • deno/lib/benchmarks/discriminatedUnion.ts
  • .eslintrc.js
  • deno/lib/tests/mocker.test.ts
  • deno/lib/tests/anyunknown.test.ts
  • deno/lib/benchmarks/primitives.ts
  • deno/lib/tests/record.test.ts
  • deno/lib/tests/set.test.ts
  • deno/lib/tests/error.test.ts
  • deno/lib/tests/primitive.test.ts
  • deno/lib/tests/partials.test.ts
  • deno/lib/tests/bigint.test.ts
  • .dependency-cruiser.js
  • deno/lib/tests/parser.test.ts
  • deno/lib/tests/enum.test.ts
  • deno/lib/benchmarks/union.ts
  • deno/lib/benchmarks/string.ts
  • deno/lib/tests/promise.test.ts
  • deno/lib/tests/branded.test.ts
  • deno/lib/tests/refine.test.ts
  • deno/lib/tests/crazySchema.ts
  • deno/lib/benchmarks/datetime.ts
  • deno/lib/tests/literal.test.ts
  • deno/lib/tests/async-refinements.test.ts
  • deno/lib/tests/readonly.test.ts
  • deno/lib/tests/object.test.ts
  • deno/lib/tests/number.test.ts
  • deno/lib/tests/pipeline.test.ts
  • deno/lib/ZodError.ts
  • deno/lib/README.md
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/release.yml

[error] 22-22: trailing spaces

(trailing-spaces)


[error] 51-51: trailing spaces

(trailing-spaces)

.github/workflows/release-beta.yaml

[warning] 4-4: truthy value should be one of [false, true]

(truthy)


[error] 21-21: trailing spaces

(trailing-spaces)


[error] 26-26: trailing spaces

(trailing-spaces)


[error] 32-32: trailing spaces

(trailing-spaces)

🪛 LanguageTool
ERROR_HANDLING.md

[style] ~57-~57: As a shorter alternative for ‘able to’, consider using “can”.
Context: ...hrow issues of any ZodIssueCode). You are able to pass in a params object here that is ...

(BE_ABLE_TO)

🪛 markdownlint-cli2 (0.17.2)
README.md

117-117: Link fragments should be valid
Expected: #zodtype-with-zodtransform; Actual: #zodtype-with-ZodTransform

(MD051, link-fragments)

🔇 Additional comments (44)
LICENSE (1)

3-3: Nice catch: bumped the copyright year to 2025
Keeping the license header up-to-date is important—this looks all good.

ERROR_HANDLING.md (4)

43-55: Table formatting and existing entries look solid 👍

The markdown table header and alignment are clear, and all pre-existing error code entries are accurately documented and well formatted.


56-56: New invalid_intersection_types entry is spot‑on

The addition of ZodIssueCode.invalid_intersection_types with its mergeErrorPath field and description matches the implementation and reads correctly.


188-189: Kudos on the new "Locales" section

Introducing a dedicated "Locales" section is a great way to document how to plug in language‑specific error maps.


192-197: Code snippet for locale import looks good

The TypeScript example showing import errorMap from "zod/locales/fa.js"; and z.setErrorMap(errorMap); correctly demonstrates how to apply a locale‑specific map.

.prettierrc.yaml (1)

6-6: Ensure support for experimental ternaries.
Turning on experimentalTernaries is neat, but since it’s still experimental, double‑check that your formatter (Biome, IDE, etc.) and the rest of the team have enabled and agreed on using this option.

.changeset/config.json (1)

1-11: Changesets configuration looks solid.
The .changeset/config.json correctly references the v3 schema, disables automatic commits, and scopes internal dependency bumps to patch versions. Everything aligns with the new release workflow.

MIGRATION.md (1)

59-59: Docs updated to reflect ZodTransform.
Replacing ZodEffects with ZodTransform here keeps the migration guide in sync with the updated class name used throughout the docs.

README_ZH.md (2)

1250-1250: Corrected to use z.ZodType.
Updating the cast from z.ZodSchema<Category> to z.ZodType<Category> aligns with the upstream API and matches the English docs.


1303-1305: Apply z.ZodType<Json> for JSON schema.
Switching the JSON schema declaration to z.ZodType<Json> maintains consistency with transform/refinement terminology.

.npmrc (1)

1-4: npm workspace config looks solid
Enabling link-workspace-packages with hoisting off fits the pnpm monorepo vibe, and leaving prefer-workspace-packages commented out keeps things flexible.

.configs/tsconfig.base.json (2)

3-7: Nice TS compile target and module setup
Targeting ES2020 with NodeNext resolution and jsx: react aligns nicely with modern ESM + React workflows.


25-33: Looks good: decorators & custom conditions
Keeping comments, enabling decorators/metadata, and adding @zod/source for conditional builds all make sense for your setup.

.vscode/settings.json (3)

2-4: TS server diagnostics on point
Enabling validation and experimental project diagnostics will catch type issues early—definitely a win.


5-11: Biome formatting setup
Auto-format on save + organizing imports via Biome is chill, but double‑check that everyone pulls in the biomejs.biome extension in their devcontainer or recommendations.


12-23: Clean up clutter with excludes
Hiding build outputs (.tshy-build, dist, lib) while exposing scratch works nicely, and disabling indentation guides if that’s your jam is all good.

.vscode/launch.json (2)

8-19: Node debug config looks solid
Using --experimental-strip-types keeps things lightweight and skipping internals cleans up the stack trace—nice.


23-52: tsx debug config is chill
Excluding node_modules and internals will make stepping through your own code way smoother.

.configs/rollup.config.js (2)

1-4: Rollup plugin imports are on point
You've got resolve, commonjs, TypeScript, and filesize plugins—just what you need to bundle TS.


7-13: Scratch input/output paths
Using ./scratch/input.ts & ./scratch/out_rollup.js hints this is experimental. For production builds you might swap in your real entry points.

biome.jsonc (1)

1-76: Solid Biome config, looks good to go!

Nice work setting up Biome with a comprehensive configuration. The formatter and linter settings look well thought out, especially:

  • The 120 character line width (much more practical than 80)
  • The clear comments explaining why certain rules are disabled
  • Smart handling of trailing commas (ES5 for JS, none for JSON)
  • Properly configured error levels (errors for unused imports, warnings for unused variables)

The ignored directories list is comprehensive too, covering all the standard build outputs and dependency folders.

README.md (14)

57-57: Nice job adding the Copper sponsorship tier!

Makes sense to acknowledge these contributors in the documentation.


80-80: Good addition with the JSON section in the TOC

This links to the new JSON functionality you're documenting later in the file.


107-107: Great addition with the .unique method for arrays

Adding this to the TOC ensures users can find this functionality.


123-123: Good addition of the Template Literals section

This is a useful feature to document in the TOC.


630-632: Nice addition of JWT validation methods

The JWT validation capabilities will be very helpful for API authentication scenarios.


637-639: Good job adding xid and ksuid validation

These are useful additions for modern ID formats.


656-657: E.164 phone number validation is a great addition

This will be very helpful for validating international phone numbers.


792-843: Great addition of JSON validation documentation

This section clearly explains how to use the new .json() method to parse JSON strings and validate the parsed result. The error handling example is particularly helpful.


969-1004: Excellent documentation for the new File validation feature

The section on File validation is well-written and includes good examples of all the capabilities like min/max size, accept types, and filename validation.


1506-1516: Nice documentation for the new .unique() array method

The examples showing both simple uniqueness and uniqueness based on a property identifier are clear and helpful.


1967-2085: Great new section on Template Literals

This is a thorough explanation of how to use template literals in Zod, with clear examples that show the different use cases.


2098-2098: Updated terminology from ZodEffects to ZodTransform

This line reflects the renamed internal class, matching the update in line 117 and other places.


2702-2711: Updated return type for pipe() method

Changed from ZodPipeline to ZodPipe, maintaining consistency with the other terminology updates.


2820-2822: Improved type constraint for generic functions

The change from z.ZodTypeAny to z.ZodType in function signatures will improve TypeScript type inference. The expanded explanation about inference limitations is helpful.

Also applies to: 2833-2848

.nvmrc (1)

1-2: Node 22 is a good choice

Setting the Node.js version to 22 is a solid choice for modern development.

.husky/pre-push (1)

4-4: Updated test command to use pnpm

Replacing yarn with pnpm for the test command aligns with the project's package manager migration.

.husky/pre-commit (1)

4-4: Simplified pre-commit hook with verbose lint-staging

Removed the Deno-related commands and added the --verbose flag to lint-staged for better debugging. This aligns with the project's move away from Deno support.

.devcontainer/devcontainer.json (1)

15-15: Switched postCreateCommand to pnpm
Nice catch updating the container setup to use pnpm instead of yarn. Devcontainer will now run pnpm i after creation.

.github/workflows/release-canary.yml (1)

7-7: Branch filter updated to main
Good update—switching the canary release trigger from master to main aligns with the branch rename.

.github/workflows/release.yml (1)

7-7: Branch filter updated to main
Switching the monitored branch from master to main is consistent with your other workflows—thanks for catching this.

.github/workflows/test.yml (1)

18-18: Double-check TypeScript support window
Dropping older TS versions and only testing 5.5 and latest is fine if that’s your policy, but please confirm that we’re not breaking support guarantees for earlier TS users.

CONTRIBUTING.md (2)

59-65: Targeted test commands look solid
pnpm test <file> and pnpm test --filter <ws> <file> are described accurately. Nice job.


73-75: Testing guidelines are clear
Instructions around Vitest and git hooks are on point. Thanks for keeping contributors in the loop.

| ZodIssueCode.too_big | `type: "string" \| "number" \| "array" \| "set" \| "date"` <br>The type of the data failing validation<br><br> `maximum: number` <br>The expected length/value.<br><br>`inclusive: boolean`<br>Whether the maximum is included in the range of acceptable values.<br><br>`exact: boolean`<br>Whether the size/length is constrained to be an exact value (used to produce more readable error messages).<br> |
| ZodIssueCode.not_multiple_of | `multipleOf: number` <br>The value the number should be a multiple of.<br> |
| ZodIssueCode.invalid_intersection_types | `mergeErrorPath: (string \| number)[]` <br>This path points to the property of the objects (the output of the two schemas passed to the intersection) which cannot be merged.<br> |
| 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) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Refine phrasing in the "custom" entry

For a more concise style, consider swapping “are able to pass in” for “can pass in”:

- You are able to pass in a `params` object here…
+ You can pass in a `params` object here…
📝 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.

Suggested change
| 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) |
| 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 can 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 any ZodIssueCode). You are able to pass in a params object here that is ...

(BE_ABLE_TO)

Comment on lines 190 to 191
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 the error map from the `zod/locales` directory.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Fix typo in "default"

There's a small typo here—“deafult” should be spelled “default”:

- To set the deafult error map based on your locale…
+ To set the default error map based on your locale…
📝 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.

Suggested change
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 the error map from the `zod/locales` directory.
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.

Comment on lines 9 to 21
"strict": true,
"alwaysStrict": true,

"exactOptionalPropertyTypes": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noUnusedLocals": false,
"noUnusedParameters": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitOverride": true,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Heads up on strict flags
Turning on most strict checks is awesome for safety, but noUnusedLocals: false might let dead code hang around. Consider flipping that to true or cleaning up unused locals.

Comment on lines 14 to 25
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
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Tree‑shake and plugin config looks good
smallest preset with annotations is dope. You could optionally enable source maps for easier debugging down the line.

README.md Outdated
@@ -756,7 +766,7 @@ time.parse("00:00:00"); // fail

### IP addresses

The `z.string().ip()` method by default validate IPv4 and IPv6.
The `z.string().ip()` method by default validate IPv4 and IP 6.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

There's a typo in the IP address validation description

Looks like "IPv6" was accidentally changed to "IP 6".

-The `z.string().ip()` method by default validate IPv4 and IP 6.
+The `z.string().ip()` method by default validate IPv4 and IPv6.
📝 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.

Suggested change
The `z.string().ip()` method by default validate IPv4 and IP 6.
The `z.string().ip()` method by default validate IPv4 and IPv6.

CONTRIBUTING.md Outdated
Comment on lines 30 to 32
3. Run `pnpm i` to install dependencies.

4. Start playing with the code! You can do some simple experimentation in [`playground.ts`](playground.ts) (see `yarn play` below) or start implementing a feature right away.
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Clarify the install command
Using pnpm i is perfectly valid, but newbies sometimes miss that alias. Maybe spell it out as pnpm install for clarity.

CONTRIBUTING.md Outdated
Comment on lines 55 to 57
**`pnpm test:watch`**

- runs a single test file (e.g. `enum.test.ts`)
- runs all Vitest tests and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix that hanging description
The bullet under pnpm test:watch cuts off after “and.” It should read something like:

- runs all Vitest tests and watches for changes

- uses: actions/checkout@v4
with:
fetch-depth: 0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Tidy up stray whitespace
There are trailing spaces on some blank lines—cleaning those up will keep YAMLlint happy.

Also applies to: 26-26, 32-32

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 21-21: trailing spaces

(trailing-spaces)

@@ -0,0 +1,39 @@
# .github/release.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Heads-up: update the file header
The top comment says # .github/release.yml but this file lives at .github/workflows/release-beta.yaml. Let’s correct or remove that to avoid confusion.

Comment on lines 27 to 35
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: |
pnpm install

- name: Authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Speed up CI with caching & streamlined auth
You can crank installs faster by caching the pnpm store and use actions/setup-node for npm auth instead of echoing into ~/.npmrc. For example:

+      - uses: actions/cache@v3
+        with:
+          path: ~/.pnpm-store
+          key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
-      - name: Install pnpm
-        uses: pnpm/action-setup@v4
+      - uses: actions/setup-node@v4
+        with:
+          node-version: latest
+          registry-url: https://registry.npmjs.org
+          always-auth: true

This removes manual auth steps and speeds up repeated runs.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 32-32: trailing spaces

(trailing-spaces)

@colinhacks colinhacks changed the base branch from main to v4 April 17, 2025 20:50
@colinhacks colinhacks merged commit 5d3414b into colinhacks:v4 May 13, 2025
0 of 3 checks passed
@colinhacks
Copy link
Owner

Thank you!!

colinhacks added a commit that referenced this pull request May 19, 2025
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants