Download coderank/dumps/project_search-docs-zod.jsonl from paintedwolfcode/bialy-dataset: direct link, hf CLI and curl.
- Browser
- Download file 107 kB
-
https://huggingface.co/datasets/paintedwolfcode/bialy-dataset/resolve/main/coderank/dumps/project_search-docs-zod.jsonl
- Command line
-
hf download hf://datasets/paintedwolfcode/bialy-dataset/coderank/dumps/project_search-docs-zod.jsonl
-
curl -L -o project_search-docs-zod.jsonl https://huggingface.co/datasets/paintedwolfcode/bialy-dataset/resolve/main/coderank/dumps/project_search-docs-zod.jsonl
107 kB
| {"site":"project_search","repo":"zod","task":"Iterations that put one measurement near ~40ms, so a round is short but not noise.","query":"iterations that measurement","file":"packages/bench/compile-matrix.ts","symbol":"calibrate","line":253,"lang":"en","candidates":[{"text":"File: packages/bench/compile-matrix.ts\nLine 252: /** Iterations that put one measurement near ~40ms, so a round is short but not noise. */","file":"packages/bench/compile-matrix.ts","line":252,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/bench/moltar-libs.ts\nLine 228: /** iterations that put one measurement near ~40ms, so a round is short but not noise */","file":"packages/bench/moltar-libs.ts","line":228,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/bench/validate-vs-safeparse.ts\nLine 114: /** Iterations that put one measurement near ~40ms, so a round is short but not noise. */","file":"packages/bench/validate-vs-safeparse.ts","line":114,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Every case shares one `safeParse` call site, and so do zod's own internal dispatch sites.","query":"every case shares","file":"packages/bench/compile-matrix.ts","symbol":"arg","line":321,"lang":"en","candidates":[{"text":"File: packages/bench/compile-matrix.ts\nLine 320: // Every case shares one `safeParse` call site, and so do zod's own internal dispatch sites. Run all 55 in one process and those caches go megamorphic, which taxes the interpreter more than it taxes a single generated function, so the same schema reads fas…","file":"packages/bench/compile-matrix.ts","line":320,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/bench/validate-vs-safeparse.ts\nLine 222: // Every case shares one safeParse/validate call site inside measure(), so those inline caches go megamorphic as the sweep proceeds and a case measured first would see a cleaner cache than one measured last. Warm every target before timing any, so each is …","file":"packages/bench/validate-vs-safeparse.ts","line":222,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Feed the input through an array load.","query":"feed input through","file":"packages/bench/compile-matrix.ts","symbol":"pool","line":362,"lang":"en","candidates":[{"text":"File: packages/bench/compile-matrix.ts\nLine 357: // Feed the input through an array load. Passed as a constant the whole call is","file":"packages/bench/compile-matrix.ts","line":357,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/bench/validate-vs-safeparse.ts\nLine 138: // Feed the input through an array load. Passed as a constant the whole call is loop-invariant and V8 hoists it out of the timing loop.","file":"packages/bench/validate-vs-safeparse.ts","line":138,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"biome-ignore lint/security/noGlobalEval: V8 natives syntax is not valid in a module body.","query":"biome ignore lint","file":"packages/bench/memory/dict-mode.ts","symbol":"hasFast","line":13,"lang":"en","candidates":[{"text":"File: packages/bench/memory/dict-mode.ts\nLine 12: // biome-ignore lint/security/noGlobalEval: V8 natives syntax is not valid in a module body.","file":"packages/bench/memory/dict-mode.ts","line":12,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/bench/safe.ts\nLine 50: // // biome-ignore lint: bug in biome","file":"packages/bench/safe.ts","line":50,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/bench/safe.ts\nLine 57: // // biome-ignore lint: bug in biome","file":"packages/bench/safe.ts","line":57,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/components/scroller.tsx\nLine 13: // biome-ignore lint/correctness/useExhaustiveDependencies: pathname and searchParams only retrigger the effect","file":"packages/docs/components/scroller.tsx","line":13,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v3/helpers/errorUtil.ts\nLine 5: // biome-ignore lint/suspicious/noShadowRestrictedNames: renaming churns 31 v3 call sites","file":"packages/zod/src/v3/helpers/errorUtil.ts","line":5,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v3/standard-schema.ts\nLine 111: // biome-ignore lint/complexity/noUselessEmptyExport: needed for granular visibility control of TS namespace","file":"packages/zod/src/v3/standard-schema.ts","line":111,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/fix-json-issue.test.ts\nLine 3: // biome-ignore lint/correctness/noUnusedImports: This import verifies the type is exported","file":"packages/zod/src/v4/classic/tests/fix-json-issue.test.ts","line":3,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/fix-json-issue.test.ts\nLine 11: // biome-ignore lint/suspicious/noExportsInTest: This export is required to reproduce TS4023","file":"packages/zod/src/v4/classic/tests/fix-json-issue.test.ts","line":11,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/recursive-types.test.ts\nLine 604: // biome-ignore lint/suspicious/noExportsInTest: unexported it trips noUnusedVariables instead","file":"packages/zod/src/v4/classic/tests/recursive-types.test.ts","line":604,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/errors.ts\nLine 216: // biome-ignore lint/style/useShorthandFunctionType: interface form is public API","file":"packages/zod/src/v4/core/errors.ts","line":216,"lexical":0.44999999999999996,"target":false},{"text":"File: scripts/check-comments.ts\nLine 12: /^(?:@ts-|@__|biome-ignore|eslint|prettier-ignore|oxlint|[cv]8 ignore|#(?:region|endregion)|\\/|<reference)/;","file":"scripts/check-comments.ts","line":12,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"distinct key names per schema so V8's compilation cache never shares generated source between instances","query":"distinct names schema","file":"packages/bench/memory/indent-leak.ts","symbol":"branch","line":23,"lang":"en","candidates":[{"text":"File: packages/bench/memory/compiled-slope.ts\nLine 1: // Retained heap PER compiled schema, measured as a slope over many distinct schemas in one process. compiled-footprint.ts holds one instance per process and reports the delta, which also carries one-time costs of whatever the measured schema touched first…","file":"packages/bench/memory/compiled-slope.ts","line":1,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/bench/memory/indent-leak.ts\nLine 22: // distinct key names per schema so V8's compilation cache never shares generated source between instances","file":"packages/bench/memory/indent-leak.ts","line":22,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"iterations that put one measurement near ~40ms, so a round is short but not noise","query":"iterations that measurement","file":"packages/bench/moltar-libs.ts","symbol":"calibrate","line":229,"lang":"en","candidates":[{"text":"File: packages/bench/compile-matrix.ts\nLine 252: /** Iterations that put one measurement near ~40ms, so a round is short but not noise. */","file":"packages/bench/compile-matrix.ts","line":252,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/bench/moltar-libs.ts\nLine 228: /** iterations that put one measurement near ~40ms, so a round is short but not noise */","file":"packages/bench/moltar-libs.ts","line":228,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/bench/validate-vs-safeparse.ts\nLine 114: /** Iterations that put one measurement near ~40ms, so a round is short but not noise. */","file":"packages/bench/validate-vs-safeparse.ts","line":114,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"with Proxy, get/set trap, use Reflect","query":"with proxy trap","file":"packages/bench/property-access.ts","symbol":"objD","line":33,"lang":"en","candidates":[{"text":"File: packages/bench/property-access.ts\nLine 8: // with Proxy, no get trap","file":"packages/bench/property-access.ts","line":8,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/bench/property-access.ts\nLine 16: // with Proxy, get/set trap","file":"packages/bench/property-access.ts","line":16,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/bench/property-access.ts\nLine 32: // with Proxy, get/set trap, use Reflect","file":"packages/bench/property-access.ts","line":32,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Both carry both keys, so the guard is the only difference the measurement can see.","query":"both carry both","file":"packages/bench/validate-abort-sweep.ts","symbol":"CTX_OFF","line":124,"lang":"en","candidates":[{"text":"File: packages/bench/validate-abort-sweep.ts\nLine 5: …l site, parsed with `abortEarly: false` and `abortEarly: true`. Both context objects carry both keys so they share a hidden class and the only difference measured is the guard itself. That is why this runs in one process rather than loading two revisions —…","file":"packages/bench/validate-abort-sweep.ts","line":5,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/bench/validate-abort-sweep.ts\nLine 123: // Both carry both keys, so the guard is the only difference the measurement can see.","file":"packages/bench/validate-abort-sweep.ts","line":123,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/from-json-schema.test.ts\nLine 1404: // without a guard keyword both modes carry them","file":"packages/zod/src/v4/classic/tests/from-json-schema.test.ts","line":1404,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"_zod.run is read at call time: the object JIT replaces it on first use, so a reference captured up front would measure the stale interpreted path.","query":"read call time","file":"packages/bench/validate-abort-sweep.ts","symbol":"off","line":156,"lang":"en","candidates":[{"text":"File: packages/bench/error-construction-breakdown.ts\nLine 1: // Where the time goes when a caller reads `.error` on a failing safeParse: finalizeIssue per issue, the ZodError construction, and the plain Error baseline. Fixed iterations, gc between samples, min of 7 interleaved rounds.","file":"packages/bench/error-construction-breakdown.ts","line":1,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/bench/validate-abort-sweep.ts\nLine 155: // _zod.run is read at call time: the object JIT replaces it on first use, so a reference captured up front would measure the stale interpreted path.","file":"packages/bench/validate-abort-sweep.ts","line":155,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/bench/validate-vs-safeparse.ts\nLine 8: …ute ops/sec drifts by tens of percent between runs, so all four calls are measured *interleaved* inside one round and the best of N rounds is kept. That is what makes the cross-mode ratio legitimate; measuring the plain schema to completion and then the co…","file":"packages/bench/validate-vs-safeparse.ts","line":8,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs-v3/blog/clerk-fellowship.md\nLine 44: …om/tweetsbycolin) from Clerk (AKA \"other Colin\") was enthusiastically on board. I've admired Clerk for a long time for their product, eye for developer experience, and commitment to open source. In fact, I covered them on my podcast the day they launched o…","file":"packages/docs-v3/blog/clerk-fellowship.md","line":44,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/content/blog/clerk-fellowship.mdx\nLine 43: …om/tweetsbycolin) from Clerk (AKA \"other Colin\") was enthusiastically on board. I've admired Clerk for a long time for their product, eye for developer experience, and commitment to open source. In fact, I covered them on my podcast the day they launched o…","file":"packages/docs/content/blog/clerk-fellowship.mdx","line":43,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/error.test.ts\nLine 795: ….captureStackTrace` is skip-until-seen: when it cannot find its callee it discards every frame, not just the ones above. An async wrapper that returns its inner promise without awaiting has already left the async chain by the time the rejection is built, s…","file":"packages/zod/src/v4/classic/tests/error.test.ts","line":795,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/api.ts\nLine 1257: … with `shape` itself, which resolves lazily over the object the caller passed and then freezes to a copy, and it charged every object schema construction time and memory for a check only this one type reads.","file":"packages/zod/src/v4/core/api.ts","line":1257,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 2188: // Apply transform and validate output. The transform may read its second `payload` argument (codec transforms like z.stringbool() push issues there) so wrap the call in a helper that spoofs a payload. Pushed issues signal INVALID and the wrapper falls bac…","file":"packages/zod/src/v4/core/compile.ts","line":2188,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 2260: // An untagged catchValue is a user callback, and one reading `ctx.error` needs the caller's per-parse error map. Catch *succeeds*, so a wrong message there is unobservable — refuse at codegen, and not islandable either, since `runtimeRun` has no context…","file":"packages/zod/src/v4/core/compile.ts","line":2260,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile-differential.test.ts\nLine 568: // The callback reads issues finalized against the caller's per-parse error map, which generated code has no access to. Refusing at codegen is what makes it safe inside a union; returning INVALID at parse time would read as a rejected branch.","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","line":568,"lexical":0.44999999999999996,"target":false},{"text":"File: wiki/compile.md\nLine 9: …ng back to the original `_zod.run` on failure. Eager compile at call time. Original schema untouched. Clone is a normal `ZodType` — `.parse`, `.safeParse`, `.refine`, `.extend`, intersection, pipe, etc. all work as usual. Note that derivations (`.refine`…","file":"wiki/compile.md","line":9,"lexical":0.44999999999999996,"target":false},{"text":"File: wiki/compile.md\nLine 39: …ontains a cycle is refused at codegen and parses through the runtime. Input containing a reference cycle terminates because the memoizer registers each in-progress output before its children run, keyed on the parse context every schema in that call shares;…","file":"wiki/compile.md","line":39,"lexical":0.44999999999999996,"target":false},{"text":"File: wiki/optionality.md\nLine 447: This is technically unsound — the runtime accepts inputs the type rejects — but it matches what users *expect* from these primitives. `.catch(default)` reads as \"give me this when something goes wrong, including the absence of input.\" `z.preprocess(fn,…","file":"wiki/optionality.md","line":447,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Iterations that put one measurement near ~40ms, so a round is short but not noise.","query":"iterations that measurement","file":"packages/bench/validate-vs-safeparse.ts","symbol":"calibrate","line":115,"lang":"en","candidates":[{"text":"File: packages/bench/compile-matrix.ts\nLine 252: /** Iterations that put one measurement near ~40ms, so a round is short but not noise. */","file":"packages/bench/compile-matrix.ts","line":252,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/bench/moltar-libs.ts\nLine 228: /** iterations that put one measurement near ~40ms, so a round is short but not noise */","file":"packages/bench/moltar-libs.ts","line":228,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/bench/validate-vs-safeparse.ts\nLine 114: /** Iterations that put one measurement near ~40ms, so a round is short but not noise. */","file":"packages/bench/validate-vs-safeparse.ts","line":114,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"Feed the input through an array load.","query":"feed input through","file":"packages/bench/validate-vs-safeparse.ts","symbol":"pool","line":139,"lang":"en","candidates":[{"text":"File: packages/bench/compile-matrix.ts\nLine 357: // Feed the input through an array load. Passed as a constant the whole call is","file":"packages/bench/compile-matrix.ts","line":357,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/bench/validate-vs-safeparse.ts\nLine 138: // Feed the input through an array load. Passed as a constant the whole call is loop-invariant and V8 hoists it out of the timing loop.","file":"packages/bench/validate-vs-safeparse.ts","line":138,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"keeping brands out of input types","query":"keeping brands input","file":"packages/zod/src/v3/tests/branded.test.ts","symbol":"age","line":42,"lang":"en","candidates":[{"text":"File: packages/zod/src/v3/tests/branded.test.ts\nLine 41: // keeping brands out of input types","file":"packages/zod/src/v3/tests/branded.test.ts","line":41,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/classic/tests/brand.test.ts\nLine 39: // keeping brands out of input types","file":"packages/zod/src/v4/classic/tests/brand.test.ts","line":39,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/brand.test.ts\nLine 39: // keeping brands out of input types","file":"packages/zod/src/v4/mini/tests/brand.test.ts","line":39,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"a failing match over the overlapping code points used to backtrack exponentially","query":"failing match over","file":"packages/zod/src/v3/tests/string.test.ts","symbol":"start","line":341,"lang":"en","candidates":[{"text":"File: packages/zod/src/v3/tests/string.test.ts\nLine 340: // a failing match over the overlapping code points used to backtrack exponentially","file":"packages/zod/src/v3/tests/string.test.ts","line":340,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/classic/tests/redos.test.ts\nLine 53: // U+1F9B0-U+1F9B3 are the only code points in both \\p{Extended_Pictographic} and \\p{Emoji_Component}. A failing match over them used to backtrack exponentially: 26 of them took ~1.9s, and each additional character roughly doubled it.","file":"packages/zod/src/v4/classic/tests/redos.test.ts","line":53,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Returns a copy of the schema with every nested object's properties made optional.","query":"returns copy schema","file":"packages/zod/src/v4/classic/deep-partial.ts","symbol":"deepPartial","line":67,"lang":"en","candidates":[{"text":"File: packages/docs/content/compile.mdx\nLine 52: Compiles a single schema and returns a compiled copy. The original schema is unchanged.","file":"packages/docs/content/compile.mdx","line":52,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/deep-partial.ts\nLine 66: /** Returns a copy of the schema with every nested object's properties made optional. */","file":"packages/zod/src/v4/classic/deep-partial.ts","line":66,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/classic/in-out.ts\nLine 27: /** Returns a copy of the schema with every pipe replaced by its input side. A codec's checks are dropped: they constrain the decoded value the input side never produces. */","file":"packages/zod/src/v4/classic/in-out.ts","line":27,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/in-out.ts\nLine 38: /** Returns a copy of the schema with every pipe replaced by its output side, carrying over the pipe's own checks. */","file":"packages/zod/src/v4/classic/in-out.ts","line":38,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Prototypes that already carry the lazy helper methods.","query":"prototypes that already","file":"packages/zod/src/v4/classic/errors.ts","symbol":"_installedErrorProtos","line":28,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/errors.ts\nLine 25: /* Prototypes that already carry the lazy helper methods. Seeded with the","file":"packages/zod/src/v4/classic/errors.ts","line":25,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/errors.ts\nLine 256: /* Prototypes that already carry the lazy `toString`. Seeded with the","file":"packages/zod/src/v4/core/errors.ts","line":256,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Reads through to the registry on every access, so it must not cache.","query":"reads through registry","file":"packages/zod/src/v4/classic/schemas.ts","symbol":"description","line":350,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/schemas.ts\nLine 349: // Reads through to the registry on every access, so it must not cache.","file":"packages/zod/src/v4/classic/schemas.ts","line":349,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/util.ts\nLine 1123: // a getter installs as written, so it stays live: `description` reads through to the registry on every access. not enumerable: an object literal's is, and a prototype member never was","file":"packages/zod/src/v4/core/util.ts","line":1123,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"An intersection and the flat object with the same keys are interchangeable as targets, since the normalizer flattens both.","query":"intersection flat object","file":"packages/zod/src/v4/classic/tests/assignability.test.ts","symbol":"Intersected","line":325,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/assignability.test.ts\nLine 324: // An intersection and the flat object with the same keys are interchangeable as targets, since the normalizer flattens both.","file":"packages/zod/src/v4/classic/tests/assignability.test.ts","line":324,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/util.ts\nLine 104: …odifiers survive the rebuild and only leaves are normalized. An intersection flattens here, which is why an intersection target and the flat object with the same keys match each other. A callable stops the walk because `keyof` a function is `never`, so map…","file":"packages/zod/src/v4/core/util.ts","line":104,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/util.ts\nLine 133: …rence the per-key walk cannot see — a `readonly` modifier, an intersection versus the flat object with the same keys — leaves every key agreeing, and reporting nothing there would silently accept what the top-level check rejected.","file":"packages/zod/src/v4/core/util.ts","line":133,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"keeping brands out of input types","query":"keeping brands input","file":"packages/zod/src/v4/classic/tests/brand.test.ts","symbol":"age","line":40,"lang":"en","candidates":[{"text":"File: packages/zod/src/v3/tests/branded.test.ts\nLine 41: // keeping brands out of input types","file":"packages/zod/src/v3/tests/branded.test.ts","line":41,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/brand.test.ts\nLine 39: // keeping brands out of input types","file":"packages/zod/src/v4/classic/tests/brand.test.ts","line":39,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/mini/tests/brand.test.ts\nLine 39: // keeping brands out of input types","file":"packages/zod/src/v4/mini/tests/brand.test.ts","line":39,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"A pipe hands its `out` schema the caller's issues array so an unrecognized key can survive to an enclosing intersection.","query":"pipe hands schema","file":"packages/zod/src/v4/classic/tests/catch.test.ts","symbol":"result","line":313,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/catch.test.ts\nLine 312: // A pipe hands its `out` schema the caller's issues array so an unrecognized key can survive to an enclosing intersection. The catch must not read that as its own inner failing.","file":"packages/zod/src/v4/classic/tests/catch.test.ts","line":312,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/classic/tests/optional.test.ts\nLine 357: // A pipe hands its `out` schema the caller's issues array so an unrecognized key can survive to an enclosing intersection. A defaulted inner substituting for absence must not read that as its own failing and drop it.","file":"packages/zod/src/v4/classic/tests/optional.test.ts","line":357,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"These should compile without type errors","query":"these should compile","file":"packages/zod/src/v4/classic/tests/codec.test.ts","symbol":"decoded","line":178,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/codec.test.ts\nLine 177: // These should compile without type errors","file":"packages/zod/src/v4/classic/tests/codec.test.ts","line":177,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/classic/tests/codec.test.ts\nLine 418: // These should compile without errors - correct types (async support)","file":"packages/zod/src/v4/classic/tests/codec.test.ts","line":418,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/codec.test.ts\nLine 180: // These should compile without type errors","file":"packages/zod/src/v4/mini/tests/codec.test.ts","line":180,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/codec.test.ts\nLine 413: // These should compile without errors - correct types (async support)","file":"packages/zod/src/v4/mini/tests/codec.test.ts","line":413,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Test that both sync and async work","query":"test that both","file":"packages/zod/src/v4/classic/tests/codec.test.ts","symbol":"mixedCodec","line":556,"lang":"en","candidates":[{"text":"File: AGENTS.md\nLine 83: …his: dump every descriptor, alias and assign/delete semantic on both revisions and diff them. It caught four real regressions that tests did not.","file":"AGENTS.md","line":83,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/codec.test.ts\nLine 555: // Test that both sync and async work","file":"packages/zod/src/v4/classic/tests/codec.test.ts","line":555,"lexical":0.65,"target":true},{"text":"File: packages/zod/src/v4/classic/tests/discriminated-unions.test.ts\nLine 659: // Test that both discriminator values are correctly included in propValues","file":"packages/zod/src/v4/classic/tests/discriminated-unions.test.ts","line":659,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/to-json-schema.test.ts\nLine 872: // Test that both old (draft-4, draft-7) and new (draft-04, draft-07) target formats work","file":"packages/zod/src/v4/classic/tests/to-json-schema.test.ts","line":872,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile-differential.test.ts\nLine 647: …inline — the trim, the `://` guard, the hostname and protocol tests, the normalize step. Deduplicating them faithfully is awkward, because hostname and protocol can both fail and each pushes its own issue, so the shared helper would have to return a list…","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","line":647,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile-off-by-default.test.ts\nLine 6: …lobal compilation is opt-in through `import \"zod/compile\"`, and that opt-in mutates `globalThis.__zod_globalConfig` — process-global state, not module state. Two things therefore have to hold, and neither is evident from reading the module: importing zod…","file":"packages/zod/src/v4/core/tests/compile-off-by-default.test.ts","line":6,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/codec.test.ts\nLine 474: // Test that both sync and async work","file":"packages/zod/src/v4/mini/tests/codec.test.ts","line":474,"lexical":0.65,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"no single precision covers both, so the docs point at this union — pin that it works","query":"single precision covers","file":"packages/zod/src/v4/classic/tests/datetime.test.ts","symbol":"mixed","line":151,"lang":"en","candidates":[{"text":"File: packages/docs/content/api.mdx\nLine 488: To accept minute precision alongside the rest, union the two — no single `precision` covers both.","file":"packages/docs/content/api.mdx","line":488,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/datetime.test.ts\nLine 150: // no single precision covers both, so the docs point at this union — pin that it works","file":"packages/zod/src/v4/classic/tests/datetime.test.ts","line":150,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"`Object.keys` lists a shape's keys without invoking them, so the check sees `child` without running the getter that references the union being constructed.","query":"object keys lists","file":"packages/zod/src/v4/classic/tests/discriminated-unions.test.ts","symbol":"variantA","line":312,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/discriminated-unions.test.ts\nLine 311: // `Object.keys` lists a shape's keys without invoking them, so the check sees `child` without running the getter that references the union being constructed.","file":"packages/zod/src/v4/classic/tests/discriminated-unions.test.ts","line":311,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/api.ts\nLine 1257: // `Object.keys` on the shape is recursion-safe by contrast — it lists the keys without invoking them — so an eager check is reachable. It was tried and reverted: a key list derived from the shape cannot be kept in agreement with `shape` itself, which …","file":"packages/zod/src/v4/core/api.ts","line":1257,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"When a nested invalid_union appears inside another invalid_union, the inner errors must stay nested under their parent path, not flatten to root.","query":"when nested invalid","file":"packages/zod/src/v4/classic/tests/error-utils.test.ts","symbol":"syntheticError","line":662,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/error-utils.test.ts\nLine 661: // When a nested invalid_union appears inside another invalid_union, the inner errors must stay nested under their parent path, not flatten to root.","file":"packages/zod/src/v4/classic/tests/error-utils.test.ts","line":661,"lexical":0.44999999999999996,"target":true},{"text":"File: wiki/compile.md\nLine 29: ….transform` / `.superRefine` callbacks run **at most twice** on invalid input — once in the fast path, once in the runtime fallback. This matches Zod's existing Standard Schema sync-then-async behavior. The bound is enforced, including under global mode …","file":"wiki/compile.md","line":29,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"local: false, offset: false, precision: null","query":"local false offset","file":"packages/zod/src/v4/classic/tests/index.test.ts","symbol":"a","line":92,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/index.test.ts\nLine 91: // local: false, offset: false, precision: null","file":"packages/zod/src/v4/classic/tests/index.test.ts","line":91,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/mini/tests/index.test.ts\nLine 147: // local: false, offset: false, precision: null","file":"packages/zod/src/v4/mini/tests/index.test.ts","line":147,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"the install used to read a module-level flag the outer construction set, so a nested `init` on an unrelated receiver inherited an answer that was not about it","query":"install used read","file":"packages/zod/src/v4/classic/tests/instance-footprint.test.ts","symbol":"seen","line":145,"lang":"en","candidates":[{"text":"File: packages/treeshake/bundle-size.test.ts\nLine 41: // raised from 2903 / 3366 / 4437 by the commit that caused it: installing a trait's members from `$constructor` rather than from its initializer costs mini +70 / +83 / +95, and every bundle carries `core.ts`; measured 2946 / 3420 / 4503 plus 28 headroom, …","file":"packages/treeshake/bundle-size.test.ts","line":41,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/instance-footprint.test.ts\nLine 144: // the install used to read a module-level flag the outer construction set, so a nested `init` on an unrelated receiver inherited an answer that was not about it","file":"packages/zod/src/v4/classic/tests/instance-footprint.test.ts","line":144,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"Keys unrecognized by BOTH sides should error","query":"keys unrecognized both","file":"packages/zod/src/v4/classic/tests/intersection.test.ts","symbol":"result","line":55,"lang":"en","candidates":[{"text":"File: packages/docs/content/blog/zod-4-5.mdx\nLine 338: Separately, an `unrecognized_keys` issue no longer aborts the schema it came from, so a strict object with an extra key *and* a bad value now reports both issues instead of just the first. Closes [#2200](https://github.com/colinhacks/zod/issues/2200), [#25…","file":"packages/docs/content/blog/zod-4-5.mdx","line":338,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/content/blog/zod-4-5.mdx\nLine 342: …opped too. `.strict()` reports an own `__proto__` input key as `unrecognized_keys` instead of silently swallowing it. Error formatters and both JSON Schema converters use own-property writes so a `toString` or `constructor` path segment can't walk onto `Ob…","file":"packages/docs/content/blog/zod-4-5.mdx","line":342,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/intersection.test.ts\nLine 54: // Keys unrecognized by BOTH sides should error","file":"packages/zod/src/v4/classic/tests/intersection.test.ts","line":54,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/schemas.ts\nLine 2887: … side(s) reject each key. A key rejection is reported only when BOTH sides reject it, so a key owned by one branch survives the other's key schema. strictObject reports these as unrecognized_keys; a record with an open key schema reports one invalid_key pe…","file":"packages/zod/src/v4/core/schemas.ts","line":2887,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Error maps run on the first read of `error`, so a test that only observes them reads it.","query":"error maps first","file":"packages/zod/src/v4/classic/tests/issue-schema.test.ts","symbol":"fail","line":9,"lang":"en","candidates":[{"text":"File: packages/docs/content/blog/zod-4-6.mdx\nLine 209: ### ⚠️ Error maps run on the first read of `error`","file":"packages/docs/content/blog/zod-4-6.mdx","line":209,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/content/blog/zod-4-6.mdx\nLine 211: Because `safeParse()` now builds its error lazily, error maps — global, locale, and per-schema `error` — run when `result.error` is first read, not at parse time. Code that swaps `z.config()` between the parse and the read gets the newer configuration.…","file":"packages/docs/content/blog/zod-4-6.mdx","line":211,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/issue-schema.test.ts\nLine 8: /** Error maps run on the first read of `error`, so a test that only observes them reads it. */","file":"packages/zod/src/v4/classic/tests/issue-schema.test.ts","line":8,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"A pipe hands its `out` schema the caller's issues array so an unrecognized key can survive to an enclosing intersection.","query":"pipe hands schema","file":"packages/zod/src/v4/classic/tests/optional.test.ts","symbol":"result","line":358,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/catch.test.ts\nLine 312: // A pipe hands its `out` schema the caller's issues array so an unrecognized key can survive to an enclosing intersection. The catch must not read that as its own inner failing.","file":"packages/zod/src/v4/classic/tests/catch.test.ts","line":312,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/optional.test.ts\nLine 357: // A pipe hands its `out` schema the caller's issues array so an unrecognized key can survive to an enclosing intersection. A defaulted inner substituting for absence must not read that as its own failing and drop it.","file":"packages/zod/src/v4/classic/tests/optional.test.ts","line":357,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"nothing is written back, so the narrowing is over the shape's input side","query":"nothing written back","file":"packages/zod/src/v4/classic/tests/properties.test.ts","symbol":"W","line":50,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/properties.test.ts\nLine 49: // nothing is written back, so the narrowing is over the shape's input side","file":"packages/zod/src/v4/classic/tests/properties.test.ts","line":49,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/tests/compile-differential.test.ts\nLine 136: …t it answer with a later branch. Measure it rather than assume. Nothing else in this file can see this class — the bare differential compares a fast path that returned INVALID against a fallback that re-runs the interpreter, so both sides reproduce the t…","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","line":136,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"A catch and a preprocess pipe declare no static optin, so the key stays required even where the parser can fill it.","query":"catch preprocess pipe","file":"packages/zod/src/v4/classic/tests/record.test.ts","symbol":"caught","line":101,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/record.test.ts\nLine 100: // A catch and a preprocess pipe declare no static optin, so the key stays required even where the parser can fill it. The static predicate and the one the JSON Schema emitter uses resolve these differently, and the two have to keep agreeing.","file":"packages/zod/src/v4/classic/tests/record.test.ts","line":100,"lexical":0.44999999999999996,"target":true},{"text":"File: wiki/optionality.md\nLine 455: …ning a slot. Default and prefault claim the top rung; optional, catch, transform and preprocess claim only `\"optional\"`; transparent wrappers and the input side of a pipe carry through whatever they wrap, which is how `z.string().default(\"D\").transform(fn)…","file":"wiki/optionality.md","line":455,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Should fail with too many items and duplicates","query":"should fail with","file":"packages/zod/src/v4/classic/tests/refine.test.ts","symbol":"result","line":208,"lang":"en","candidates":[{"text":"File: packages/zod/src/v3/tests/function.test.ts\nLine 194: test(\"non async function with async refinements should fail\", async () => {","file":"packages/zod/src/v3/tests/function.test.ts","line":194,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/from-json-schema.test.ts\nLine 394: // Should fail: matches both (length >= 5 AND starts with 'a') - exclusive union fails","file":"packages/zod/src/v4/classic/tests/from-json-schema.test.ts","line":394,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/function.test.ts\nLine 329: test(\"non async function with async refinements should fail\", async () => {","file":"packages/zod/src/v4/classic/tests/function.test.ts","line":329,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/record.test.ts\nLine 590: // Should fail with unrecognized key, error checked via inline snapshot","file":"packages/zod/src/v4/classic/tests/record.test.ts","line":590,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/record.test.ts\nLine 619: // Should fail with unrecognized key","file":"packages/zod/src/v4/classic/tests/record.test.ts","line":619,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/record.test.ts\nLine 635: // Should fail with unrecognized key","file":"packages/zod/src/v4/classic/tests/record.test.ts","line":635,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/refine.test.ts\nLine 99: // Should fail with non-matching passwords","file":"packages/zod/src/v4/classic/tests/refine.test.ts","line":99,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/classic/tests/refine.test.ts\nLine 207: // Should fail with too many items and duplicates","file":"packages/zod/src/v4/classic/tests/refine.test.ts","line":207,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/refine.test.ts\nLine 243: // Should fail with too many items and duplicates","file":"packages/zod/src/v4/classic/tests/refine.test.ts","line":243,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/refine.test.ts\nLine 449: // Should fail with one error","file":"packages/zod/src/v4/classic/tests/refine.test.ts","line":449,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/refine.test.ts\nLine 460: // Should fail with two errors","file":"packages/zod/src/v4/classic/tests/refine.test.ts","line":460,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Should fail with too many items and duplicates","query":"should fail with","file":"packages/zod/src/v4/classic/tests/refine.test.ts","symbol":"result","line":244,"lang":"en","candidates":[{"text":"File: packages/zod/src/v3/tests/function.test.ts\nLine 194: test(\"non async function with async refinements should fail\", async () => {","file":"packages/zod/src/v3/tests/function.test.ts","line":194,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/from-json-schema.test.ts\nLine 394: // Should fail: matches both (length >= 5 AND starts with 'a') - exclusive union fails","file":"packages/zod/src/v4/classic/tests/from-json-schema.test.ts","line":394,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/function.test.ts\nLine 329: test(\"non async function with async refinements should fail\", async () => {","file":"packages/zod/src/v4/classic/tests/function.test.ts","line":329,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/record.test.ts\nLine 590: // Should fail with unrecognized key, error checked via inline snapshot","file":"packages/zod/src/v4/classic/tests/record.test.ts","line":590,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/record.test.ts\nLine 619: // Should fail with unrecognized key","file":"packages/zod/src/v4/classic/tests/record.test.ts","line":619,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/record.test.ts\nLine 635: // Should fail with unrecognized key","file":"packages/zod/src/v4/classic/tests/record.test.ts","line":635,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/refine.test.ts\nLine 99: // Should fail with non-matching passwords","file":"packages/zod/src/v4/classic/tests/refine.test.ts","line":99,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/classic/tests/refine.test.ts\nLine 207: // Should fail with too many items and duplicates","file":"packages/zod/src/v4/classic/tests/refine.test.ts","line":207,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/refine.test.ts\nLine 243: // Should fail with too many items and duplicates","file":"packages/zod/src/v4/classic/tests/refine.test.ts","line":243,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/refine.test.ts\nLine 449: // Should fail with one error","file":"packages/zod/src/v4/classic/tests/refine.test.ts","line":449,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/refine.test.ts\nLine 460: // Should fail with two errors","file":"packages/zod/src/v4/classic/tests/refine.test.ts","line":460,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Should not throw - same schema instance used twice","query":"should throw same","file":"packages/zod/src/v4/classic/tests/registries.test.ts","symbol":"result","line":241,"lang":"en","candidates":[{"text":"File: packages/docs/content/library-authors.mdx\nLine 177: To future-proof this code, your `default` case should probably not throw an error. Instead, it should print an informative error and fall back to some reasonable behavior. If instead you `throw` an error in the default case, your library will be unusable i…","file":"packages/docs/content/library-authors.mdx","line":177,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/registries.test.ts\nLine 240: // Should not throw - same schema instance used twice","file":"packages/zod/src/v4/classic/tests/registries.test.ts","line":240,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/classic/tests/to-json-schema-methods.test.ts\nLine 405: // Both should throw the same error","file":"packages/zod/src/v4/classic/tests/to-json-schema-methods.test.ts","line":405,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Test the specific case from the user report","query":"test specific case","file":"packages/zod/src/v4/classic/tests/string.test.ts","symbol":"input","line":424,"lang":"en","candidates":[{"text":"File: AGENTS.md\nLine 45: - Never branch on specific schema types in shared code. No `def.type === \"optional\"` conditionals, no hardcoded lists of wrapper type names, no walks up the wrapper chain hunting for a particular type. Every schema type added later silently falls through s…","file":"AGENTS.md","line":45,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/string.test.ts\nLine 423: // Test the specific case from the user report","file":"packages/zod/src/v4/classic/tests/string.test.ts","line":423,"lexical":0.65,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"runtime rejects 1.5 in both orders, so both must emit type integer","query":"runtime rejects both","file":"packages/zod/src/v4/classic/tests/to-json-schema.test.ts","symbol":"after","line":810,"lang":"en","candidates":[{"text":"File: AGENTS.md\nLine 95: …tandard also requires the parties to agree the digit count, and runtimes disagree — JavaScript emits six digits, Java's `Instant` emits five, Python rejects both. Declined in #6154.","file":"AGENTS.md","line":95,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/to-json-schema.test.ts\nLine 809: // runtime rejects 1.5 in both orders, so both must emit type integer","file":"packages/zod/src/v4/classic/tests/to-json-schema.test.ts","line":809,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 1126: // Runtime z.number() rejects NaN and ±Infinity. Number.isFinite covers both.","file":"packages/zod/src/v4/core/compile.ts","line":1126,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"a `type` array must have unique members, so two branches that erase to the same bare type collapse","query":"type array must","file":"packages/zod/src/v4/classic/tests/to-json-schema.test.ts","symbol":"refined","line":1032,"lang":"en","candidates":[{"text":"File: packages/docs/content/api.mdx\nLine 10: To validate data, you must first define a *schema*. Schemas represent *types*, from simple primitive values to complex nested objects and arrays.","file":"packages/docs/content/api.mdx","line":10,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/to-json-schema.test.ts\nLine 1031: // a `type` array must have unique members, so two branches that erase to the same bare type collapse","file":"packages/zod/src/v4/classic/tests/to-json-schema.test.ts","line":1031,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/to-json-schema.ts\nLine 463: // A `type` array must be non-empty and unique (metaschema); a single member is spelled as a bare string.","file":"packages/zod/src/v4/core/to-json-schema.ts","line":463,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"An absent optional-output slot can only be swallowed when every later output slot is optional too.","query":"absent optional output","file":"packages/zod/src/v4/classic/tests/tuple.test.ts","symbol":"refusesUndefined","line":276,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/partial.test.ts\nLine 159: // Catch (d) and default/prefault (b, c, e, f) handle absent keys gracefully. `a: catch().optional()` short-circuits to undefined when the original input was undefined, so the property is omitted from the output. All other catch/default/prefault keys produ…","file":"packages/zod/src/v4/classic/tests/partial.test.ts","line":159,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/tuple.test.ts\nLine 274: test(\"tuple truncates absent optional rejections only when the output tail is optional\", () => {","file":"packages/zod/src/v4/classic/tests/tuple.test.ts","line":274,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/classic/tests/tuple.test.ts\nLine 275: // An absent optional-output slot can only be swallowed when every later output slot is optional too. If a later default would make the output tail required, truncating would violate the tuple's output type.","file":"packages/zod/src/v4/classic/tests/tuple.test.ts","line":275,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/tuple.test.ts\nLine 299: test(\"tuple rejects absent optional before required output under async parse\", async () => {","file":"packages/zod/src/v4/classic/tests/tuple.test.ts","line":299,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/tuple.test.ts\nLine 311: test(\"tuple rejects absent exact optional before defaulted output\", () => {","file":"packages/zod/src/v4/classic/tests/tuple.test.ts","line":311,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 1717: // Build the output in assignment order so absent optional-output tail slots can truncate while default/prefault slots still fill missing positions.","file":"packages/zod/src/v4/core/compile.ts","line":1717,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/schemas.ts\nLine 3055: …leTupleResults` walks them in order so it can decide whether an absent optional-output error can truncate the tail or must be reported to preserve required output.","file":"packages/zod/src/v4/core/schemas.ts","line":3055,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/schemas.ts\nLine 3124: // Walk results in order. Mirror $ZodObject's swallow-on-absent-optional rule, but only after `optoutStart`: the first index where the output tuple tail can be absent.","file":"packages/zod/src/v4/core/schemas.ts","line":3124,"lexical":0.44999999999999996,"target":false},{"text":"File: wiki/optionality.md\nLine 14: | `_zod.optout === \"optional\"` | optional, exact-optional, default-on-output cases | `$ZodObject`, `$ZodTuple` | \"My output may legitimately be `undefined`; treat that as absent for length-shortening / key-omission\" |","file":"wiki/optionality.md","line":14,"lexical":0.65,"target":false},{"text":"File: wiki/optionality.md\nLine 117: …nt)` for a middle-rung key; and `z.compile()` assembles its own output object, so `compileObject` applies `dropsWhenAbsent` — `optin === \"optional\" && optout === \"optional\"` — to pick the same condition, with the tuple compiler truncating instead of ru…","file":"wiki/optionality.md","line":117,"lexical":0.65,"target":false},{"text":"File: wiki/optionality.md\nLine 243: …intent was \"transform whatever shows up\", but they also wrote `.optional()` to say \"absent input → absent output\". The transform never claims the top rung, so `.optional()` wins — and under the ladder it wins *without* running the fn.","file":"wiki/optionality.md","line":243,"lexical":0.65,"target":false},{"text":"File: wiki/optionality.md\nLine 451: The `optin` ladder is what makes this safe to combine with `optional`: an escape hatch earns `\"optional\"` (absence permitted) but not `\"defaulted\"` (absence answered), so when an outer wrapper *also* has an opinion about absent input, the user's explicit `…","file":"wiki/optionality.md","line":451,"lexical":0.65,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"a plain function handing back a promise answers INVALID for union parity, so a transform is never a decidable rejection","query":"plain function handing","file":"packages/zod/src/v4/classic/tests/validate.test.ts","symbol":"piped","line":124,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/validate.test.ts\nLine 123: // a plain function handing back a promise answers INVALID for union parity, so a transform is never a decidable rejection","file":"packages/zod/src/v4/classic/tests/validate.test.ts","line":123,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 2188: …signal INVALID and the wrapper falls back to the runtime, and a plain function handing back a promise answers INVALID too — union parity, but not a decidable rejection at the top level.","file":"packages/zod/src/v4/core/compile.ts","line":2188,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"and a tuple's fixed items carry into its rest","query":"tuple fixed items","file":"packages/zod/src/v4/classic/tests/validate.test.ts","symbol":"tup","line":384,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/validate.test.ts\nLine 383: // and a tuple's fixed items carry into its rest","file":"packages/zod/src/v4/classic/tests/validate.test.ts","line":383,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/schemas.ts\nLine 33: /** Set only by `validate`/`validateAsync`. A container may stop before its next child, never inside one, so a map entry and a tuple's fixed items parse whole. */","file":"packages/zod/src/v4/core/schemas.ts","line":33,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"strips types that are not exposed in the public factory incl.","query":"strips types that","file":"packages/zod/src/v4/core/api.ts","symbol":"CheckParams","line":34,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/api.ts\nLine 32: // strips types that are not exposed in the public factory","file":"packages/zod/src/v4/core/api.ts","line":32,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/api.ts\nLine 39: // strips types that are not exposed in the public factory","file":"packages/zod/src/v4/core/api.ts","line":39,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"strips types that are not exposed in the public factory incl.","query":"strips types that","file":"packages/zod/src/v4/core/api.ts","symbol":"StringFormatParams","line":41,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/api.ts\nLine 32: // strips types that are not exposed in the public factory","file":"packages/zod/src/v4/core/api.ts","line":32,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/api.ts\nLine 39: // strips types that are not exposed in the public factory","file":"packages/zod/src/v4/core/api.ts","line":39,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Set on the parse ctx when a compiled wrapper falls back to the runtime, so nested compiled wrappers skip their fast paths for the rest of that parse.","query":"parse when compiled","file":"packages/zod/src/v4/core/compile.ts","symbol":"FALLBACK_FLAG","line":30,"lang":"en","candidates":[{"text":"File: packages/bench/compile-matrix.ts\nLine 320: // Every case shares one `safeParse` call site, and so do zod's own internal dispatch sites. Run all 55 in one process and those caches go megamorphic, which taxes the interpreter more than it taxes a single generated function, so the same schema reads fas…","file":"packages/bench/compile-matrix.ts","line":320,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/content/blog/introducing-z-compile.mdx\nLine 92: alt=\"Time per parse on a shared nanosecond axis, standard parser as a gray bar with the compiled time as a blue bar inside it: an array of 10 objects 377 ns to 68 ns (5.5x), a 20-key object 301 ns to 38 ns (7.8x), an array of 10 strings 241 ns to 33 ns (7.…","file":"packages/docs/content/blog/introducing-z-compile.mdx","line":92,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/content/blog/zod-4-5.mdx\nLine 55: alt=\"Time per parse on a shared nanosecond axis, standard parser as a gray bar with the compiled time as a blue bar inside it: an array of 10 objects 377 ns to 68 ns (5.5x), a 20-key object 301 ns to 38 ns (7.8x), an array of 10 strings 241 ns to 33 ns (7.…","file":"packages/docs/content/blog/zod-4-5.mdx","line":55,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/content/compile.mdx\nLine 44: alt=\"Time per parse on a shared nanosecond axis, standard parser as a gray bar with the compiled time as a blue bar inside it: an array of 10 objects 377 ns to 68 ns (5.5x), a 20-key object 301 ns to 38 ns (7.8x), an array of 10 strings 241 ns to 33 ns (7.…","file":"packages/docs/content/compile.mdx","line":44,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/public/blog/compile-speedup-dark.svg\nLine 1: …m, Segoe UI, Roboto, sans-serif\" font-size=\"13\"><title>Time per parse, standard parser versus compiled</title><text x=\"250\" y=\"16\" fill=\"#a3a29b\" font-size=\"12\">time per parse</text><rect x=\"432\" y=\"6\" width=\"10\" height=\"10\" rx=\"2\" fill=\"#3a3a38\"/><text x=…","file":"packages/docs/public/blog/compile-speedup-dark.svg","line":1,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/public/blog/compile-speedup-light.svg\nLine 1: …m, Segoe UI, Roboto, sans-serif\" font-size=\"13\"><title>Time per parse, standard parser versus compiled</title><text x=\"250\" y=\"16\" fill=\"#6b6a66\" font-size=\"12\">time per parse</text><rect x=\"432\" y=\"6\" width=\"10\" height=\"10\" rx=\"2\" fill=\"#e9e8e4\"/><text x=…","file":"packages/docs/public/blog/compile-speedup-light.svg","line":1,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/public/blog/compile-speedup.svg\nLine 1: … y=\"0\" width=\"720\" height=\"336\" fill=\"#fcfcfb\"/><title>Time per parse, standard parser versus compiled</title><text x=\"250\" y=\"16\" fill=\"#6b6a66\" font-size=\"12\">time per parse</text><rect x=\"432\" y=\"6\" width=\"10\" height=\"10\" rx=\"2\" fill=\"#e9e8e4\"/><text x=…","file":"packages/docs/public/blog/compile-speedup.svg","line":1,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/snippets/how-z-compile-works.mdx\nLine 42: <Callout>The compiled schema is purely additive on top of the existing schema. It tacks on the pre-compiled fast path for checking valid inputs. When invalid data is detected, it returns the `INVALID` symbol to signal that parsing should fall back to the u…","file":"packages/docs/snippets/how-z-compile-works.mdx","line":42,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 29: // Set on the parse ctx when a compiled wrapper falls back to the runtime, so nested compiled wrappers skip their fast paths for the rest of that parse.","file":"packages/zod/src/v4/core/compile.ts","line":29,"lexical":0.44999999999999996,"target":true},{"text":"File: wiki/compile.md\nLine 29: …ing under global mode where every nested schema carries its own compiled wrapper: when a wrapper falls back it flags the parse ctx, and downstream compiled wrappers skip their fast paths for the rest of that parse.","file":"wiki/compile.md","line":29,"lexical":0.44999999999999996,"target":false},{"text":"File: wiki/compile.md\nLine 39: …schema whose subtree contains a cycle is refused at codegen and parses through the runtime. Input containing a reference cycle terminates because the memoizer registers each in-progress output before its children run, keyed on the parse context every schem…","file":"wiki/compile.md","line":39,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Raised when the schema contains a feature whose semantics the fast path can't fully model.","query":"raised when schema","file":"packages/zod/src/v4/core/compile.ts","symbol":"ZodCompileUnsupportedError","line":58,"lang":"en","candidates":[{"text":"File: packages/docs/content/error-customization.mdx\nLine 427: 2. **Schema-level error** — Any error message \"hard coded\" into a schema definition. It covers issues raised by the schema's own checks, so it is the fallback when the check defines no error of its own.","file":"packages/docs/content/error-customization.mdx","line":427,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 44: /** Raised when the schema contains async refinements or transforms. Surfaces only under `compile(schema, { strict: true })`. */","file":"packages/zod/src/v4/core/compile.ts","line":44,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 53: * Raised when the schema contains a feature whose semantics the fast path","file":"packages/zod/src/v4/core/compile.ts","line":53,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/util.ts\nLine 949: // A schema that raised an issue itself owns it outright, and outranks any stamp an enclosing check left in `attachSchema`. String formats and z.custom() are schema and check at once, so when they act as a check they defer to that stamp instead.","file":"packages/zod/src/v4/core/util.ts","line":949,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"bypass the fast path and use the runtime directly.","query":"bypass fast path","file":"packages/zod/src/v4/core/compile.ts","symbol":"compile","line":126,"lang":"en","candidates":[{"text":"File: packages/zod/src/compile.ts\nLine 24: // Bypass the fast path for any non-forward / non-sync / check-skipping call. The runtime owns those contracts.","file":"packages/zod/src/compile.ts","line":24,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 120: * bypass the fast path and use the runtime directly.","file":"packages/zod/src/v4/core/compile.ts","line":120,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/tests/compile.test.ts\nLine 1241: test(\"compile bypasses fast path for backward direction (codec encode)\", () => {","file":"packages/zod/src/v4/core/tests/compile.test.ts","line":1241,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile.test.ts\nLine 1250: test(\"compile bypasses fast path for safeParseAsync\", async () => {","file":"packages/zod/src/v4/core/tests/compile.test.ts","line":1250,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile.test.ts\nLine 2000: test(\"withParser bypasses the fast path on async, like compile()\", async () => {","file":"packages/zod/src/v4/core/tests/compile.test.ts","line":2000,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Prototype for this constructor's `_zod` internals.","query":"prototype this constructor","file":"packages/zod/src/v4/core/core.ts","symbol":"zodProto","line":59,"lang":"en","candidates":[{"text":"File: AGENTS.md\nLine 79: …s closures. V8 sizes an instance's backing store in steps and `$constructor` assigns nothing itself, so instances get no in-object slots: **≤12 own properties cost 128 bytes, 13–20 cost 848, ≥21 cost 1616** (`packages/bench/memory/prop-slack.ts` meas…","file":"AGENTS.md","line":79,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/treeshake/bundle-size.test.ts\nLine 41: … the commit that caused it: installing a trait's members from `$constructor` rather than from its initializer costs mini +70 / +83 / +95, and every bundle carries `core.ts`; measured 2946 / 3420 / 4503 plus 28 headroom, and the per-fixture notes below reco…","file":"packages/treeshake/bundle-size.test.ts","line":41,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/instance-footprint.test.ts\nLine 199: // `super(def)` gives `this` a prototype of `new.target.prototype`, so a constructor can complete a construction without having built its own prototype.","file":"packages/zod/src/v4/classic/tests/instance-footprint.test.ts","line":199,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/core.ts\nLine 58: // Prototype for this constructor's `_zod` internals. Lazily-derived fields (`values`, `pattern`, `optin`, …) install here once rather than as an accessor on every instance.","file":"packages/zod/src/v4/core/core.ts","line":58,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"Prototypes that already carry the lazy `toString`.","query":"prototypes that already","file":"packages/zod/src/v4/core/errors.ts","symbol":"_installedToString","line":259,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/errors.ts\nLine 25: /* Prototypes that already carry the lazy helper methods. Seeded with the","file":"packages/zod/src/v4/classic/errors.ts","line":25,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/errors.ts\nLine 256: /* Prototypes that already carry the lazy `toString`. Seeded with the","file":"packages/zod/src/v4/core/errors.ts","line":256,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"when both minimum and exclusiveMinimum exist, pick the more restrictive one","query":"when both minimum","file":"packages/zod/src/v4/core/json-schema-processors.ts","symbol":"exMin","line":185,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/to-json-schema.test.ts\nLine 721: // When both minimum (from .int()) and exclusiveMinimum (from .positive()) exist, the more restrictive constraint should be used","file":"packages/zod/src/v4/classic/tests/to-json-schema.test.ts","line":721,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/json-schema-processors.ts\nLine 184: // when both minimum and exclusiveMinimum exist, pick the more restrictive one","file":"packages/zod/src/v4/core/json-schema-processors.ts","line":184,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"a value a cycle can close through","query":"value cycle close","file":"packages/zod/src/v4/core/memoizer.ts","symbol":"isRef","line":32,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/memoizer.ts\nLine 31: // a value a cycle can close through","file":"packages/zod/src/v4/core/memoizer.ts","line":31,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/memoizer.ts\nLine 231: // The value is a placeholder a back-edge is still waiting on, so the cycle closes through this transform. Its output can't exist in time to bind.","file":"packages/zod/src/v4/core/memoizer.ts","line":231,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Whether this schema's subtree contains a cycle, so one parse can re-enter it.","query":"whether this schema","file":"packages/zod/src/v4/core/memoizer.ts","symbol":"isRecursive","line":50,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/memoizer.ts\nLine 49: /** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */","file":"packages/zod/src/v4/core/memoizer.ts","line":49,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/memoizer.ts\nLine 190: * Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.","file":"packages/zod/src/v4/core/memoizer.ts","line":190,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/to-json-schema.ts\nLine 137: * output was never coherent — before this, whether a shared subschema was inlined or extracted","file":"packages/zod/src/v4/core/to-json-schema.ts","line":137,"lexical":0.65,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"resolving runs user code, and a factory mints a fresh subtree per read, so an edge the walk can't follow counts as a cycle","query":"resolving runs user","file":"packages/zod/src/v4/core/memoizer.ts","symbol":"child","line":73,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/cyclic-data.test.ts\nLine 858: // resolving a lazy runs user code, which can re-enter the walk; a walk that kept its certainty outside its own frames would have the inner one clobber the outer","file":"packages/zod/src/v4/classic/tests/cyclic-data.test.ts","line":858,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/memoizer.ts\nLine 72: // resolving runs user code, and a factory mints a fresh subtree per read, so an edge the walk can't follow counts as a cycle","file":"packages/zod/src/v4/core/memoizer.ts","line":72,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"RFC 3339 mandates seconds wherever the time carries a `Z` or an offset, so only the unqualified form `local` adds may omit them","query":"mandates seconds wherever","file":"packages/zod/src/v4/core/regexes.ts","symbol":"qualified","line":151,"lang":"en","candidates":[{"text":"File: packages/docs/content/api.mdx\nLine 464: To constrain the allowable time `precision`. By default, seconds are required and sub-second precision is arbitrary. RFC 3339 mandates the seconds wherever a `Z` or an offset is present, so only the unqualified form `local` adds may omit them.","file":"packages/docs/content/api.mdx","line":464,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/regexes.ts\nLine 150: // RFC 3339 mandates seconds wherever the time carries a `Z` or an offset, so only the unqualified form `local` adds may omit them","file":"packages/zod/src/v4/core/regexes.ts","line":150,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"regex for string with no uppercase letters","query":"regex string with","file":"packages/zod/src/v4/core/regexes.ts","symbol":"lowercase","line":175,"lang":"en","candidates":[{"text":"File: packages/bench/compile-endswith.ts\nLine 15: const endsWithRegex = (s: string) => {","file":"packages/bench/compile-endswith.ts","line":15,"lexical":0.65,"target":false},{"text":"File: packages/bench/compile-startswith.ts\nLine 15: const startsWithRegex = (s: string) => {","file":"packages/bench/compile-startswith.ts","line":15,"lexical":0.65,"target":false},{"text":"File: packages/docs/content/blog/zod-4-6.mdx\nLine 245: …ns for `z.base64()` and `z.base64url()` are the character sets, with length and padding enforced in code, so a multi-megabyte string can no longer overflow the regex stack through a composed schema. The JSON Schema output still emits the exact block forms,…","file":"packages/docs/content/blog/zod-4-6.mdx","line":245,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 737: type SupportedStringFormat = \"regex\" | \"lowercase\" | \"uppercase\" | \"includes\" | \"starts_with\" | \"ends_with\";","file":"packages/zod/src/v4/core/compile.ts","line":737,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/errors.ts\nLine 142: format: Exclude<$ZodStringFormats, \"regex\" | \"jwt\" | \"starts_with\" | \"ends_with\" | \"includes\">;","file":"packages/zod/src/v4/core/errors.ts","line":142,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/regexes.ts\nLine 174: // regex for string with no uppercase letters","file":"packages/zod/src/v4/core/regexes.ts","line":174,"lexical":0.65,"target":true},{"text":"File: packages/zod/src/v4/core/regexes.ts\nLine 176: // regex for string with no lowercase letters","file":"packages/zod/src/v4/core/regexes.ts","line":176,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/core/util.ts\nLine 991: // Code points in `str`: a surrogate pair counts once, a lone surrogate as itself. Hand-rolled because the string iterator allocates and runs ~250x slower on this path; the regex probe exits ~50x quicker for a string with no astral characters.","file":"packages/zod/src/v4/core/util.ts","line":991,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"regex for string with no lowercase letters","query":"regex string with","file":"packages/zod/src/v4/core/regexes.ts","symbol":"uppercase","line":177,"lang":"en","candidates":[{"text":"File: packages/bench/compile-endswith.ts\nLine 15: const endsWithRegex = (s: string) => {","file":"packages/bench/compile-endswith.ts","line":15,"lexical":0.65,"target":false},{"text":"File: packages/bench/compile-startswith.ts\nLine 15: const startsWithRegex = (s: string) => {","file":"packages/bench/compile-startswith.ts","line":15,"lexical":0.65,"target":false},{"text":"File: packages/docs/content/blog/zod-4-6.mdx\nLine 245: …ns for `z.base64()` and `z.base64url()` are the character sets, with length and padding enforced in code, so a multi-megabyte string can no longer overflow the regex stack through a composed schema. The JSON Schema output still emits the exact block forms,…","file":"packages/docs/content/blog/zod-4-6.mdx","line":245,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 737: type SupportedStringFormat = \"regex\" | \"lowercase\" | \"uppercase\" | \"includes\" | \"starts_with\" | \"ends_with\";","file":"packages/zod/src/v4/core/compile.ts","line":737,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/errors.ts\nLine 142: format: Exclude<$ZodStringFormats, \"regex\" | \"jwt\" | \"starts_with\" | \"ends_with\" | \"includes\">;","file":"packages/zod/src/v4/core/errors.ts","line":142,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/regexes.ts\nLine 174: // regex for string with no uppercase letters","file":"packages/zod/src/v4/core/regexes.ts","line":174,"lexical":0.65,"target":true},{"text":"File: packages/zod/src/v4/core/regexes.ts\nLine 176: // regex for string with no lowercase letters","file":"packages/zod/src/v4/core/regexes.ts","line":176,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/core/util.ts\nLine 991: // Code points in `str`: a surrogate pair counts once, a lone surrogate as itself. Hand-rolled because the string iterator allocates and runs ~250x slower on this path; the regex probe exits ~50x quicker for a string with no astral characters.","file":"packages/zod/src/v4/core/util.ts","line":991,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Gives a container cycle support: `attach` wraps its parse, and `alloc` registers the object it builds into before any child is parsed so a reference back to the same input resolves to it.","query":"gives container cycle","file":"packages/zod/src/v4/core/schemas.ts","symbol":"$ZodMemoizer","line":38,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/memoizer.ts\nLine 322: /** The memoizer that gives containers cycle support. `zod` installs it by default; `zod/mini` opts in with `config({ memoizer: memoizer() })`. */","file":"packages/zod/src/v4/core/memoizer.ts","line":322,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/schemas.ts\nLine 37: /** Gives a container cycle support: `attach` wraps its parse, and `alloc` registers the object it builds into before any child is parsed so a reference back to the same input resolves to it. */","file":"packages/zod/src/v4/core/schemas.ts","line":37,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"A schema may throw rather than return — an async check reached synchronously does.","query":"schema throw rather","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","symbol":"at","line":66,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/compile.ts\nLine 297: /** Hoists a user-supplied callback. Anything the schema's author wrote can throw, and generated code can reject an earlier sibling before ever reaching it, so this clears `definite` — a rejection is then no longer proof that the interpreter would have r…","file":"packages/zod/src/v4/core/compile.ts","line":297,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile-differential.test.ts\nLine 65: // A schema may throw rather than return — an async check reached synchronously does. Both sides have to agree on that too, and comparing results would just rethrow.","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","line":65,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/tests/compile-differential.test.ts\nLine 576: …s a different string with no error anywhere. Refusing the whole schema is what keeps the container honest, so this asserts the throw rather than a matching value.","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","line":576,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"The callback reads issues finalized against the caller's per-parse error map, which generated code has no access to.","query":"callback reads issues","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","symbol":"schema","line":569,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/tests/compile-differential.test.ts\nLine 568: // The callback reads issues finalized against the caller's per-parse error map, which generated code has no access to. Refusing at codegen is what makes it safe inside a union; returning INVALID at parse time would read as a rejected branch.","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","line":568,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/core/util.ts\nLine 1272: …tch value. `Function.length` cannot tell that thunk from a user callback — rest and defaulted parameters both report arity 0 — and a user callback reads `ctx.error`, whose issues only finalize correctly against the caller's per-parse error map. Provena…","file":"packages/zod/src/v4/core/util.ts","line":1272,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"own-key order and undefined-valued-vs-absent keys, which toStrictEqual does not see","query":"order undefined valued","file":"packages/zod/src/v4/core/tests/compile-generative.test.ts","symbol":"shape","line":389,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/tests/compile-differential.test.ts\nLine 15: // Stricter-than-toEqual structural identity: own-key order, symbol keys, undefined-valued vs absent keys, array holes, frozenness, NaN/-0.","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","line":15,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile-generative.test.ts\nLine 388: // own-key order and undefined-valued-vs-absent keys, which toStrictEqual does not see","file":"packages/zod/src/v4/core/tests/compile-generative.test.ts","line":388,"lexical":0.44999999999999996,"target":true},{"text":"File: scripts/compile-fuzz.ts\nLine 216: // Structural equality that is strict about the things parity actually turns on: key order, absent vs undefined-valued keys, NaN, -0, frozenness.","file":"scripts/compile-fuzz.ts","line":216,"lexical":0.44999999999999996,"target":false},{"text":"File: wiki/compile.md\nLine 30: …ility, verified via differential tests against the runtime (key order, `undefined`-valued vs absent keys, array holes, frozenness, and NaN/-0 included — plus a per-fixture assertion that the fast path actually produced the value rather than silently fall…","file":"wiki/compile.md","line":30,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"First parse: shim fires, compiles, replaces self.","query":"first parse shim","file":"packages/zod/src/v4/core/tests/compile-global.test.ts","symbol":"r1","line":22,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/tests/compile-global.test.ts\nLine 21: // First parse: shim fires, compiles, replaces self.","file":"packages/zod/src/v4/core/tests/compile-global.test.ts","line":21,"lexical":0.44999999999999996,"target":true},{"text":"File: wiki/compile.md\nLine 51: …does **not** compile eagerly. It installs a one-shot `_zod.run` shim that compiles on first parse and overwrites itself. This avoids paying compile cost for the N-1 throwaway intermediate schemas in any builder chain (`z.string().min(3).max(10).regex(...)`…","file":"wiki/compile.md","line":51,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Without this the shim leaves no validator behind, validate misses its fast path and answers from the runtime parser instead.","query":"without this shim","file":"packages/zod/src/v4/core/tests/compile-global.test.ts","symbol":"bag","line":81,"lang":"en","candidates":[{"text":"File: packages/zod/src/compile.ts\nLine 52: // Expose the pre-shim runtime so `compile()` invoked elsewhere can unwrap past the shim and capture the source-of-truth runtime. Without this, a user calling `z.compile(s)` after global mode is enabled would capture the shim itself, which would feed the w…","file":"packages/zod/src/compile.ts","line":52,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile-global.test.ts\nLine 80: // Without this the shim leaves no validator behind, validate misses its fast path and answers from the runtime parser instead. Correct, so nothing else in the suite notices, and several times slower.","file":"packages/zod/src/v4/core/tests/compile-global.test.ts","line":80,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"Differential helper: assert compiled schema matches the original on a value.","query":"differential helper assert","file":"packages/zod/src/v4/core/tests/compile.test.ts","symbol":"expectMatch","line":15,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/tests/compile-differential.test.ts\nLine 755: … a rejected branch and answers with a later one. Routed through differential() precisely so assertUnionSound sees it; the previous bespoke helper skipped that and is why this shipped.","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","line":755,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile.test.ts\nLine 14: // Differential helper: assert compiled schema matches the original on a value.","file":"packages/zod/src/v4/core/tests/compile.test.ts","line":14,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"Test with a type that's not in the TypeNames dictionary.","query":"test with type","file":"packages/zod/src/v4/core/tests/locales/es.test.ts","symbol":"dateSchema","line":113,"lang":"en","candidates":[{"text":"File: AGENTS.md\nLine 9: Run scripts with `nub run`, repository TypeScript with `nub <file>`, and installed tools with `nub exec --node <tool>`. Keep third-party tools and built-package compatibility probes on plain Node; Nub's augmentation must not mask resolution errors or chang…","file":"AGENTS.md","line":9,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/docs/snippets/how-z-compile-works.mdx\nLine 24: …e majority of inputs, the generated function validates the data with the fastest logic JavaScript can express: straight-line `typeof` checks and property reads, with no interpreter in between. When it can't handle an input, Zod falls back to the standard p…","file":"packages/docs/snippets/how-z-compile-works.mdx","line":24,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v3/tests/error.test.ts\nLine 41: test(\"type error with custom error map\", () => {","file":"packages/zod/src/v3/tests/error.test.ts","line":41,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v3/tests/language-server.test.ts\nLine 7: // The following tool is helpful for understanding the TypeScript AST associated with these tests: https://ts-ast-viewer.com/ (just copy the contents of language-server.source into the viewer)","file":"packages/zod/src/v3/tests/language-server.test.ts","line":7,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v3/tests/object.test.ts\nLine 207: test(\"inferred merged object type with optional properties\", async () => {","file":"packages/zod/src/v3/tests/object.test.ts","line":207,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v3/tests/object.test.ts\nLine 217: test(\"inferred unioned object type with optional properties\", async () => {","file":"packages/zod/src/v3/tests/object.test.ts","line":217,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v3/tests/object.test.ts\nLine 242: test(\"inferred partial object type with optional properties\", async () => {","file":"packages/zod/src/v3/tests/object.test.ts","line":242,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v3/tests/object.test.ts\nLine 248: test(\"inferred picked object type with optional properties\", async () => {","file":"packages/zod/src/v3/tests/object.test.ts","line":248,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v3/tests/recursive.test.ts\nLine 175: // test(\"self recursion with base type\", () => {","file":"packages/zod/src/v3/tests/recursive.test.ts","line":175,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/codec.test.ts\nLine 125: test(\"codec with different types\", () => {","file":"packages/zod/src/v4/classic/tests/codec.test.ts","line":125,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/error.test.ts\nLine 84: test(\"type error with custom error map\", () => {","file":"packages/zod/src/v4/classic/tests/error.test.ts","line":84,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/fix-json-issue.test.ts\nLine 24: test(\"issue reproduction should compile without type errors\", () => {","file":"packages/zod/src/v4/classic/tests/fix-json-issue.test.ts","line":24,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/from-json-schema.test.ts\nLine 358: test(\"type with anyOf creates intersection\", () => {","file":"packages/zod/src/v4/classic/tests/from-json-schema.test.ts","line":358,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/from-json-schema.test.ts\nLine 377: test(\"type with oneOf creates intersection\", () => {","file":"packages/zod/src/v4/classic/tests/from-json-schema.test.ts","line":377,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/from-json-schema.test.ts\nLine 584: test(\"propertyNames subschema without a type still constrains keys\", () => {","file":"packages/zod/src/v4/classic/tests/from-json-schema.test.ts","line":584,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/in-out.test.ts\nLine 146: test(\"runtime `z.input` agrees with type-level `z.input<T>`\", () => {","file":"packages/zod/src/v4/classic/tests/in-out.test.ts","line":146,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/index.test.ts\nLine 950: test(\"type narrowing works with type property\", () => {","file":"packages/zod/src/v4/classic/tests/index.test.ts","line":950,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/object.test.ts\nLine 217: test(\"inferred type with Record shape\", () => {","file":"packages/zod/src/v4/classic/tests/object.test.ts","line":217,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/object.test.ts\nLine 227: test(\"inferred merged object type with optional properties\", async () => {","file":"packages/zod/src/v4/classic/tests/object.test.ts","line":227,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/object.test.ts\nLine 235: test(\"inferred unioned object type with optional properties\", async () => {","file":"packages/zod/src/v4/classic/tests/object.test.ts","line":235,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/object.test.ts\nLine 277: test(\"inferred partial object type with optional properties\", async () => {","file":"packages/zod/src/v4/classic/tests/object.test.ts","line":277,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/object.test.ts\nLine 283: test(\"inferred picked object type with optional properties\", async () => {","file":"packages/zod/src/v4/classic/tests/object.test.ts","line":283,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/recursive-types.test.ts\nLine 356: test(\"intersection with recursive types\", () => {","file":"packages/zod/src/v4/classic/tests/recursive-types.test.ts","line":356,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/recursive-types.test.ts\nLine 395: test(\"object utilities with recursive types\", () => {","file":"packages/zod/src/v4/classic/tests/recursive-types.test.ts","line":395,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/recursive-types.test.ts\nLine 462: test(\"tuple with recursive types\", () => {","file":"packages/zod/src/v4/classic/tests/recursive-types.test.ts","line":462,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/recursive-types.test.ts\nLine 634: test(\"recursive type with `id` meta\", () => {","file":"packages/zod/src/v4/classic/tests/recursive-types.test.ts","line":634,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile.test.ts\nLine 786: test(\"template literal with types\", () => {","file":"packages/zod/src/v4/core/tests/compile.test.ts","line":786,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/core/tests/locales/el.test.ts\nLine 204: test(\"Greek locale - invalid_type with instanceof (class-name expected)\", () => {","file":"packages/zod/src/v4/core/tests/locales/el.test.ts","line":204,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/core/tests/locales/es.test.ts\nLine 112: // Test with a type that's not in the TypeNames dictionary. This will test the fallback behavior","file":"packages/zod/src/v4/core/tests/locales/es.test.ts","line":112,"lexical":0.65,"target":true},{"text":"File: packages/zod/src/v4/core/tests/record-constructor.test.ts\nLine 60: test(\"record should work with different key types and constructor field\", () => {","file":"packages/zod/src/v4/core/tests/record-constructor.test.ts","line":60,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/assignability.test.ts\nLine 180: test(\"assignability with type narrowing\", () => {","file":"packages/zod/src/v4/mini/tests/assignability.test.ts","line":180,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/codec.test.ts\nLine 128: test(\"codec with different types\", () => {","file":"packages/zod/src/v4/mini/tests/codec.test.ts","line":128,"lexical":0.65,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"singular units after numerals in Tajik","query":"singular units after","file":"packages/zod/src/v4/core/tests/locales/tg.test.ts","symbol":"tooShort","line":28,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/tests/locales/tg.test.ts\nLine 27: // singular units after numerals in Tajik","file":"packages/zod/src/v4/core/tests/locales/tg.test.ts","line":27,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/locales/tg.ts\nLine 6: // singular units after numerals in Tajik","file":"packages/zod/src/v4/locales/tg.ts","line":6,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Natural Hebrew for arrays and sets","query":"natural hebrew arrays","file":"packages/zod/src/v4/locales/he.ts","symbol":"verb","line":155,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/locales/he.ts\nLine 154: // Natural Hebrew for arrays and sets","file":"packages/zod/src/v4/locales/he.ts","line":154,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/locales/he.ts\nLine 186: // Natural Hebrew for arrays and sets","file":"packages/zod/src/v4/locales/he.ts","line":186,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Natural Hebrew for arrays and sets","query":"natural hebrew arrays","file":"packages/zod/src/v4/locales/he.ts","symbol":"verb","line":187,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/locales/he.ts\nLine 154: // Natural Hebrew for arrays and sets","file":"packages/zod/src/v4/locales/he.ts","line":154,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/locales/he.ts\nLine 186: // Natural Hebrew for arrays and sets","file":"packages/zod/src/v4/locales/he.ts","line":186,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"singular units after numerals in Tajik","query":"singular units after","file":"packages/zod/src/v4/locales/tg.ts","symbol":"Sizable","line":7,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/core/tests/locales/tg.test.ts\nLine 27: // singular units after numerals in Tajik","file":"packages/zod/src/v4/core/tests/locales/tg.test.ts","line":27,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/locales/tg.ts\nLine 6: // singular units after numerals in Tajik","file":"packages/zod/src/v4/locales/tg.ts","line":6,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"keeping brands out of input types","query":"keeping brands input","file":"packages/zod/src/v4/mini/tests/brand.test.ts","symbol":"age","line":40,"lang":"en","candidates":[{"text":"File: packages/zod/src/v3/tests/branded.test.ts\nLine 41: // keeping brands out of input types","file":"packages/zod/src/v3/tests/branded.test.ts","line":41,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/brand.test.ts\nLine 39: // keeping brands out of input types","file":"packages/zod/src/v4/classic/tests/brand.test.ts","line":39,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/brand.test.ts\nLine 39: // keeping brands out of input types","file":"packages/zod/src/v4/mini/tests/brand.test.ts","line":39,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"These should compile without type errors","query":"these should compile","file":"packages/zod/src/v4/mini/tests/codec.test.ts","symbol":"decoded","line":181,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/codec.test.ts\nLine 177: // These should compile without type errors","file":"packages/zod/src/v4/classic/tests/codec.test.ts","line":177,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/codec.test.ts\nLine 418: // These should compile without errors - correct types (async support)","file":"packages/zod/src/v4/classic/tests/codec.test.ts","line":418,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/codec.test.ts\nLine 180: // These should compile without type errors","file":"packages/zod/src/v4/mini/tests/codec.test.ts","line":180,"lexical":0.44999999999999996,"target":true},{"text":"File: packages/zod/src/v4/mini/tests/codec.test.ts\nLine 413: // These should compile without errors - correct types (async support)","file":"packages/zod/src/v4/mini/tests/codec.test.ts","line":413,"lexical":0.44999999999999996,"target":false}]} | |
| {"site":"project_search","repo":"zod","task":"Test that both sync and async work","query":"test that both","file":"packages/zod/src/v4/mini/tests/codec.test.ts","symbol":"mixedCodec","line":475,"lang":"en","candidates":[{"text":"File: AGENTS.md\nLine 83: …his: dump every descriptor, alias and assign/delete semantic on both revisions and diff them. It caught four real regressions that tests did not.","file":"AGENTS.md","line":83,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/codec.test.ts\nLine 555: // Test that both sync and async work","file":"packages/zod/src/v4/classic/tests/codec.test.ts","line":555,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/discriminated-unions.test.ts\nLine 659: // Test that both discriminator values are correctly included in propValues","file":"packages/zod/src/v4/classic/tests/discriminated-unions.test.ts","line":659,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/classic/tests/to-json-schema.test.ts\nLine 872: // Test that both old (draft-4, draft-7) and new (draft-04, draft-07) target formats work","file":"packages/zod/src/v4/classic/tests/to-json-schema.test.ts","line":872,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile-differential.test.ts\nLine 647: …inline — the trim, the `://` guard, the hostname and protocol tests, the normalize step. Deduplicating them faithfully is awkward, because hostname and protocol can both fail and each pushes its own issue, so the shared helper would have to return a list…","file":"packages/zod/src/v4/core/tests/compile-differential.test.ts","line":647,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/core/tests/compile-off-by-default.test.ts\nLine 6: …lobal compilation is opt-in through `import \"zod/compile\"`, and that opt-in mutates `globalThis.__zod_globalConfig` — process-global state, not module state. Two things therefore have to hold, and neither is evident from reading the module: importing zod…","file":"packages/zod/src/v4/core/tests/compile-off-by-default.test.ts","line":6,"lexical":0.65,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/codec.test.ts\nLine 474: // Test that both sync and async work","file":"packages/zod/src/v4/mini/tests/codec.test.ts","line":474,"lexical":0.65,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"A wrapper over a pipe-free schema keeps both its value and its identity.","query":"wrapper over pipe","file":"packages/zod/src/v4/mini/tests/codec.test.ts","symbol":"plain","line":579,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/in-out.test.ts\nLine 131: test(\"a wrapper over a pipe-free schema keeps both its value and its identity\", () => {","file":"packages/zod/src/v4/classic/tests/in-out.test.ts","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/codec.test.ts\nLine 578: // A wrapper over a pipe-free schema keeps both its value and its identity.","file":"packages/zod/src/v4/mini/tests/codec.test.ts","line":578,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"local: false, offset: false, precision: null","query":"local false offset","file":"packages/zod/src/v4/mini/tests/index.test.ts","symbol":"a","line":148,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/index.test.ts\nLine 91: // local: false, offset: false, precision: null","file":"packages/zod/src/v4/classic/tests/index.test.ts","line":91,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/index.test.ts\nLine 147: // local: false, offset: false, precision: null","file":"packages/zod/src/v4/mini/tests/index.test.ts","line":147,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"An option whose shape cannot be listed without resolving it is left to the lookup map, on the first object parsed.","query":"option whose shape","file":"packages/zod/src/v4/mini/tests/index.test.ts","symbol":"viaPipe","line":334,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/discriminated-unions.test.ts\nLine 275: // An option whose shape cannot be listed without resolving it — a pipe here — is left to the lookup map, and fails on the first object parsed.","file":"packages/zod/src/v4/classic/tests/discriminated-unions.test.ts","line":275,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/api.ts\nLine 1255: …erly through `propValues` is not available: reading it runs the option's shape getters, and for a recursive option that getter references the union whose initializer is still running, so it throws `ReferenceError: Cannot access '...' before initialization`…","file":"packages/zod/src/v4/core/api.ts","line":1255,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/core/schemas.ts\nLine 2721: // Checked now rather than in the lookup map below, so an option that lacks the discriminator fails at the `discriminatedUnion` call instead of on the first object parsed. Options whose shape cannot be enumerated without resolving it — pipes and lazies —…","file":"packages/zod/src/v4/core/schemas.ts","line":2721,"lexical":0.44999999999999996,"target":false},{"text":"File: packages/zod/src/v4/mini/tests/index.test.ts\nLine 333: // An option whose shape cannot be listed without resolving it is left to the lookup map, on the first object parsed.","file":"packages/zod/src/v4/mini/tests/index.test.ts","line":333,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"JSON.stringify throws on BigInt and drops Symbols, Maps and Sets — none of which the grammar can avoid generating.","query":"json stringify throws","file":"scripts/compile-fuzz.ts","symbol":"ser","line":280,"lang":"en","candidates":[{"text":"File: packages/zod/src/v4/classic/tests/to-json-schema.test.ts\nLine 2699: // under the default strict mode the inner type throws first; a representable inner type surfaces the default's own error rather than a raw `JSON.stringify` TypeError","file":"packages/zod/src/v4/classic/tests/to-json-schema.test.ts","line":2699,"lexical":0.65,"target":false},{"text":"File: scripts/compile-fuzz.ts\nLine 279: /** JSON.stringify throws on BigInt and drops Symbols, Maps and Sets — none of which the grammar can avoid generating. */","file":"scripts/compile-fuzz.ts","line":279,"lexical":0.44999999999999996,"target":true}]} | |
| {"site":"project_search","repo":"zod","task":"Each channel is log-compressed independently so a single 200-comment thread can't outrank broad, quiet demand — and reactions stay the dominant term.","query":"each channel compressed","file":"scripts/triage-signal.ts","symbol":"voices","line":336,"lang":"en","candidates":[{"text":"File: scripts/triage-signal.ts\nLine 335: // Each channel is log-compressed independently so a single 200-comment thread can't outrank broad, quiet demand — and reactions stay the dominant term.","file":"scripts/triage-signal.ts","line":335,"lexical":0.44999999999999996,"target":true},{"text":"File: scripts/triage-signal.ts\nLine 602: \"Each channel is log-compressed on its own so one runaway thread can't dominate, and reactions outweigh comments because a reaction is one-per-person while a comment count can be two people arguing.\"","file":"scripts/triage-signal.ts","line":602,"lexical":0.44999999999999996,"target":false}]} | |