Skip to content

[ci] release - #235

Merged
rturnq merged 1 commit into
mainfrom
changeset-release/main
Aug 11, 2026
Merged

[ci] release#235
rturnq merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@marko/run-adapter-static@2.0.9

Patch Changes

  • 4fd421f: Fail the build when a route answers with a client or server error while crawling. Such a path writes no file, so the build previously finished green with the page missing from dist/public and only a console.warn to show for it. crawl now collects every failed path and throws once crawling settles, listing each status and path. A success status with nothing to prerender — the 204 a handler-only route falls back to, say — still only warns.
  • ec72878: Serve the prerendered +404 page from marko-run preview with a real 404 status. sirv's send ends with an unconditional writeHead(200, …) that overwrote the status assigned from its setHeaders hook, so GET /404 answered 200 with the 404 body and no request ever produced a 404 status.
  • 4fd421f: Log a summary once the static build finishes crawling: how many paths succeeded, failed, redirected and answered 404, followed by each path that answered 404 or a status the crawler has no handling for, with its status. Those paths still do not fail the build, but they were previously invisible (a 404) or a lone warning per path (everything else), so they are now listed together under the counts.

@marko/run@0.11.9

Patch Changes

  • 64c81e9: Keep one deleted route file from wedging the dev server. Deleting a +page/+handler removed the route's generated template from disk while the dev watcher actively poked the deleted route's own modules with synthetic change events, so an adapter that eagerly re-evaluates invalidated modules reloaded an id the plugin answered with undefined, and every SSR route 500'd with "Failed to load url ... Does the file exist?" until a manual restart. The watcher no longer touches a deleted file's module chain, and a stale reload of a vanished generated template now answers an empty module instead of failing the whole request graph. Re-creating a deleted route file also now refreshes the route table — the watcher used to poke the re-added file's stale module chain, which the router was no longer connected to, so the restored route kept answering 404 until an unrelated rebuild.

  • 5b67125: Fix HEAD requests on routes with a Run.GET handler.

    Two bugs combined to break auto-generated HEAD handling: call compared a handler's "GET" verb stamp against context.method ("HEAD") and skipped the handler entirely, leaving context.data empty and causing the page template to run with missing data; and context.render built and streamed the full template even for HEAD, where the body is discarded anyway.

    call now treats a GET-stamped handler as matching a HEAD request — an explicit HEAD export gets its own entry so there is no double-run risk. context.render returns a no-body response immediately for HEAD, so the page template never executes and any data the GET handler placed in context.data is used only for response headers.

    createMiddleware no longer sets Content-Length: 0 on HEAD responses or 204/304 statuses. RFC 9110 §8.6 forbids the header on 204, and on HEAD it falsely advertises an empty resource to CDNs and uptime monitors.

  • 81c4666: Make a wrong verb export fail loudly instead of silently answering 204. Route verbs are discovered from export names alone, so two ordinary mistakes produced routes that looked wired up and answered 204 No Content with zero diagnostics: a truthy non-function export (export const GET = 42, or an accidental object after a refactor) degraded to a no-op handler, and the classic copy-paste rename export const GET = Run.POST(...) registered a GET route whose handler the runtime then refused to run for GET requests. normalizeHandler now knows which export it is normalizing and throws a clear error for both — at module load in dev (a 500 naming the export and the factory) and at server startup in production, while a promise-wrapped handler rejects with the same error on its first call instead. Run.ALL handlers remain valid under any verb export, and a nullish export keeps its previous no-op behavior.

  • 58baddf: Give each dev server its own working HMR websocket. Vite's middleware mode binds a fixed default port, so a second marko-run dev instance on the same machine failed to bind it — with the error message swallowed — and its live reload silently connected to the first instance. A dev server whose config names no HMR port (nor a server or client port to honor) now keeps Vite's default port while it is free and allocates a free one otherwise.

  • 60efda4: Accept a bare truthy json/form handler option — Run.POST({ form: true }, handler) — as "parse the body with the defaults". The option was probed with "~standard" in option to tell a Standard Schema from an options object, and in throws on a primitive, so an untyped project writing the natural form: true got an opaque 500 out of the runtime's option merging instead of a parsed body. The types already forbid the primitive, so type-checked projects are unaffected. The same policy now applies one level down: a params, search, or nested validator value that is neither a function nor a Standard Schema is treated as no validator, where it previously got wrapped as a schema and crashed on the first validation instead.

  • cc6098f: Report a clear error in dev when a handler returns something other than a Response. Returning data directly (the return { items } habit) previously reached the node adapter, which failed with headers is not iterable from its own internals and named neither the route nor the contract. The dev-mode guard now names the verb, the route, and what to return instead.

    Also register the NotHandled/NotMatched sentinels with Symbol.for. A build can load more than one copy of the runtime module, and a sentinel returned from user code was not recognized by another copy's comparison — flowing into the adapter as if it were a response.

  • b741de2: Abort request.signal and cancel the response stream when a client disconnects. The node request path built its Request without a signal, so request.signal.addEventListener("abort", ...) — the standard way to notice a client is gone — could never fire, and the only cancellation was a res.destroyed check reached between chunks. A stream that had gone idle never reached it, so its timers and upstream work kept running after the client left. Affects the dev server, marko-run preview and @marko/run-adapter-node alike, since all three share this middleware. Along the way getRender — the helper @marko/run/adapter/middleware exported for picking the stashed Marko render over the body — is folded into the new getBodyReader, which makes the same choice and hands back the read/cancel pair the middleware itself writes with.

  • edc7a02: URL-decode catch-all ($$) route params. Dynamic ($) segments were decoded but the catch-all was handed through raw, so the two param kinds disagreed and Run.href's percent-encoding had no matching decode — Run.href for ["docs", "café"] produced /docs/caf%C3%A9, and the linked page read back params.rest === "docs/caf%C3%A9". The catch-all now decodes like every other param, completing the href round-trip. A request whose catch-all carries a malformed percent sequence now fails the same way it always has for dynamic segments.

  • 7bd7b09: Type Route["body"] as undefined for verbs that cannot carry one. Without a typed validator, body widened to undefined | Promise<unknown> for every verb, so a GET page's $global.body and GetContext(...).body invited await handling the runtime never satisfies — it only creates a body thenable for POST/PUT/PATCH with a json/form option configured — while the very same file's Run.GET handler correctly typed ctx.body as undefined. The hedge now only survives when the def's method can carry a body; the fully generic Route/Context (a ctx.parent, say) keeps it, since a generic context may belong to a bodied route.

  • cb62270: Fix the dev server not applying an added or removed +layout.marko until an unrelated edit or restart. The generated route entry templates are now explicitly invalidated when their content changes, so layout composition updates take effect immediately.

@github-actions
github-actions Bot force-pushed the changeset-release/main branch 12 times, most recently from 4f4a6e7 to 3f9b832 Compare August 10, 2026 23:07
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 3f9b832 to 2fe6606 Compare August 11, 2026 05:04
@rturnq
rturnq merged commit d962fa6 into main Aug 11, 2026
9 checks passed
@rturnq
rturnq deleted the changeset-release/main branch August 11, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant