@uniflowed/router 0.48.0 → 0.49.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.
Files changed (55) hide show
  1. package/action.js +1 -1
  2. package/client.js +1 -1
  3. package/handler.js +2 -2
  4. package/http-client.js +1 -1
  5. package/index.js +1 -1
  6. package/instrumentation.js +1 -1
  7. package/internal/action-endpoint.js +1 -1
  8. package/internal/action-wire.js +1 -1
  9. package/internal/base-path.js +1 -1
  10. package/internal/boundaries.js +1 -1
  11. package/internal/boundary-data.js +1 -1
  12. package/internal/compose.js +1 -1
  13. package/internal/deployment.js +1 -1
  14. package/internal/devtools.js +1 -1
  15. package/internal/diagnostics.js +1 -1
  16. package/internal/document.js +1 -1
  17. package/internal/error-view.js +1 -1
  18. package/internal/flight-browser.js +1 -1
  19. package/internal/flight-chunks.js +1 -1
  20. package/internal/flight-rows.js +1 -1
  21. package/internal/flight-ssr.js +1 -1
  22. package/internal/flight.js +1 -1
  23. package/internal/form-action.js +1 -1
  24. package/internal/head.js +1 -1
  25. package/internal/hydrate-options.js +1 -1
  26. package/internal/hydration.js +1 -1
  27. package/internal/inspector.js +1 -1
  28. package/internal/native-links.js +1 -1
  29. package/internal/native-tree.js +1 -1
  30. package/internal/navigation-cache.js +1 -1
  31. package/internal/payload-rows.js +1 -1
  32. package/internal/payload.js +1 -1
  33. package/internal/prepare-document.js +1 -1
  34. package/internal/react-version.js +6 -5
  35. package/internal/request.js +1 -1
  36. package/internal/resolve.js +1 -1
  37. package/internal/resolved-summary.js +1 -1
  38. package/internal/routing.js +1 -1
  39. package/internal/runtime.js +1 -1
  40. package/internal/search-params.js +1 -1
  41. package/internal/server-instrumentation.js +1 -1
  42. package/internal/server-route.js +1 -1
  43. package/internal/shell.js +1 -1
  44. package/internal/stream.js +1 -1
  45. package/middleware.js +2 -2
  46. package/native-navigation.js +1 -1
  47. package/native.js +1 -1
  48. package/package.json +5 -5
  49. package/routing.js +1 -1
  50. package/rsc-client.js +1 -1
  51. package/rsc-ssr.js +1 -1
  52. package/rsc.js +1 -1
  53. package/server-components.js +1 -1
  54. package/server.js +1 -1
  55. package/testing.js +1 -1
package/action.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // `@uniflowed/router/action`: a server action, as the browser holds it.
4
4
  //
package/client.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Starting the application in the browser.
4
4
  //
package/handler.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Route handlers: a path that answers a request instead of rendering a page.
4
4
  //
@@ -9,7 +9,7 @@
9
9
  // position is that the host is a capability rather than a target.
10
10
  //
11
11
  // // app/api/users/[id]/$route.js
12
- // // @flow
12
+ // "use flow";
13
13
  // export async function GET(request: Request, context: HandlerContext) {
14
14
  // const user = await find(context.params.id);
15
15
  // return user == null
