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().client
to be consistent with.server
. - If you were using a 0.19 canary, the
.server
property returns error by rejection again (like 0.18 did). Sorry about the thrash here.
Features
- Add a
type
param toquery.run()
so it can wait for server results (doc, bug) await z.mutate.foo.bar()
is nowawait z.mutate.foo.bar().client
for 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-query
to apply permissions and auth data (doc). - Add option to
--lazy-startup
tozero-cache
to delay connecting to upstram until first connection (doc) - Add
/statz
endpoint for getting some health statistics from a running Zero instance (doc)
Fixes
- Support passing
Request
toPushProccesor.process()
(PR) - Fix layering in
PushProcessor
to better support custom db implementations (thanks Erik Munson!) (PR) - Fix socket disconnects in GCP (PR)
- Quote Postgres enum types to preserve casing (report)
z2s
: Returnundefined
for empty result set when usingquery.one()
z2s
: Allow accessing tables in non-public schemasz2s
: Allowtx.foo.update({bar: undefined})
wherebar
isoptional
to match client behavior- Fix broken replication when updating a key that is part of a unique (but non-PK) index
solid
: RenameuseQuery
tocreateQuery
to fit Solid naming conventions (old name deprecated)- Resync when publications are missing (PR)
- Fix missing
NOT LIKE
inquery.where()
(PR) - Fix timezone shift when writing to
timestamp
/timestamptz
and server is non-UTC timezone (thanks Tom Jenkinson!) (PR) - Bound time spent in incremental updates to 1/2 hydration time
- Fix
ttl
being 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.queryParams
constructor parameter to allow passing query params to the push endpoint (doc)
Breaking Changes
- The structure of setting up a
PushProcesor
has 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
.server
property returns error by rejection again (like 0.18 did) (doc).