get-convex / convex-helpers

A collection of useful code to complement the official packages.
MIT License
66 stars 8 forks source link

Update dependency convex to v1.13.0 #154

Closed renovate[bot] closed 4 days ago

renovate[bot] commented 4 days ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
convex (source) 1.12.2 -> 1.13.0 age adoption passing confidence

Release Notes

get-convex/convex-js (convex) ### [`v1.13.0`](https://togithub.com/get-convex/convex-js/blob/HEAD/CHANGELOG.md#1130-alpha1) - Convex queries, mutations, and actions now accept `returns:` property to specify a return value validator. Return value validators throw a runtime error (so will roll back the transaction in a mutation) when the value returned from a query or mutation does not match this validator. This is *stricter than TypeScript* in that extra properties will not be allowed. - Validator fields are now exposed: the return value of `v.object({ ... })` now has a `.fields` property with the validators for each property on it. const message = v.object({ user: v.string(), body: v.string() }); const imageMessage = v.object({ ...message.fields, }) These validators are also exposed on the schema at `schema.tables.messages.validator` The `Validator` export is no longer a class. It is now a discriminated union type of all validators where the `.kind` as the discriminator. The `Validator` type still has three type parameters with only the first (the TypeScript type enforced by the validator) required. These are breaking changes if you're using the two optional type parameters of `Validator` or doing `instanceof` checks with `Validator`! We apologize for the inconvenience. The same users this affects should be the ones that most benefit from the ability to work with validator types more directly. - Argument validators now accept validators (object validators and union validators) in addition to objects with validators as properties. Return value validators similarly accept either validators or objects with validators as properties, but unlike `args:` any validator is allowed. Custom function wrappers (AKA middleware) should continue to work, but to present the same API has the builtin Convex function wrappers `query`, `internalQuery`, `mutation` etc. you'll need to update such code to accept either a validator or an object of validators. You'll likely want to update these anyway to support return value validators. The new `asValidator` helper maybe useful here. - The default tsconfig.json created in projects when first creating the `convex/` directory now uses `"moduleResolution": "Bundler"`. This is just a better default, you [probably never want the previous default `"node"`/`"node10"`](https://www.typescriptlang.org/tsconfig/#moduleResolution).

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.



This PR has been generated by Mend Renovate. View repository job log here.