@uniflowed/router 0.10.0 → 0.11.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/client.js CHANGED
@@ -209,7 +209,7 @@ export async function hydrate(options: {|
209
209
  // `import.meta.hot` is the gate because it is the one signal that is right in
210
210
  // all three places this module is evaluated. Vite defines it while serving
211
211
  // and replaces it with `undefined` in a build, so the branch is statically
212
- // dead there; Node leaves it undefined, so `packages/vite/rsc-split.test.js`
212
+ // dead there; Node leaves it undefined, so `npm/vite/rsc-split.test.js`
213
213
  // imports this file without a bundler and gets the production path. The
214
214
  // import is dynamic so that the overlay is not merely shaken out of a
215
215
  // production bundle but never reachable from one.
@@ -4,7 +4,7 @@
4
4
  // to the page this browser just hydrated.
5
5
  //
6
6
  // `@uniflowed/vite` installs the hook DevTools attaches through, as a classic
7
- // script above every module — see `packages/vite/internal/devtools.js`, which
7
+ // script above every module — see `npm/vite/internal/devtools.js`, which
8
8
  // has the argument. That is uf saying what it intends. This is the half that
9
9
  // checks it happened, and the two are not the same claim: the preamble is
10
10
  // injected by a `transformIndexHtml` hook, into a document a project's own Vite
@@ -29,7 +29,7 @@
29
29
  // panel props, hooks and source positions — is not checked here because a
30
30
  // browser cannot tell the difference from the outside, and because uf owns it
31
31
  // end to end: `mode` is `development` and `uf transform` is called with
32
- // `development: true`, both asserted in `packages/vite/devtools.test.js`
32
+ // `development: true`, both asserted in `npm/vite/devtools.test.js`
33
33
  // against the plugin rather than against a page. What is left is what only a
34
34
  // running page knows.
35
35
  //
@@ -53,7 +53,7 @@ import { reportDiagnostic } from "./diagnostics.js";
53
53
  * that file's neighbour `internal/diagnostics.js` gives about the endpoint
54
54
  * paths: `@uniflowed/vite` is loaded by Vite before any Flow transform exists
55
55
  * and this module is Flow, so the import cannot go either way.
56
- * `packages/vite/devtools.test.js` asserts the two spellings agree, which is
56
+ * `npm/vite/devtools.test.js` asserts the two spellings agree, which is
57
57
  * what makes a duplicated constant honest.
58
58
  */
59
59
  export const DEVTOOLS_HOOK: string = "__REACT_DEVTOOLS_GLOBAL_HOOK__";
@@ -29,7 +29,7 @@
29
29
  // published package that depends on an unpublished one, because the tarball
30
30
  // would name a version the registry does not have; `@uniflowed/router` is on
31
31
  // npm and `@uniflowed/hmr` is a declaration package that is not. What the two
32
- // posters do share is the contract, and `packages/vite/dev-channel.test.js`
32
+ // posters do share is the contract, and `npm/vite/dev-channel.test.js`
33
33
  // asserts that every spelling of these paths agrees — a duplicated constant
34
34
  // with a test on it is honest, and one without is how a browser ends up
35
35
  // posting to a path nothing serves.
@@ -62,7 +62,7 @@ function elementJson(value: FlightChunk): string {
62
62
  * `application/json` and therefore a data block the browser never executes.
63
63
  * Two reasons, and neither is "in case the spec changes". A uf document's
64
64
  * invariant is that every `<script>` in it carries the nonce — that is what
65
- * `packages/router/streaming.test.js` pins, and an invariant with an exception
65
+ * `npm/router/streaming.test.js` pins, and an invariant with an exception
66
66
  * in it is one a reader has to check every new script against. And these are
67
67
  * written as text into a stream rather than rendered by React, so unlike the
68
68
  * payload rows in `./runtime.js` there is no second render on the client to
@@ -199,7 +199,7 @@ export type ErrorModule = {
199
199
  * No `metadata`, and that is the type saying something true rather than an
200
200
  * omission. A fallback renders while the route is still resolving, and the
201
201
  * route's metadata was decided before the first byte — a title on a file that
202
- * renders after the head has gone could never be used. `packages/web/head.js`
202
+ * renders after the head has gone could never be used. `npm/web/head.js`
203
203
  * documents the same constraint from the other side.
204
204
  */
205
205
  export type LoadingModule = {
@@ -1925,7 +1925,7 @@ function rowFailure(error: mixed): string {
1925
1925
  * So this returns elements rather than writing to the head. Writing would have
1926
1926
  * to happen in an effect, an effect does not run on a server, and the result
1927
1927
  * would be a page whose tags are right in a browser and missing from the
1928
- * crawler — `packages/web/head.js` is that escape hatch and says so at the top
1928
+ * crawler — `npm/web/head.js` is that escape hatch and says so at the top
1929
1929
  * of the file. Rendering is what puts a tag in a server-rendered head, so the
1930
1930
  * caller renders what comes back:
1931
1931
  *
@@ -2126,7 +2126,7 @@ function isExternal(to: string): boolean {
2126
2126
  * It is safe above a root layout that renders `<html>` only because the
2127
2127
  * envelope's carrier is a `<meta>`: React hoists one into the head of a
2128
2128
  * document it rendered, and to the front of a tree that is not one, where uf's
2129
- * shell lifts it into the head it wrote itself. `packages/hooks/render.js` has
2129
+ * shell lifts it into the head it wrote itself. `npm/hooks/render.js` has
2130
2130
  * the argument, and it is the reason the carrier is no longer a `<script>`.
2131
2131
  */
2132
2132
  export function routerView(root: string): React.ComponentType<AppProps> {
@@ -11,7 +11,7 @@
11
11
  //
12
12
  // # The head is written before the body
13
13
  //
14
- // `packages/web/head.js` says this from the other side, as the reason `useHead`
14
+ // `npm/web/head.js` says this from the other side, as the reason `useHead`
15
15
  // does nothing on a server: once the body is streaming, the head has gone and
16
16
  // no component can still change it. This module is what makes that true rather
17
17
  // than merely claimed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniflowed/router",
3
- "version": "0.10.0",
3
+ "version": "0.11.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",
@@ -8,7 +8,7 @@
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/ubugeeei-prod/uf.git",
11
- "directory": "packages/router"
11
+ "directory": "npm/router"
12
12
  },
13
13
  "exports": {
14
14
  ".": {
@@ -73,8 +73,8 @@
73
73
  }
74
74
  },
75
75
  "dependencies": {
76
- "@uniflowed/hooks": "0.10.0",
77
- "@uniflowed/server": "0.10.0",
78
- "@uniflowed/validator": "0.10.0"
76
+ "@uniflowed/hooks": "0.11.0",
77
+ "@uniflowed/server": "0.11.0",
78
+ "@uniflowed/validator": "0.11.0"
79
79
  }
80
80
  }
package/server.js CHANGED
@@ -195,7 +195,7 @@ export type RenderOptions = {|
195
195
  *
196
196
  * uf's own injections are `head` and `head-prepend`, and Vite's client is
197
197
  * head-injected, so this is about a third-party plugin.
198
- * `packages/vite/dev-head-transform.test.js` pins the table above, so the day
198
+ * `npm/vite/dev-head-transform.test.js` pins the table above, so the day
199
199
  * it changes is a failing test rather than a surprise.
200
200
  */
201
201
  readonly transformHead?: (html: string) => Promise<string>,