@uniflowed/router 0.23.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/handler.js CHANGED
@@ -133,9 +133,9 @@ export const HANDLER_METHODS: $ReadOnlyArray<string> = Object.freeze([
133
133
  * on — a request for `/about` is a page, and the dispatcher declining is how
134
134
  * it says so.
135
135
  */
136
- export function createDispatcher(options: {|
137
- readonly handlers: $ReadOnlyArray<HandlerRecord>,
138
- |}): (request: Request) => Promise<Response | null> {
136
+ export function createDispatcher(options: {| readonly handlers: $ReadOnlyArray<HandlerRecord> |}): (
137
+ request: Request,
138
+ ) => Promise<Response | null> {
139
139
  const table = [...options.handlers];
140
140
 
141
141
  return async function dispatch(request: Request): Promise<Response | null> {
package/http-client.js CHANGED
@@ -29,9 +29,10 @@ type RequestOptions = {|
29
29
  |};
30
30
 
31
31
  /** Fetch transport shared by generated typed route clients and native actions. */
32
- export function createRouteClient(
33
- options: RouteClientOptions,
34
- ): (path: string, request?: RouteRequest) => Promise<Response> {
32
+ export function createRouteClient(options: RouteClientOptions): (
33
+ path: string,
34
+ request?: RouteRequest,
35
+ ) => Promise<Response> {
35
36
  const origin = new URL(options.origin);
36
37
  if (
37
38
  origin.username ||
@@ -25,9 +25,9 @@ function notify(body: () => mixed): void {
25
25
  }
26
26
 
27
27
  /** Installed by the client entry before hydration, with disposal during HMR. */
28
- export async function installClientInstrumentation(
29
- hooks: ClientInstrumentation,
30
- ): Promise<() => void> {
28
+ export async function installClientInstrumentation(hooks: ClientInstrumentation): Promise<
29
+ () => void,
30
+ > {
31
31
  const error = (event: ErrorEvent) =>
32
32
  notify(() => hooks.onError?.(event.error ?? event.message, { source: "error" }));
33
33
  const rejection = (event: PromiseRejectionEvent) =>
@@ -249,9 +249,9 @@ export function createPayloadReader(
249
249
  * reads the document once, which is the right answer for a prerendered file
250
250
  * where every row is already in it.
251
251
  */
252
- export function domObserver(
253
- document: DocumentLike,
254
- ): ((callback: () => void) => (() => void) | null) | null {
252
+ export function domObserver(document: DocumentLike):
253
+ | ((callback: () => void) => (() => void) | null)
254
+ | null {
255
255
  if (typeof MutationObserver === "undefined") {
256
256
  return null;
257
257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniflowed/router",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "description": "The file-system router for Flow React applications: matching, layouts, loaders, navigation, server rendering and hydration.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -73,8 +73,8 @@
73
73
  }
74
74
  },
75
75
  "dependencies": {
76
- "@uniflowed/hooks": "0.23.0",
77
- "@uniflowed/server": "0.23.0",
78
- "@uniflowed/validator": "0.23.0"
76
+ "@uniflowed/hooks": "0.25.0",
77
+ "@uniflowed/server": "0.25.0",
78
+ "@uniflowed/validator": "0.25.0"
79
79
  }
80
80
  }