Minor Changes
-
#803
7bb0a65Thanks @gajus! - feat: relaxSerializableValueand validatesql.jsonb/sql.jsonpayloadsSerializableValuenow acceptsRecord<string, unknown>andunknown[]for its
recursive branches, so payloads fromJSON.parse, external APIs, or generic
event types no longer require a cast when passed tosql.jsonb/sql.json.- Payloads are now walked for characters PostgreSQL rejects in
jsonb/json
values (null byte U+0000 and unpaired UTF-16 surrogates). A
descriptiveInvalidInputErroris thrown with the JSON path of the
offending value (e.g.$.foo.bar[1]) instead of letting PostgreSQL fail
the query with a generic error. - When
JSON.stringifyof a payload fails (e.g.BigInt), the resulting
InvalidInputErrornow attaches the original error ascauseso the
underlying reason is recoverable without losing the static message.
Patch Changes
- Updated dependencies [
7bb0a65]:- @slonik/types@49.6.0
- @slonik/errors@49.6.0