Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix(deps): update dependency zod to v3.22.3 [security] #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 3, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
zod (source) 3.21.4 -> 3.22.3 age adoption passing confidence

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

Compare Source

Commits:

v3.22.2

Compare Source

Commits:

v3.22.1

Compare Source

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

Compare Source

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:


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, 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.

@changeset-bot
Copy link

changeset-bot bot commented Oct 3, 2023

⚠️ No Changeset found

Latest commit: 9a70cd5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 2 times, most recently from af86f75 to 01cf7e0 Compare October 5, 2023 01:16
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 3 times, most recently from 72c583c to 7242a9f Compare October 16, 2023 22:36
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch from 7242a9f to d969e7b Compare November 2, 2023 02:08
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 9 times, most recently from 2f056c4 to 9d1c23c Compare November 16, 2023 08:03
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 5 times, most recently from 9e6e799 to 16c1f59 Compare November 18, 2023 09:45
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 2 times, most recently from 0a9503c to e0a58c4 Compare December 11, 2023 21:22
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 2 times, most recently from 13c0fab to a32428a Compare December 23, 2023 00:05
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch from a32428a to 944a64d Compare January 2, 2024 17:08
@renovate renovate bot changed the title fix(deps): update dependency zod to v3.22.3 [security] fix(deps): update dependency zod to v3.22.3 [security] - autoclosed Feb 23, 2024
@renovate renovate bot closed this Feb 23, 2024
@renovate renovate bot deleted the renovate/npm-zod-vulnerability branch February 23, 2024 22:36
@renovate renovate bot changed the title fix(deps): update dependency zod to v3.22.3 [security] - autoclosed fix(deps): update dependency zod to v3.22.3 [security] Feb 24, 2024
@renovate renovate bot restored the renovate/npm-zod-vulnerability branch February 24, 2024 00:04
@renovate renovate bot reopened this Feb 24, 2024
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch from 944a64d to bb8fce5 Compare February 24, 2024 00:06
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch 2 times, most recently from ceff407 to c472cde Compare April 25, 2024 11:06
@renovate renovate bot force-pushed the renovate/npm-zod-vulnerability branch from c472cde to 9a70cd5 Compare June 4, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants