Skip to content

Commit 2888aa8

Browse files
chore(deps): update dependency zod-validation-error to v3 (#1265)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [zod-validation-error](https://togithub.com/causaly/zod-validation-error) | [`^2.1.0` -> `^3.0.0`](https://renovatebot.com/diffs/npm/zod-validation-error/2.1.0/3.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/zod-validation-error/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/zod-validation-error/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/zod-validation-error/2.1.0/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/zod-validation-error/2.1.0/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>causaly/zod-validation-error (zod-validation-error)</summary> ### [`v3.0.0`](https://togithub.com/causaly/zod-validation-error/blob/HEAD/CHANGELOG.md#300) [Compare Source](https://togithub.com/causaly/zod-validation-error/compare/v2.1.0...v3.0.0) ##### Major Changes - [`deb4639`](https://togithub.com/causaly/zod-validation-error/commit/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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Error). For example, we can now do: ```typescript 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. ```typescript 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. </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/JoshuaKGoldberg/create-typescript-app). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent b77fed3 commit 2888aa8

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"rimraf": "^5.0.5",
6060
"title-case": "^4.1.2",
6161
"zod": "^3.22.4",
62-
"zod-validation-error": "^2.1.0"
62+
"zod-validation-error": "^3.0.0"
6363
},
6464
"devDependencies": {
6565
"@octokit/request-error": "^5.0.1",

pnpm-lock.yaml

Lines changed: 12 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)