chore(deps): update dependency zod to v3.22.3 [security]
This PR contains the following updates:
| Package | Change | Age | Confidence |
|---|---|---|---|
| zod (source) | 3.21.4 -> 3.22.3 |
GitHub Vulnerability Alerts
CVE-2023-4316
Zod version 3.22.2 allows an attacker to perform a denial of service while validating emails.
Release Notes
colinhacks/zod (zod)
v3.22.3
Commits:
-
1e23990Commit -
9bd3879docs: remove obsolete text about readonly types (#2676) -
f59be09clarify datetime ISO 8601 (#2673) -
64dcc8eUpdate sponsors -
18115a8Formatting -
28c1927Update sponsors -
ad2ee9c2718 Updated Custom Schemas documentation example to use type narrowing (#2778) -
ae0f7a2docs: update ref to discriminated-unions docs (#2485) -
2ba00fe[2609] fix ReDoS vulnerability in email regex (#2824) -
1e61d763.22.3
v3.22.2
Commits:
-
13d9e6bFix lint -
0d49f10docs: add typeschema to ecosystem (#2626) -
8e4af7bX to Zod: add app.quicktype.io (#2668) -
792b3efFix superrefine types
v3.22.1
Commits:
Fix handing of this in ZodFunction schemas. The parse logic for function schemas now requires the Reflect API.
const methodObject = z.object({
property: z.number(),
method: z.function().args(z.string()).returns(z.number()),
});
const methodInstance = {
property: 3,
method: function (s: string) {
return s.length + this.property;
},
};
const parsed = methodObject.parse(methodInstance);
parsed.method("length=8"); // => 11 (8 length + 3 property)
v3.22.0
ZodReadonly
This release introduces ZodReadonly and the .readonly() method on ZodType.
Calling .readonly() on any schema returns a ZodReadonly instance that wraps the original schema. The new schema parses all inputs using the original schema, then calls Object.freeze() on the result. The inferred type is also marked as readonly.
const schema = z.object({ name: string }).readonly();
type schema = z.infer<typeof schema>;
// Readonly<{name: string}>
const result = schema.parse({ name: "fido" });
result.name = "simba"; // error
The inferred type uses TypeScript's built-in readonly types when relevant.
z.array(z.string()).readonly();
// readonly string[]
z.tuple([z.string(), z.number()]).readonly();
// readonly [string, number]
z.map(z.string(), z.date()).readonly();
// ReadonlyMap<string, Date>
z.set(z.string()).readonly();
// ReadonlySet<Promise<string>>
Commits:
-
6dad907Comments -
56ace68Fix deno test -
3809d54Add superforms -
d1ad522Add transloadit -
a3bb701Testing on Typescript 5.0 (#2221) -
51e14bedocs: update deprecated link (#2219) -
a263814fixed Datetime & IP TOC links -
502384edocs: add mobx-zod-form to form integrations (#2299) -
a8be450docs: Addzockerto Ecosystem section (#2416) -
15de22aAllow subdomains and hyphens inZodString.email(#2274) -
00f5783Addzod-openapito ecosystem (#2434) -
0a17340docs: fix minor typo (#2439) -
60a2134Add masterborn -
0a90ed1chore: moveexports.typesfield to first spot @ package.json. (#2443) -
67f35b1docs: allow Zod to be used in dev tools at site (#2432) -
6795c57Fix not working Deno doc link. (#2428) -
37e9c55Generalize uuidRegex -
0969950adds ctx to preprocess (#2426) -
af08390fix: super refinement function types (#2420) -
36fef58Make email regex reasonable (#2157) -
f627d14Document canary -
e06321cdocs: add tapiduck to API libraries (#2410) -
11e507cdocs: add ts as const example in zod enums (#2412) -
5427565docs: add zod-fixture to mocking ecosystem (#2409) -
d3bf7e6docs: addzodockto mocking ecosystem (#2394) -
2270ae5remove "as any" casts in createZodEnum (#2332) -
00bdd0afix proto pollution vulnerability (#2239) -
a3c5256Fix error_handling unrecognized_keys example -
4f75cbcAdds getters to Map for key + value (#2356) -
ca7b032FMC (#2346) -
6fec8bddocs: fix typo in link fragment (#2329) -
16f90bdUpdate README.md -
2c80250Update readme -
eaf64e0Update sponsors -
c576311Update readme -
5e23b4fAdd*.mdpattern to prettier (#2476) -
898dcedRevamp tests -
6309322Update test runners -
c0aece1Add vitest config -
73a5610Update script -
8d8e1a2Fix deno test bug -
9eb2508Clean up configs -
cfbc7b3Fix root jest config -
8677f68docs(comparison-yup): Yup added partial() and deepPartial() in v1 (#2603) -
fb00edddocs: add VeeValidate form library for Vue.js (#2578) -
ab8e717docs: fix typo in z.object (#2570) -
d870407docs: fix incomplete Records example (#2579) -
5adae24docs: add conform form integration (#2577) -
8b8ab3eUpdate README.md (#2562) -
6aab901fix typo test name (#2542) -
81a89f5Update nullish documentation to correct chaining order (#2457) -
78a4090docs: update comparison withruntypes(#2536) -
1ecd624Fix prettier -
981d4b5Add ZodReadonly (#2634) -
fba438c3.22.0
Configuration
📅 Schedule: Branch creation - "" in timezone Europe/Paris, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
Quality Gate passed
Issues
0 New issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎
| Package | New capabilities | Transitives | Size | Publisher |
|---|
🚮 Removed packages: npm/[email protected]
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎
This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code