Skip to content

Releases: farming-labs/farm.js

Farm.js 0.1.31

Choose a tag to compare

@Kinfe123 Kinfe123 released this 22 Oct 23:39

faster docs

  • the production server tells the docs adapter its content is fixed, so it reads navigation once instead of rescanning the content directory on every request (#2132)
  • node-server builds gzip static assets at build time; Nitro serves the .gz by Accept-Encoding (#2132)
  • new apps start on @farming-labs/docs 0.2.126, which renders a docs page once instead of streaming a hidden duplicate of large pages (#2134, farming-labs/docs#617)
  • markdown layout rows are no longer copied repeatedly (#2123)

on a port of assistant-ui's docs (376 pages), a docs page went from ~53 ms to ~9 ms of server cpu, about 27 ms to 4 ms latency, and its javascript is now sent gzipped.

fixes

  • docs site: clean table of contents labels and the sidebar's right border are back (#2129), list markers and table corners (#2130)

upgrade

pnpm add @farm.js/core@0.1.31 @farm.js/cli@0.1.31 @farming-labs/docs@0.2.126 @farming-labs/farmjs@0.2.126 @farming-labs/theme@0.2.126

Farm.js 0.1.30

Choose a tag to compare

@Kinfe123 Kinfe123 released this 22 Oct 18:49

Faster React pages

React pages that don't suspend now render with React's synchronous renderToString after the first streaming render of their route finishes without suspending (#2128). On the framework benchmark app this cuts server CPU per page request from about 310 to 250 us (-19%), latency by about 26%, and raises throughput at 32 connections by about 52%.

  • the first request to a route still streams; pages that suspend keep streaming and render once per request
  • the markup is identical to the streaming render on React 18 and 19
  • if a learned route starts suspending later, that request renders again through the streaming path and the route streams from then on
  • Node, Vercel and Cloudflare all benefit; the dev server is unchanged

Benchmarks

  • the framework benchmark's Farm fixture no longer adds a duplicate Cache-Control route rule (#2125)
  • platform build benchmark for Node, Vercel and Cloudflare (#2112)
  • RFC 0002 records what shipped for the response pipeline in 0.1.29 (#2116)

Farm.js 0.1.29

Choose a tag to compare

@Kinfe123 Kinfe123 released this 22 Oct 07:53

Faster production responses

page requests on node-server use about 17% less server CPU than 0.1.28 on the framework benchmark app (roughly 375 -> 310 us per request, measured on different builds and machine loads, so read it as an estimate):

  • header steps edit responses Farm created in place instead of copying them (#2118)
  • fully rendered pages go out in one write with Content-Length instead of chunked (#2120), and are built as srvx's FastResponse so the HTML is never encoded twice (#2124)
  • the request is copied only for API routes (#2115), and srvx's request is used as is instead of copied for its abort signal (#2122)
  • faster server chunk minification in builds (#2114)
  • Cloudflare workers ship only React's production build (#2113)
  • Markdown mirrors do less work per request (#2098, #2100, #2102, #2103, #2104)

behavior note: fully rendered pages on node-server now send Content-Length instead of Transfer-Encoding: chunked. bodies and other headers are unchanged. pages that stream (Suspense), HEAD and responses rewritten by plugins keep the previous path.

RSC

  • RSC apps serve the MCP endpoint (#2108) and llms.txt / llms-full.txt (#2106)
  • a page or layout that fails to load in dev fails only its routes (#2099)

Fixes

  • client components imported with @/ hydrate when srcDir is not src (#2076)
  • Vue: file changes that arrive before plugin-vue resolves its compiler no longer crash dev (#2078, @farm.js/vue 0.1.0-beta.32)
  • Markdown mirrors separate the items of a layout row (#2109)

DevTools

  • shows plugin order and hooks, and refreshes Inspect after HMR (#2067)

Farm.js 0.1.28

Choose a tag to compare

@Kinfe123 Kinfe123 released this 20 Oct 17:28

Highlights

New apps are agent-ready by default. A fresh app from npx @farm.js/create-app@latest now scores 98/100 on the agent-ready check, up from 70 (93 for the Preact, Solid, Vue and Svelte starters). (#2096)

  • Pages without Open Graph data get og:title and og:description from their own title and description.
  • agent.jsonLd emits a schema.org WebSite unless it's set; true still means Organization.
  • agent.llmsTxt serves /llms.txt unless it's set, without /llms-full.txt. It stays off when the docs engine is enabled, since the docs engine serves its own.
  • The starters say what they are in server-rendered markup and ship an opengraph-image.png.
  • Turn a default off with agent: { jsonLd: false, llmsTxt: false }. OpenAPI, MCP, crawler rules and the API catalog stay opt-in.

Preact, Solid, Vue and Svelte starters build again without React installed. @farm.js/devtools no longer loads core's main entry, which pulled in React. (#2097)

A redesigned agent-ready check on farmjs.dev: a score ring, Reach / Read / Act breakdown, a "fix these first" list with the Farm.js config for each gap, and a fix prompt you can hand to a coding agent. (#2095, #2085)

Fixes

  • fix(markdown): evaluate strong preconditions on Markdown views (#2094)
  • fix(markdown): isolate mirror validators and ranges (#2092)
  • fix(markdown): preserve page errors in Markdown mirrors (#2090)
  • fix(markdown): propagate cancellation to page renders (#2088)
  • fix(markdown): retain terminal responses without redispatch (#2087)
  • fix(markdown): preserve response cookies in mirrors (#2084)
  • feat(rsc): serve Markdown mirrors from React Server Components apps (#2083)
  • fix(rsc): quiet dev startup with the real version and no esbuild warning on Vite 8 (#2093)
  • fix(rsc): show dev render failures instead of a legacy SSR fallback (#2089)
  • fix(rsc): load Strata outside Vite's module runner so optimized boundaries work in dev (#2086)
  • fix(core): keep OpenTelemetry and server tracing out of client bundles (#2091)
  • fix(docs): load docs.config.ts in the production server without the font files (#2082)
  • fix(plugins): handle earlier rejections after synchronous hook failures (#2081)
  • fix(plugins): finish all error reporters before cleanup (#2080)
  • fix(dev): report startup failures to plugin error hooks (#2077)

Full changelog: v0.1.27...v0.1.28

Farm.js 0.1.27

Choose a tag to compare

@Kinfe123 Kinfe123 released this 19 Oct 17:30

agents

  • forms that are also mcp tools: when a page's form posts to an api route exposed through @farm.js/mcp, the page's .md?actions view adds "tool": { "name": "contact_submit", "endpoint": "/api/mcp" }, so an agent can call the tool instead of posting the form. @farm.js/mcp publishes its tool catalog to core; works in dev and production, with a custom api.baseURL too (#2071)

fixes

  • build: nitro no longer bundles root app folders when the app has no src directory (#2069)
  • dev: inline configuration passed to createServer() is applied (#2072)
  • dev: resources are cleaned up when server creation or vite construction fails (#2064, #2073)
  • create-app: install with bun on windows instead of looking for bun.cmd (#2066)

docs

  • self-host on any node host, with a dockerfile and platform settings (#2070)
  • agent-ready check runs against Farm.js Infrastructure by default, and the hero selection includes the question mark (#2074, #2075)

packages

@farm.js/core, @farm.js/cli, @farm.js/create-app and the shared group at 0.1.27; @farm.js/mcp 0.1.0-beta.26 and the other core-pinning plugins bumped to pin 0.1.27. @farm.js/react stays at 0.1.0-beta.29.

Farm.js 0.1.26

Choose a tag to compare

@Kinfe123 Kinfe123 released this 18 Oct 21:43

more of the agent read layer, plus fixes for the pieces that shipped in 0.1.25.

agents

  • read long pages in parts: every markdown response takes ?max_tokens=<n> (with ?section too) and returns parts cut at headings or paragraphs, never mid code block, with a Continue: link and Link: rel="next". a cursor bound to the page version answers 409 if the page changed (#2051)
  • farm agent check [url] probes a running app or deployed site the way an agent meets it: metadata, markdown mirror + views + 404, llms.txt, robots/sitemap, the api catalog + openapi, and the mcp 401 challenge. missing surfaces point at the config that turns them on; broken ones fail with exit code 1 (#2053)
  • mcp resources and prompts: mcp.resources (defineResource, fixed uri or uri template) and mcp.prompts (definePrompt, zod string args) next to tools, behind the same authorize, with resources / prompts allowlists (#2055)
  • agent traffic events: new agent.read observability event for markdown, llms.txt, llms-full.txt, and api catalog reads, with the view, status, and the agent the user-agent declares. classifyFarmAgent() is exported for middleware (#2061)

fixes

  • markdown views keep the page's own query, so part 2 of ?category=shoes&max_tokens=… no longer 409s (#2057)
  • dev markdown mirrors return redirects like production instead of serving the login page as 200; prerendered Link headers merge with a configured link (#2059)
  • a stuck page no longer blocks /llms-full.txt (#2060)
  • a root layout with hoisted async scripts or precedence styles stays one document (#2056)
  • farm migrate next only rewrites the next imports farm exports (#2058)
  • dev: optimizer writes drain before vite closes, and runtime resources survive vite restarts (#2052, #2063)
  • react: skip root copies in disabled queued hint passes (#2038)

packages

@farm.js/core, @farm.js/cli, @farm.js/create-app and the shared group at 0.1.26; @farm.js/react 0.1.0-beta.29, @farm.js/mcp 0.1.0-beta.25, and the core-pinning plugins bumped to pin 0.1.26.

Farm.js 0.1.25

Choose a tag to compare

@Kinfe123 Kinfe123 released this 18 Oct 18:26

Changes

  • feat(markdown): describe a page's forms at its mirror's ?actions view (#2050)
  • feat(agent): serve an RFC 9727 api catalog at /.well-known/api-catalog (#2047)
  • fix(markdown): answer mirrors of sign-in-protected pages with their redirect, not a 404 (#2044)
  • fix(core): honor title.absolute on the not-found page (#2034)
  • perf(build): minify the prebuilt SSR bundle while Nitro builds the adapter (#2042)
  • fix(markdown): keep every article of an index page in its mirror (#2041)
  • fix(llms): share llms-full.txt renders instead of rendering every page per request (#2049)
  • fix(mcp): challenge 401s and advertise OAuth protected resource metadata (#2048)
  • fix(markdown): advertise the mirror of prerendered pages (#2045)
  • fix(markdown): keep tables, code languages and list numbers in mirrors (#2046)
  • fix(markdown): keep noindex and canonical on mirrors and noindex pages out of llms.txt (#2043)
  • fix(markdown): keep images in mirrors whatever order their attributes come in (#2040)
  • feat(markdown): serve page outlines, single sections, and ETags to agents (#2039)
  • perf(react): skip scope analysis for absent identifiers (#2036)

Independent packages: @farm.js/react 0.1.0-beta.28, @farm.js/mcp 0.1.0-beta.24; the core-pinned plugins now pin core 0.1.25.

Farm.js 0.1.24

Choose a tag to compare

@Kinfe123 Kinfe123 released this 18 Oct 05:32

Patch for a 0.1.23 build regression.

Fixes

  • fix(build): stop requiring @vercel/og for apps that never render a JSX metadata image (#2037)

In 0.1.23, farm build could fail with "The server output imports @vercel/og, which is not installed" in apps that do not install @vercel/og and never render a JSX opengraph-image/twitter-image (for example the auth starters). Core's metadata-image runtime keeps a lazy @vercel/og import that can land in any app's server output; the build now only requires @vercel/og when the app actually uses it, which it already checks before bundling.

All 0.1.23 upgrade notes still apply: docs, sharp, @vercel/og and @tailwindcss/vite are optional peers your app installs when it uses those features (farm doctor reports missing ones).

Independent packages: the core-pinned plugins now pin core 0.1.24.

Farm.js 0.1.23

Choose a tag to compare

@Kinfe123 Kinfe123 released this 18 Oct 01:45

Install-size release: a clean npm install @farm.js/core @farm.js/cli react react-dom drops from 202 MB (0.1.19) to 99 MB.

Changes

  • perf(core): make @vercel/og an optional peer (#2027)
  • perf(core): make sharp an optional peer (#2029)
  • perf(core): make @farming-labs/docs an optional peer (#2031)
  • perf(core): drop esbuild and use Rolldown/Oxc for config loading, transforms and minify (#2022)
  • chore(deps): move to Farming Labs ORM 0.0.65 and docs 0.2.121 (#2032) (the DynamoDB SDK and @vercel/sandbox are no longer installed by default)
  • perf(react): skip analysis for empty local-name collections (#2033)

@tailwindcss/vite became optional in 0.1.22 (#2021).

Upgrade notes

Feature packages are now optional peers. If your app uses one of these features, add the package (new projects from @farm.js/create-app already list the ones they use; farm doctor reports anything missing):

Feature Install Without it
Built-in docs (docs: { enabled: true }) pnpm add @farming-labs/docs farm dev / farm build stop at startup with the install command
OG images (opengraph-image.tsx, @farm.js/core/og) pnpm add @vercel/og farm build fails early with the install command
Image optimization pnpm add sharp provider: "auto" serves original image URLs and logs the install command once; provider: "node" fails at startup
Tailwind auto-enable pnpm add -D @tailwindcss/vite builds continue without Tailwind and log the install command once

esbuild is no longer installed: config files, layers and server minification run on Rolldown/Oxc. Apps that set Vite build.minify: "esbuild" or cssMinify: "esbuild" must install esbuild themselves (Vite 8's rule).

Independent packages: @farm.js/react 0.1.0-beta.27; the core-pinned plugins now pin core 0.1.23.

v0.1.22

Choose a tag to compare

@Kinfe123 Kinfe123 released this 17 Oct 23:06

Upgrade note

  • Tailwind CSS needs @tailwindcss/vite in your app (#2021). Farm no longer installs it for every app. If your stylesheets import tailwindcss and you have no PostCSS config, run pnpm add -D @tailwindcss/vite after upgrading. Without it the build still succeeds, but CSS is not processed by Tailwind; Farm logs a one-time hint naming the command, and farm doctor flags it. New projects from @farm.js/create-app already declare it

Highlights

  • Install Vue plugins such as Pinia (#2023). vue({ app: "./src/vue-app.ts" }) points at a module whose defineVueApp((app, { ssr }) => { app.use(createPinia()) }) runs for every Vue app Farm creates: once per server render, so stores are never shared between requests, and once per hydrated root in the browser. Requires @farm.js/vue 0.1.0-beta.31
  • Server functions stay out of the browser unless the RSC transform is installed (#2020). Setting experimental.serverActions in farm.config.ts no longer turns off the check that stops a createServerFn module from being bundled into client code; only the @farm.js/plugin/rsc setup does. Setting the flag without it logs that it has no effect

Fixes

  • farm migrate next and farm migrate tanstack write a start script that runs the built server (node .farm/.output/server/index.mjs) (#2025)
  • Farm warns once when an alias import such as @/… cannot be resolved while deciding which pages need client JavaScript, instead of leaving client components silently static (#2026)
  • Docs: middleware data on client navigation, not-found placement, and the default start path (#2019)

Packages

  • Shared group: 0.1.22 (@farm.js/core, @farm.js/cli, @farm.js/create-app, integrations)
  • @farm.js/vue: 0.1.0-beta.31
  • Independently versioned plugins re-released to pin @farm.js/core@0.1.22