Skip to content

[Snyk] Upgrade zod from 3.23.8 to 3.24.2 #109

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

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

Conversation

nerdy-tech-com-gitub
Copy link
Owner

@nerdy-tech-com-gitub nerdy-tech-com-gitub commented Apr 20, 2025

Sweep Summary Sweep

Implements follow/unfollow functionality in the Android app with UI updates and API integration.

  • Added a "Follow" button in activity_main.xml that toggles between follow and unfollow states.
  • Created follow/unfollow API endpoint in UserService.kt and implemented repository methods in UserRepository.kt and UserRepositoryImpl.kt.
  • Implemented UI state handling in MainViewModel.kt to manage follow status and button text updates.
  • Added click handler in MainActivity.kt to trigger the follow/unfollow action and update the UI accordingly.

Ask Sweep AI questions about this PR

snyk-top-banner

Snyk has created this PR to upgrade zod from 3.23.8 to 3.24.2.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 19 versions ahead of your current version.

  • The recommended version was released 2 months ago.

Release notes
Package name: zod
  • 3.24.2 - 2025-02-11

    Notes

    Support asynchronous checks in z.custom() .

    const customSchema = z.custom<number>(async (x) => {
      return typeof x === "number";
    });

    Commits:

  • 3.24.1 - 2024-12-11

    Commits:

  • 3.24.0 - 2024-12-10

    Implement @ standard-schema/spec

    This is the first version of Zod to implement the Standard Schema spec. This is a new community effort among several validation library authors to implement a common interface, with the goal of simplifying the process of integrating schema validators with the rest of the ecosystem. Read more about the project and goals here.

    z.string().jwt()

    Thanks to @ Mokshit06 and @ Cognition-Labs for this contribution!

    To verify that a string is a valid 3-part JWT.

    z.string().jwt();
    

    ⚠️ This does not verify your JWT cryptographically! It merely ensures its in the proper format. Use a library like jsonwebtoken to verify the JWT signature, parse the token, and read the claims.

    To constrain the JWT to a specific algorithm:

    z.string().jwt({ alg: "RS256" });

    z.string().base64url()

    Thank you to @ marvinruder!

    To complement the JWT validation, Zod 3.24 implements a standalone .base64url() string validation API. (The three elements of JWTs are base64url-encoded JSON strings.)

    z.string().base64url()

    This functionality is available along the standard z.string().base64() validator added in Zod 3.23.

    z.string().cidr()

    Thanks to @ wataryooou for their work on this!

    A validator for CIDR notation for specifying IP address ranges, e.g. 192.24.12.0/22.

    z.string().cidr()

    To specify an IP version:

    z.string().cidr({ version: "v4" })
    z.string().cidr({ version: "v6" })

    View the full diff from 3.23.8: v3.23.8...v3.24.0

  • 3.24.0-canary.20241210T065401 - 2024-12-10
  • 3.24.0-canary.20241210T060351 - 2024-12-10
  • 3.24.0-canary.20241210T025401 - 2024-12-10
  • 3.24.0-canary.20241210T025031 - 2024-12-10
  • 3.24.0-canary.20241107T043915 - 2024-11-07
  • 3.24.0-canary.20241016T212913 - 2024-10-16
  • 3.24.0-canary.20241016T212839 - 2024-10-16
  • 3.24.0-canary.20240701T200529 - 2024-07-01
  • 3.24.0-canary.20240629T005127 - 2024-06-29
  • 3.24.0-canary.20240523T174819 - 2024-05-23
  • 3.24.0-canary.20240508T190620 - 2024-05-08
  • 3.24.0-canary.20240507T181513 - 2024-05-07
  • 3.24.0-canary.20240502T210128 - 2024-05-02
  • 3.24.0-canary.20240429T193647 - 2024-04-29
  • 3.24.0-canary.20240429T193306 - 2024-04-29
  • 3.24.0-canary.20240423T173108 - 2024-04-23
  • 3.23.8 - 2024-05-08

    Commits:

from zod GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Summary by Sourcery

Enhancements:

  • Upgrade to a newer version of zod with new features like async custom validation, JWT string validation, and base64url string support

Snyk has created this PR to upgrade zod from 3.23.8 to 3.24.2.

See this package in npm:
zod

See this project in Snyk:
https://app.snyk.io/org/nerds-github/project/f46aeb9c-67b0-476f-be8c-803dad4ffe08?utm_source=github&utm_medium=referral&page=upgrade-pr
Copy link

sourcery-ai bot commented Apr 20, 2025

Reviewer's Guide by Sourcery

This pull request upgrades the zod dependency from version 3.23.8 to 3.24.2. This upgrade includes new features such as asynchronous checks in z.custom(), implementation of the @standard-schema/spec, and new string validators for JWT, base64url, and CIDR notations. Reviewers should ensure that the new version does not introduce any breaking changes and that the new features are compatible with the existing codebase.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
The pull request upgrades the zod dependency from version 3.23.8 to 3.24.2.
  • Updated the zod version in package.json.
packages/shared/package.json
The new version of zod includes support for asynchronous checks in z.custom().
  • Added support for asynchronous functions in the z.custom() schema definition.
  • Allows defining custom validation logic that relies on asynchronous operations.
The new version of zod implements the @standard-schema/spec.
  • Implemented the Standard Schema specification.
  • Introduces a common interface for validation libraries.
The new version of zod introduces z.string().jwt() for validating JWT strings.
  • Added z.string().jwt() to validate JWT format.
  • Allows specifying the expected algorithm for the JWT.
The new version of zod introduces z.string().base64url() for validating base64url-encoded strings.
  • Added z.string().base64url() to validate base64url format.
  • Complements the existing z.string().base64() validator.
The new version of zod introduces z.string().cidr() for validating CIDR notation strings.
  • Added z.string().cidr() to validate CIDR notation.
  • Allows specifying the IP version (v4 or v6) for CIDR validation.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We have skipped reviewing this pull request. Here's why:

  • It seems to have been created by a bot ('[Snyk]' found in title). We assume it knows what it's doing!
  • We don't review packaging changes - Let us know if you'd like us to change this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants