sanity-io / contentful-to-sanity

Migrate from Contentful to Sanity
MIT License
35 stars 7 forks source link

fix(deps): Update dependency zod-validation-error to v3 #147

Closed renovate[bot] closed 7 months ago

renovate[bot] commented 10 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
zod-validation-error 1.5.0 -> 3.1.0 age adoption passing confidence

Release Notes

causaly/zod-validation-error (zod-validation-error) ### [`v3.1.0`](https://togithub.com/causaly/zod-validation-error/blob/HEAD/CHANGELOG.md#310) [Compare Source](https://togithub.com/causaly/zod-validation-error/compare/v3.0.3...v3.1.0) ##### Minor Changes - [`3f5e391`](https://togithub.com/causaly/zod-validation-error/commit/3f5e391): Better error messages for zod.function() types ### [`v3.0.3`](https://togithub.com/causaly/zod-validation-error/blob/HEAD/CHANGELOG.md#303) [Compare Source](https://togithub.com/causaly/zod-validation-error/compare/v3.0.2...v3.0.3) ##### Patch Changes - [`2f1ef27`](https://togithub.com/causaly/zod-validation-error/commit/2f1ef27): Bundle code as a single index.js (cjs) or index.mjs (esm) file. Restore exports configuration in package.json. ### [`v3.0.2`](https://togithub.com/causaly/zod-validation-error/blob/HEAD/CHANGELOG.md#302) [Compare Source](https://togithub.com/causaly/zod-validation-error/compare/v3.0.1...v3.0.2) ##### Patch Changes - [`24b773c`](https://togithub.com/causaly/zod-validation-error/commit/24b773c): Revert package.json exports causing dependant projects to fail ### [`v3.0.1`](https://togithub.com/causaly/zod-validation-error/blob/HEAD/CHANGELOG.md#301) [Compare Source](https://togithub.com/causaly/zod-validation-error/compare/v3.0.0...v3.0.1) ##### Patch Changes - [`3382fbc`](https://togithub.com/causaly/zod-validation-error/commit/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. ### [`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` 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. ### [`v2.1.0`](https://togithub.com/causaly/zod-validation-error/blob/HEAD/CHANGELOG.md#210) [Compare Source](https://togithub.com/causaly/zod-validation-error/compare/v2.0.0...v2.1.0) ##### Minor Changes - [`b084ad5`](https://togithub.com/causaly/zod-validation-error/commit/b084ad5): Add `includePath` option to allow users take control on whether to include the erroneous property name in their error messages. ### [`v2.0.0`](https://togithub.com/causaly/zod-validation-error/blob/HEAD/CHANGELOG.md#200) [Compare Source](https://togithub.com/causaly/zod-validation-error/compare/v1.5.0...v2.0.0) ##### Major Changes - [`b199ca1`](https://togithub.com/causaly/zod-validation-error/commit/b199ca1): Update `toValidationError()` to return only `ValidationError` instances This change only affects users of `toValidationError()`. The method was previously returning `Error | ValidationError` and now returns only `ValidationError`.

Configuration

📅 Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

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

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.



This PR has been generated by Mend Renovate using a curated preset maintained by Sanity. View repository job log here