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

[Snyk] Upgrade zod-validation-error from 3.0.0 to 3.3.0 #5

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

Conversation

WesleyR10
Copy link
Owner

snyk-top-banner

Snyk has created this PR to upgrade zod-validation-error from 3.0.0 to 3.3.0.

ℹ️ 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 6 versions ahead of your current version.

  • The recommended version was released on 3 months ago.

Release notes
Package name: zod-validation-error
  • 3.3.0 - 2024-05-10

    Minor Changes

    • 66f5b5d: Match ZodError via heuristics instead of relying on instanceof.

      Why? Because we want to ensure that zod-validation-error works smoothly even when multiple versions of zod have been installed in the same project.

  • 3.2.0 - 2024-04-23

    Minor Changes

    • 6b4e8a0: Introduce fromError API which is a less strict version of fromZodError
    • 35a28c6: Add runtime check in fromZodError and throw dev-friendly TypeError suggesting usage of fromError instead
  • 3.1.0 - 2024-04-04

    Minor Changes

    • 3f5e391: Better error messages for zod.function() types
  • 3.0.3 - 2024-02-28

    Patch Changes

    • 2f1ef27: Bundle code as a single index.js (cjs) or index.mjs (esm) file. Restore exports configuration in package.json.
  • 3.0.2 - 2024-02-13

    Patch Changes

    • 24b773c: Revert package.json exports causing dependant projects to fail
  • 3.0.1 - 2024-02-12

    Patch Changes

    • 3382fbc: 1. Fix issue with ErrorOptions not being found in earlier to es2022 typescript configs. 2. Add exports definition to package.json to help bundlers (e.g. rollup) identify the right module to use.
  • 3.0.0 - 2024-01-16

    Major Changes

    • deb4639: BREAKING CHANGE: Refactor ValidationError to accept ErrorOptions as second parameter.

      What changed?

      Previously, ValidationError accepted Array<ZodIssue> as 2nd parameter. Now, it accepts ErrorOptions which contains a cause property. If cause is a ZodError then it will extract the attached issues and expose them over error.details.

      Why?

      This change allows us to use ValidationError like a native JavaScript Error. For example, we can now do:

      import { ValidationError } from 'zod-validation-error';

      try {
      // attempt to do something that might throw an error
      } catch (err) {
      throw new ValidationError('Something went deeply wrong', { cause: err });
      }

      How can you update your code?

      If you are using ValidationError directly, then you need to update your code to pass ErrorOptions as a 2nd parameter.

      import { ValidationError } from 'zod-validation-error';

      // before
      const err = new ValidationError('Something went wrong', zodError.issues);

      // after
      const err = new ValidationError('Something went wrong', { cause: zodError });

      If you were never using ValidationError directly, then you don't need to do anything.

from zod-validation-error 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:

Snyk has created this PR to upgrade zod-validation-error from 3.0.0 to 3.3.0.

See this package in npm:
zod-validation-error

See this project in Snyk:
https://app.snyk.io/org/wesleyr10/project/468eef93-b5b0-49cf-9beb-9e3e66b7ed34?utm_source=github&utm_medium=referral&page=upgrade-pr
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