Repository navigation
Farm.js 0.2.3 updates the shared packages, including @farm.js/core, @farm.js/cli, and @farm.js/create-app, with @farm.js/desktop 0.1.0-beta.11 and @farm.js/react 0.1.0-beta.47. Version 0.2.2 was tagged but never finished publishing to npm, so 0.2.3 also ships its changes, listed below.
farm devfollows edits to the docs config, and to any module it imports, without a restart. A sidebar kept in its own file now updates on save. A config saved mid-edit that fails to load answers docs requests with an error until the next good save, and the dev server keeps running. #3318- A Vite plugin from
vite.pluginsthat adds middleware inconfigureServeranswers its own paths ahead of Farm's routes, as it does in plain Vite. Before, Farm's page handler answered them with its 404 page.farm preview's guard still checks every request first. #3317 - A
page()orcreateRoute()call in a test file (*.test.*,*.spec.*, or under__tests__) no longer adds a route to the generated route types, so a test helper namedpagestops rewritingsrc/farm.d.tson every dev-server start. #3316
From 0.2.2:
- Desktop apps declare what they may ask macOS for under
desktop.permissions: the microphone, camera, location, speech recognition, Bluetooth, contacts, calendars, reminders, photos, the Music library, motion, and the Documents, Downloads and Desktop folders. Each value is the sentence macOS shows when it asks, and the Electrobun shell writes it into the app's Info.plist. Without one, macOS refuses that permission without asking. #3307, #3312 - In islands mode, the dev server no longer analyzes Farm's own modules when a workspace links
@farm.js/core, as it already didn't for an installed copy. Inexamples/ssr-ssg-demothe first render analyzed 210 fewer modules and used about 30% less server CPU. #3308 - The React compiler runtime works with React 19.3: a compiled component with text bindings inside a Suspense boundary no longer crashes when the boundary hides and reappears. #3310
- The React compiler binds fields read from a store with
store.use("field")in components marked"use compiler", so a change to one field updates only the text that reads it. Experimental; see RFC 0016. #3309