Repository navigation
v0.1.80
Farm 0.1.80 updates the shared packages, including @farm.js/core, @farm.js/cli, and @farm.js/create-app, plus @farm.js/mcp 0.1.0-beta.53.
- Every hosted storage mount holds one kind of data.
farmStorage()takestype: "kv"ortype: "sql", and a provider helper withmanaged: truetakes its type from the driver:redisStorageis key-value,postgresStorageis SQL.farm storage applyrefuses a key-value mount and a SQL mount that share one database. #3077 - In islands mode, a first navigation out of a layout that hydrates as one React root no longer waits for React DOM. An 80 ms first tap on a throttled connection went from 788 ms to 350 ms. #3071
Behavior changes
getDatabase()on a hosted key-value mount throwsStorage mount "X" is a key-value mount. Use getStorage("X") ..., and key reads on a hosted SQL mount throwStorage mount "X" is a SQL mount. Use getDatabase("X") .... In 0.1.77–0.1.79 a hosted mount served both.farmStorage()withouttypestill works and serves both, but is deprecated.farm storage planwarns about each untyped mount.
| Before | After |
|---|---|
farmStorage() read with getStorage() |
farmStorage({ type: "kv" }) |
farmStorage({ schema }) read with getDatabase() |
farmStorage({ type: "sql", schema }) |
redisStorage({ managed: true, schema }) |
Not allowed: a key-value driver takes no schema. Use a SQL driver. |