You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Patch Changes
2172133: createAPIHandler takes the request event as its first argument as well as the request, so it drops into event-first chains such as @solidjs/vite-plugin's start.middleware, where the documented export default [createAPIHandler(routes)] failed every request with TypeError: Invalid URL (the event has no url). Given an event, handlers receive that event with the matched params written onto it, and no request-event scope is needed; getEvent still takes precedence. (request, next) chains behave as before.
0ca9519: createAPIHandler treats a HEAD request whose GET handler declines (returns undefined) the same as the GET itself: a page falls through to the chain and a handler-only route answers 404. It previously threw "did not return a response", which surfaced as a 500 to link checkers, monitors and crawlers that send HEAD.
76f0b50: Keep the manifest in scan order when the watcher changes a route. An edited route file was moved to the end of the manifest, and a re-created or new file was appended, so the generated types and the manifest order changed during development. Edited routes now stay in place, and added routes are inserted where a full scan would put them.
4497d5c: Remove a watched route by the file that added it. removeRoute looked the entry up with toPath, so saving or deleting a module that isn't a route removed a page with the same path (for example about.ts next to about.tsx), and the entry from a custom toRoute stayed in the manifest after its file was deleted. BaseFileSystemRouter configured with only toRoute threw Not implemented when a file was deleted. An edit that changes the path returned by toRoute now replaces the old entry instead of adding a second one.
aef10e1: Declarations generated by the types option now type each ref by its picked exports instead of the whole module. A $component ref no longer includes the route config or separately picked handlers, and $$route no longer exposes default. Picked exports keep their types, including any for untyped JavaScript routes.
5579f30: In server-consumer environments, the Vite adapter now imports a server page's module (server: true) by its plain id instead of ?pick=..., for every ref to that file. The server-function handler already imports the file whole, so a picked copy was a second module instance that registered the page's server function again under the same id. That second registration dropped the GET grant @solidjs/router makes, so client navigation to server pages answered 405. Client environments still pick.