Skip to content

Releases: remorses/spiceflow

spiceflow@1.20.0-rsc.3

02 May 17:31

Choose a tag to compare

  1. Preserved function and class names in build output — Spiceflow's Vite plugin now sets keepNames: true by default in Rollup output and the dependency optimizer, so function names survive minification for better stack traces and debugging. Explicit user keepNames config is still respected.

  2. Simplified context redirect typingcontext.redirect() in page and layout handlers now accepts plain strings, removing overly strict path validation that caused false type errors when redirecting to dynamic or external URLs.

  3. Standalone trace timing logged separately — the nf3 dependency tracing step now logs its own duration instead of including resolve time, giving clearer build performance visibility.

spiceflow@1.20.0-rsc.2

02 May 07:36

Choose a tag to compare

  1. Fixed RSC federation corrupting multiline Flight payloads — federated async iterable payloads containing multiline strings or JSX no longer corrupt React's internal chunk state. Flight data is now relayed as JSON-encoded text chunks instead of splitting on newlines, preventing chunk.reason.enqueueModel crashes.

  2. Build logs aligned with Vite's logger style — prerender and standalone dependency tracing output now uses Vite's logger, respects log levels, and shows timed success summaries with dimmed relative paths. Removed picocolors runtime dependency in favor of vendored color helpers.

spiceflow@1.20.0-rsc.1

30 Apr 14:42

Choose a tag to compare

  1. Router state commits with the navigation payloaduseRouterState() now defers client navigation updates until the matching RSC payload is ready, so components no longer observe the next URL with stale server-rendered content during transitions.

  2. Consistent base-path router state on the server — server-side useRouterState() now returns the same base-path-stripped pathname as the client router state, matching apps deployed under a non-root Vite base path.

spiceflow@1.20.0-rsc.0

28 Apr 11:38

Choose a tag to compare

  1. Render JSX to static HTML inside RSCspiceflow/federation now exports renderToStaticMarkup() for email HTML, previews, and other server-only markup that should not hydrate. React's renderToStaticMarkup from react-dom/server does not work in the React Server Components environment because RSC renders JSX to Flight first; Spiceflow's helper uses the same Flight-to-HTML bridge as federation:

    import { renderToStaticMarkup } from 'spiceflow/federation'
    
    const html = await renderToStaticMarkup(
      <section>
        <h1>Welcome, Ada</h1>
        <p>Your invite code is 1234.</p>
      </section>,
    )

spiceflow@1.19.0-rsc.9

28 Apr 08:35

Choose a tag to compare

  1. router.href() results work with typed <Link> — links can now receive URLs produced by router.href() while raw string href values still stay type-checked against registered routes:

    <Link href={router.href('/orgs/:orgId/projects/:projectId', { orgId, projectId })} />

spiceflow@1.19.0-rsc.8

28 Apr 08:26

Choose a tag to compare

  1. Typed loader data in page and layout handlersloaderData is now inferred inside .page(), .staticPage(), and .layout() handlers from every matching loader, including wildcard parent loaders. Shared route data can stay in loaders while server handlers read it directly without casts:

    export const app = new Spiceflow()
      .loader('/*', async () => ({ user: await getUser() }))
      .loader('/projects/:projectId', async ({ params }) => ({ projectId: params.projectId }))
      .page('/projects/:projectId', async ({ loaderData }) => {
        return <ProjectPage user={loaderData.user} projectId={loaderData.projectId} />
      })
  2. Fixed SpiceflowRegister circular inference with loader readers — apps can keep the global register pattern while client components read typed loader data with useLoaderData('/path'). Rendering those components from a route handler no longer causes the app initializer to fall back to any.

  3. Documented string form actions — forms with a string action are documented as normal browser submissions that perform a full document navigation, while function actions keep React transition behavior.

spiceflow@1.19.0-rsc.10

28 Apr 10:01

Choose a tag to compare

  1. Typed loader data stays inferred with registered routing APIsloaderData, useLoaderData(), and router.getLoaderData() keep route-specific types when using the SpiceflowRegister pattern, without page and layout components forcing circular app inference.

  2. Cleaner redirect typing from reusable UI code — the exported redirect() helper now accepts string paths for shared code, while route handlers keep route-aware context.redirect() typing for app-specific redirects.

spiceflow@1.19.0-rsc.7

25 Apr 10:23

Choose a tag to compare

  1. Fixed require is not defined on Cloudflare Workers — explicitly include @vitejs/plugin-rsc vendored react-server-dom CJS files in commonjsOptions.include for the RSC build environment, preventing bare require("react") calls from failing in worker environments. Also updates @vitejs/plugin-rsc from 0.5.21 to 0.5.24.

  2. Fixed vite-rsc CSS loader comments — shared Spiceflow modules no longer contain the static loadCss token in comments, avoiding non-RSC environment assertion flashes during Cloudflare development.

spiceflow@1.19.0-rsc.6

23 Apr 16:26

Choose a tag to compare

  1. Vercel waitUntil auto-detection — Spiceflow now auto-detects Vercel's request context (globalThis[Symbol.for('@vercel/request-context')]) for waitUntil, forwarding background work to the Vercel execution context automatically. No configuration needed on Vercel deployments.

  2. Graceful shutdown tracks waitUntil promisespreventProcessExitIfBusy middleware now waits for pending waitUntil promises before exiting, not just in-flight requests. Prevents background work from being dropped during shutdown:

    import { preventProcessExitIfBusy } from 'spiceflow'
    app.use(preventProcessExitIfBusy({ maxWaitSeconds: 60 }))
  3. Type-safe redirect() with SpiceflowRegister — when the app type is registered, the exported redirect() helper validates route literals and requires params for parameterized paths like redirect('/users/:id', { params: { id: '42' } }). Handler context redirect stays broadly typed to avoid circular app type inference.

spiceflow@1.19.0-rsc.5

23 Apr 09:37

Choose a tag to compare

  1. Automatic waitUntil on Cloudflare Workers — Spiceflow now auto-detects waitUntil from cloudflare:workers via a conditional package.json import map (#wait-until). No need to pass waitUntil in the constructor; background work scheduled via context.waitUntil() is forwarded to the Cloudflare execution context automatically. On Node.js and Bun, the default runs promises in the background with safe rejection handling so they don't crash the process.

  2. Resolved path type inference in createSpiceflowFetch() — typed fetch calls now accept interpolated route strings like `/users/${id}` while preserving route-specific request and response inference. Previously only pattern-form paths like /users/:id were type-safe.

  3. Shorter Server-Timing descriptions in Chrome DevTools — child spans no longer repeat the root request prefix on every row, making the waterfall easier to scan.