package/http-client.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  import {
3
3
  ACTION_CONTENT_TYPE,
4
4
  ACTION_HEADER,
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // `@uniflowed/router`: the file-system router.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
 
3
3
  export type NavigationTiming = {|
4
4
  readonly kind : "document" | "router",
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the endpoint a server action is dialled at.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: what a server action's arguments and its
4
4
  // result are allowed to be.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: `app.router.basePath` and
4
4
  // `app.router.trailingSlash`, as the router reads them.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: which DOM subtree each boundary owns.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // React-free names for the boundaries a resolved route renders.
4
4
 
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: one walk from a resolved route to the tree
4
4
  // that renders it.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: which build this page is, and what it does
4
4
  // when the server is on another one.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: whether React DevTools can actually attach
4
4
  // to the page this browser just hydrated.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the way a diagnostic the browser produced
4
4
  // reaches the terminal.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the two ids the server writes and the
4
4
  // client reads.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: what renders in place of a subtree that threw.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: React Server Components, in the browser.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: a Flight payload, written into a document
4
4
  // and read back out of one.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: a finished Flight payload, with the rows a
4
4
  // partial prerender left for the request taken out.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: React Server Components, while HTML renders.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the names a Flight payload is spoken in.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: a server action as a form the browser can
4
4
  // submit before any JavaScript has run.
package/internal/head.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: a route's metadata, as the elements React
4
4
  // hoists into `<head>`.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: what both hydrating entries hand
4
4
  // `hydrateRoot` besides the tree.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: what actually differed, when hydration
4
4
  // failed.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: what left, in what order, and what each
4
4
  // chunk built.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  import type { RouteTable } from "./routing.js";
3
3
  import { hasClientPage, matchRoute } from "./routing.js";
4
4
 
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  import type { RouteModule, RouteTable } from "./routing.js";
3
3
 
4
4
  export type NativeLayout = {
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the routes a navigation already has.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: reading the payload's rows out of a
4
4
  // streaming document.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the payload, and what may be in it.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: a server's document, made ready for React to
4
4
  // hydrate.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the React that React Server Components need.
4
4
  //
@@ -7,8 +7,9 @@
7
7
  // from its modules need nothing newer (ubugeeei-prod/uf#992). React Server
8
8
  // Components do. They render through `react-server-dom-parcel`, React's own
9
9
  // Flight renderer and client, which is released with React and requires the
10
- // React it was released with: 19.3. So that package is an optional peer, and
11
- // every module that loads it asks here first.
10
+ // React it was released with. 19.3.0 of that package is GHSA-xqc2-xf4c-x3h3,
11
+ // so the floor is 19.3.1. The package is an optional peer, and every module
12
+ // that loads it asks here first.
12
13
  //
13
14
  // # Why a check at run time
14
15
  //
@@ -27,7 +28,7 @@
27
28
  import * as React from "react";
28
29
 
29
30
  /** The oldest React that React Server Components render on. */
30
- export const SERVER_COMPONENTS_REACT: string = "19.3.0";
31
+ export const SERVER_COMPONENTS_REACT: string = "19.3.1";
31
32
 
32
33
  /**
33
34
  * Why `entry` cannot run on React `installed`, or `null` when it can.
@@ -44,7 +45,7 @@ export function serverComponentsRefusal(entry: string, installed: string): strin
44
45
  return (
45
46
  `@uniflowed/router: ${entry} needs React ${SERVER_COMPONENTS_REACT} or newer for React ` +
46
47
  `Server Components, and the React it loaded is ${installed}. Install react, react-dom and ` +
47
- "react-server-dom-parcel at ^19.3.0, or set `app.rsc: false` in uf.config.js to render " +
48
+ "react-server-dom-parcel at ^19.3.1, or set `app.rsc: false` in uf.config.js to render " +
48
49
  "routes from their modules, which the router supports from React 19.2.3."
49
50
  );
50
51
  }
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the request the server half runs inside.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: what a URL resolves to, with no rendering in it.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Module-free summaries of resolved routes.
4
4
 
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the React-free route table primitives.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // The router runtime: the browser's binding.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: a page's `searchParams` schema, run against
4
4
  // the query string.
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
 
3
3
  import { traceRequestPhase } from "@uniflowed/server/instrumentation";
4
4
  import { NotFoundError, RedirectError } from "./routing.js";
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the route a server component is rendering in.
4
4
  //
package/internal/shell.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: the documents an HTML renderer answers with
4
4
  // that are not a route's own markup — uf's shell around that markup, and a
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Internal to `@uniflowed/router`: a document as bytes rather than a string.
4
4
  //
package/middleware.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Middleware: what runs before a path answers, whatever answers it.
4
4
  //
@@ -9,7 +9,7 @@
9
9
  // already use and the reason uf does not inherit Next's regular expressions.
10
10
  //
11
11
  // // app/dashboard/$middleware.js
12
- // // @flow
12
+ // "use flow";
13
13
  // import { cookies } from "@uniflowed/server";
14
14
  //
15
15
  // export default function middleware(request: Request): Response | void {
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  import * as React from "react";
3
3
  import { Pressable } from "react-native";
4
4
  import {
package/native.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // `@uniflowed/router/native`: the React Native navigator contract.
4
4
  //
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniflowed/router",
3
- "version": "0.48.0",
3
+ "version": "0.49.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",
@@ -54,7 +54,7 @@
54
54
  "peerDependencies": {
55
55
  "react": ">=19.2.3",
56
56
  "react-dom": ">=19.2.3",
57
- "react-server-dom-parcel": ">=19.3.0",
57
+ "react-server-dom-parcel": ">=19.3.1",
58
58
  "react-native": ">=0.86",
59
59
  "@react-navigation/native": "^7.0.0"
60
60
  },
@@ -73,8 +73,8 @@
73
73
  }
74
74
  },
75
75
  "dependencies": {
76
- "@uniflowed/hooks": "0.48.0",
77
- "@uniflowed/server": "0.48.0",
78
- "@uniflowed/validator": "0.48.0"
76
+ "@uniflowed/hooks": "0.49.0",
77
+ "@uniflowed/server": "0.49.0",
78
+ "@uniflowed/validator": "0.49.0"
79
79
  }
80
80
  }
package/routing.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // `@uniflowed/router/routing`: React-free route table helpers.
4
4
  //
package/rsc-client.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // `@uniflowed/router/rsc/client`: starting, in the browser, an application that
4
4
  // React Server Components rendered.
package/rsc-ssr.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // `@uniflowed/router/rsc/ssr`: a document, rendered from the payload React
4
4
  // Server Components wrote.
package/rsc.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // `@uniflowed/router/rsc`: a route, rendered as React Server Components.
4
4
  //
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // `@uniflowed/router`, as a React Server Component imports it.
4
4
  //
package/server.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // Rendering one URL to an HTML document.
4
4
  //
package/testing.js CHANGED
@@ -1,4 +1,4 @@
1
- // @flow
1
+ "use flow";
2
2
  //
3
3
  // `@uniflowed/router/testing`: Server Components and server actions, under test.
4
4
  //