Every departure from the vendored Zod v4 test corpus is recorded here. The excision policy is narrow: only tests that pin legacy behavior (cut by the zodrs plan) are removed. A failing test that pins current v4 behavior is a bug in zodrs, not an excision.
- Behavior pinned: Zod v3 API surface (
zod/v3import). Tests v3z.string().parse(234)error shape withexpected/receivedfields and v3-style async validation. - Reason: zodrs cuts the entire v3 surface. The file imported
from "zod/v3"(rewritten tozodrs/v3before excision). No v3 compat layer ships in zodrs.
These tests use symbols exported only from Zod's classic/compat.ts,
which zodrs does not ship. The imports are rewritten to the closest
zodrs surface (zodrs), but the symbol will not resolve until zodrs
provides it or the test is updated. They are not excised because the
tests exercise non-legacy behavior (transforms, locale rendering) that
zodrs intends to support; only the API used to access that behavior is
deprecated.
- Test:
"z.NEVER in transform"— usesz.ZodIssueCode.custominctx.addIssue(). - Test:
"short circuit on dirty"— usesz.ZodIssueCode.invalid_typein an assertion. - Compat symbol:
ZodIssueCode(deprecated object mapping code strings to themselves; use raw string literals like"custom"instead). - Closest zodrs surface:
zodrs(classic). zodrs should exportZodIssueCodeor these tests should be updated to use string literals.
- Test:
"implement async with transforms"— usesz.ZodIssueCode.custominctx.addIssue(). - Compat symbol:
ZodIssueCode(same as above).
- Test:
"Georgian locale uses 'ველი' instead of 'სტრინგი'"— usesz.setErrorMap(z.locales.ka().localeError)to install a locale. - Compat symbol:
setErrorMap(deprecated; usez.config({ customError })instead). - Closest zodrs surface:
zodrs(classic). The test exercises locale rendering, which zodrs supports; only the installation API is deprecated.
- Test:
"Romanian locale uses 'șir' instead of 'string'"— usesz.setErrorMap(z.locales.ro().localeError)to install a locale. - Compat symbol:
setErrorMap(same as above).
Many tests use { message: "..." } as a check/schema parameter. In Zod v4
this is a deprecated alias for { error: "..." }. zodrs supports the alias;
supplying both message and error in one call throws. These tests are
expected to pass.
This is not an excision — the tests pin current v4 validation behavior and
error message content. Only the parameter name used to set the custom
message is deprecated. Files using { message: "..." } as a parameter
include (non-exhaustive):
classic/tests/error.test.ts—z.string().max(1, { message: "" }),z.string().datetime({ message: "Bad date!" })classic/tests/string.test.ts—z.string().url({ message: "badurl" }),z.string().regex(..., { message: "..." })classic/tests/record.test.ts—.refine(..., { message: "..." })classic/tests/object.test.ts—.refine(..., { message: "..." })classic/tests/pipe.test.ts—.refine(..., { message: "..." })classic/tests/enum.test.ts—error: () => ({ message: "..." })(this is an error-map return, not a parameter alias — not deprecated)classic/tests/hash.test.ts—z.hash("md5", { message: "..." })
Error-map return values of the form { message: "..." } are not
deprecated — that is the standard v4 error-map return shape. Only the
message parameter on schema/check constructors is deprecated.
- Used as a type annotation:
const errorMap: z.ZodErrorMap = ... - Deprecated alias: Re-exported from
classic/errors.tsas$ZodErrorMap as ZodErrorMap. Usez.core.$ZodErrorMapinstead. - Closest zodrs surface:
zodrs(classic) orzodrs/core.
These imports were rewritten from relative paths into zod's internal module tree to the closest zodrs public surface. The named import may not exist on that surface if zodrs does not re-export it.
- Original:
import { parsedType } from "../../util.js"(core util) - Rewritten to:
import { parsedType } from "zodrs/core" - Note: In Zod,
parsedTypeis a bare export fromcore/util.tsbut only re-exported asutil.parsedTypefromcore/index.ts. zodrs/core should exportparsedTypeas a bare name or these tests need adjustment.
- Original:
import type { _ZodMiniJSONSchema } from "../../mini/schemas.js" - Rewritten to:
import type { _ZodMiniJSONSchema } from "zodrs/mini" - Note: Internal mini type; zodrs/mini should re-export it or the test needs adjustment.
- Original:
import type { StandardSchemaWithJSON } from "../../core/standard-schema.js" - Rewritten to:
import type { StandardSchemaWithJSON } from "zodrs/core" - Note: Internal core type; zodrs/core should re-export it or the test needs adjustment.
- Original:
import type { util } from "zod/v4/core" - Rewritten to:
import type { util } from "zodrs/core" - Note:
utilis a namespace export from core. Should be available onzodrs/core.
- Original:
import { util as zc } from "zod/v4/core" - Rewritten to:
import { util as zc } from "zodrs/core" - Note: Same as above.
These files remain in the vendored corpus unchanged. Their active tests do not exercise the behavior named by the file or test title, so passing them provides no conformance evidence for that behavior.
- Present behavior: The test constructs two plain objects, links them into a cycle, and makes no schema, parse call, or assertion.
- Disposition: The test is inert, not excised. zodrs owns a separate core regression that constructs mutually recursive lazy schemas, parses cyclic input, and pins the termination/error behavior under both interpreter and codegen execution.
- Present behavior: The only active assertion is
expect(true).toBe(true); the sample that calls.coalesce()is commented out. - Disposition: The test is inert, not excised. Zod v4.4.3 exposes no
coalesceAPI, so zodrs does not invent or test one.
| Category | Count |
|---|---|
| Files excised | 1 (core/tests/index.test.ts) |
| Test cases excised | 0 |
| Compat-only symbols noted (not excised) | 4 files (ZodIssueCode ×2, setErrorMap ×2) |
Deprecated message parameter alias noted |
~6+ files (alias supported; tests pass) |
| Deprecated type aliases noted | 1 (ZodErrorMap) |
| Internal module names noted | 5 names across 8 files |
| Inert upstream tests noted (not excised) | 2 (lazy.test.ts, coalesce.test.ts) |
| Total source files | 109 |
| Total vendored files | 108 (109 − 1 excised) |