Zero 0.21
Postgres arrays, TanStack sample, and more
Install
npm install @rocicorp/zero@0.21
Upgrading
There is one breaking change in this release, but we think it is unlikely to affect anyone since the results were wrong already – the change just makes the error explicit.
See hello-zero for an example of using arrays and the new ZeroProvider
features.
Features
- New "ztunes" sample using TanStack, Drizzle, Better Auth, and Fly.io (docs).
- Add initial support for Postgres arrays (docs, bug).
- Improved React lifecycle management with
ZeroProvider
(docs, PR). - Expose
Zero
instances automatically at__zero
(docs, PR). - Add
--output-{synced|vended}-rows
toanalyze-query
(PR). - Technically a bug fix, but this was so annoying I'm calling it a feature:
now correctly supports the up/down arrow keys (commit).zero-sqlite3
- Another super annoying fix: logs from
zero-cache
are now level-colored (PR).
Fixes
- Lazy-load otel. This was causing problems with
pnpm
(PR). - Initial replication is now memory-bounded (PR).
- Change the way otel starts up in
zero-cache-dev
to not rely onnpx
(PR). - Use existing
--log-slow-hydrate-threshold
as the threshold for--query-hydration-stats
rather than hardcoded 200ms. - Fix race condition starting up in multinode deployments (PR).
- Avoid site-local IPv6 addresses in auto-discovery (PR).
- Many z2s fixes found by fuzzing (PRs: 4415, 4416, 4417, 4421, 4422, 4423).
- Don't load prettier in
analyze-query
. This was causing problems when prettier config was cjs. (PR). - Don't hydrate system relationships in
analyze-query
. This was causing incorrect results. (PR). - Fix memory leaks from not cleaning up
pusher
andmutagen
(PR). - Fix handling of invalid websocket requests that were crashing server. (PR).
- Remove red error text when
.env
missing (PR). - Allow
zero-cache
to startup without schema file, but print a warning (PR). - Log a warning when auth token exceeds max allowed header size (PR).