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-validation-error to v3 #212

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 16, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
zod-validation-error ^2.0.0 -> ^3.0.0 age adoption passing confidence

Release Notes

causaly/zod-validation-error (zod-validation-error)

v3.0.0

Compare Source

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.


Configuration

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

🚦 Automerge: Enabled.

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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/zod-validation-error-3.x branch from f9f415e to 85d1a11 Compare January 16, 2024 13:29
@renovate renovate bot merged commit d0fbb53 into develop Jan 16, 2024
1 check passed
@renovate renovate bot deleted the renovate/zod-validation-error-3.x branch January 16, 2024 15:51
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