Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .changeset/static-wire-answers.md

This file was deleted.

16 changes: 16 additions & 0 deletions packages/crawler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# prerender-crawler

## 0.3.0

### Minor Changes

- ecc3741: Prerendered calls now store the live answer, so server components can be prerendered.

**`@solidjs/prerender`.** An artifact is now the response the app's own server-function endpoint gives for the call's GET address (status, headers and body), captured by replaying each call through the crawl after the pages render. Before, the integration encoded the returned value itself, which bypassed the server's result policies: a server component (`return props => <jsx/>`) was stored as an error, and client navigation to it crashed in both static and hybrid builds.

On the client, `prerendered()` now returns the runtime's own GET reference and serves artifacts through the reference's own send (`withMeta(fn, { fetch })`), so an app's transport `fetch` stays the app's and carries the hybrid fallback. Hydration adopts server-rendered reads and server components without a request, where it used to refetch them, and responses decode through the runtime's own pipeline. Artifacts are recognized by a marker line instead of status, so a host answering a missing artifact with a 200 page now falls back to the live server in hybrid mode instead of failing to parse.

Artifacts live under the build's id (`_static/<build>/…`), so they can be cached as immutable and a deploy never serves the previous build's answer from a CDN.

Breaking: artifacts are `_static/<build>/<label>.<key>.txt` in a new format (rebuild to regenerate them); `serverFunctions()` no longer takes `codec` (the server's configured codec is used); `@solidjs/web` 2.0.0-rc.16 or later is required.

**`prerender-crawler`.** `PrerenderContext.fetch(input)` sends a request through the crawl's own transport (paced by `interval`, relative urls resolved against `origin`) and returns the raw response, for integrations that capture what the app answers at an address that is not a page. `buildId` names the build (`context.buildId`); the Vite plugin mints one per build and defines it as `import.meta.env.PRERENDER_BUILD`.

## 0.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/crawler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prerender-crawler",
"version": "0.2.0",
"version": "0.3.0",
"description": "Framework-agnostic build-time prerendering. Point it at anything fetch-shaped (Request in, Response out) and it crawls the site into static HTML: seeds, link discovery, header hints, redirects, retries, throttling, and an integration seam for build-time data capture. Ships a Vite plugin at prerender-crawler/vite.",
"license": "MIT",
"author": "Ryan Carniato",
Expand Down
16 changes: 16 additions & 0 deletions packages/solid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @solidjs/prerender

## 0.3.0

### Minor Changes

- ecc3741: Prerendered calls now store the live answer, so server components can be prerendered.

**`@solidjs/prerender`.** An artifact is now the response the app's own server-function endpoint gives for the call's GET address (status, headers and body), captured by replaying each call through the crawl after the pages render. Before, the integration encoded the returned value itself, which bypassed the server's result policies: a server component (`return props => <jsx/>`) was stored as an error, and client navigation to it crashed in both static and hybrid builds.

On the client, `prerendered()` now returns the runtime's own GET reference and serves artifacts through the reference's own send (`withMeta(fn, { fetch })`), so an app's transport `fetch` stays the app's and carries the hybrid fallback. Hydration adopts server-rendered reads and server components without a request, where it used to refetch them, and responses decode through the runtime's own pipeline. Artifacts are recognized by a marker line instead of status, so a host answering a missing artifact with a 200 page now falls back to the live server in hybrid mode instead of failing to parse.

Artifacts live under the build's id (`_static/<build>/…`), so they can be cached as immutable and a deploy never serves the previous build's answer from a CDN.

Breaking: artifacts are `_static/<build>/<label>.<key>.txt` in a new format (rebuild to regenerate them); `serverFunctions()` no longer takes `codec` (the server's configured codec is used); `@solidjs/web` 2.0.0-rc.16 or later is required.

**`prerender-crawler`.** `PrerenderContext.fetch(input)` sends a request through the crawl's own transport (paced by `interval`, relative urls resolved against `origin`) and returns the raw response, for integrations that capture what the app answers at an address that is not a page. `buildId` names the build (`context.buildId`); the Vite plugin mints one per build and defines it as `import.meta.env.PRERENDER_BUILD`.

## 0.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solidjs/prerender",
"version": "0.2.0",
"version": "0.3.0",
"description": "Solid's integration for prerender-crawler: prerendered() turns server functions into build-time data captured as static artifacts, and the serverFunctions() integration captures them during the crawl and guards static builds against calls nothing prerendered.",
"license": "MIT",
"author": "Ryan Carniato",
Expand Down