Zero 0.19
Many, many bugfixes and cleanups
Install
npm install @rocicorp/zero@0.19
Upgrading
- If you use custom mutators, please see hello-zero-solid for how to update your push endpoint.
- If you use SolidJS, please switch to
createQuery. - If you are
awaiting z.mutate.foo.bar(), you should switch toawait z.mutate.foo.bar().clientto be consistent with.server. - If you were using a 0.19 canary, the
.serverproperty returns error by rejection again (like 0.18 did). Sorry about the thrash here.
Features
- Add a
typeparam toquery.run()so it can wait for server results (doc, bug) await z.mutate.foo.bar()is nowawait z.mutate.foo.bar().clientfor consistency with.server, old API still works but deprecated (doc)- Improve speed of litestream restore by about 7x
- Increase replication speed when using JSON by about 25%
- Add options to
analyze-queryto apply permissions and auth data (doc). - Add option to
--lazy-startuptozero-cacheto delay connecting to upstram until first connection (doc) - Add
/statzendpoint for getting some health statistics from a running Zero instance (doc)
Fixes
- Support passing
RequesttoPushProccesor.process()(PR) - Fix layering in
PushProcessorto better support custom db implementations (thanks Erik Munson!) (PR) - Fix socket disconnects in GCP (PR)
- Quote Postgres enum types to preserve casing (report)
z2s: Returnundefinedfor empty result set when usingquery.one()z2s: Allow accessing tables in non-public schemasz2s: Allowtx.foo.update({bar: undefined})wherebarisoptionalto match client behavior- Fix broken replication when updating a key that is part of a unique (but non-PK) index
solid: RenameuseQuerytocreateQueryto fit Solid naming conventions (old name deprecated)- Resync when publications are missing (PR)
- Fix missing
NOT LIKEinquery.where()(PR) - Fix timezone shift when writing to
timestamp/timestamptzand server is non-UTC timezone (thanks Tom Jenkinson!) (PR) - Bound time spent in incremental updates to 1/2 hydration time
- Fix
ttlbeing off by 1000 in some cases 😬 (PR) z2s: Relationships nested in a junction relationship were not working correctly (PR)- Custom mutators: Due to multitab, client can receive multiple responses for same mutation
- Fix deadlock that could happen when pushing on a closed websocket (PR)
- Fix incorrect shutdown under heavy CPU load (thanks Erik Munson!) (PR)
- Fix case where deletes were getting reverted (thanks for reproduction Marc MacLeod!) (PR)
z2s: Incorrect handling of self-join, and not existsnot(exists())is not supported on the client- re-auth on 401s returned by push endpoint
- Added
push.queryParamsconstructor parameter to allow passing query params to the push endpoint (doc)
Breaking Changes
- The structure of setting up a
PushProcesorhas changed slightly. See push endpoint setup or upgrade guide. - Not technically a breaking change from 0.18, but if you were using 0.19 canaries, the
.serverproperty returns error by rejection again (like 0.18 did) (doc).