@react-router/dev 7.0.0 → 7.0.1
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/CHANGELOG.md +11 -1
- package/README.md +1 -3
- package/dist/cli/index.js +7 -1
- package/dist/config.d.ts +4 -1
- package/dist/config.js +1 -1
- package/dist/{routes-C14jcF98.d.ts → routes-DHIOx0R9.d.ts} +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +1 -1
- package/dist/vite/cloudflare.js +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +13 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
+
## 7.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Ensure typegen file watcher is cleaned up when Vite dev server restarts ([#12331](https://github.com/remix-run/react-router/pull/12331))
|
|
8
|
+
- Updated dependencies:
|
|
9
|
+
- `react-router@7.0.1`
|
|
10
|
+
- `@react-router/node@7.0.1`
|
|
11
|
+
- `@react-router/serve@7.0.1`
|
|
12
|
+
|
|
3
13
|
## 7.0.0
|
|
4
14
|
|
|
5
15
|
### Major Changes
|
|
@@ -16,7 +26,7 @@
|
|
|
16
26
|
+import { cloudflareDevProxy } from "@react-router/dev/vite/cloudflare";
|
|
17
27
|
```
|
|
18
28
|
|
|
19
|
-
- Remove
|
|
29
|
+
- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
|
|
20
30
|
|
|
21
31
|
- update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690))
|
|
22
32
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Dev tools and CLI for [React Router.](https://github.com/remix-run/react-router)
|
|
1
|
+
Dev tools and CLI for React Router that enables framework features through bundler integration like server rendering, code splitting, HMR, etc.
|
|
4
2
|
|
|
5
3
|
```sh
|
|
6
4
|
npm install @react-router/dev
|
package/dist/cli/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @react-router/dev v7.0.
|
|
3
|
+
* @react-router/dev v7.0.1
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) Remix Software Inc.
|
|
6
6
|
*
|
|
@@ -631,6 +631,9 @@ function generate(ctx, route) {
|
|
|
631
631
|
export type MetaDescriptors = T.MetaDescriptors
|
|
632
632
|
export type MetaFunction = (args: MetaArgs) => MetaDescriptors
|
|
633
633
|
|
|
634
|
+
export type HeadersArgs = T.HeadersArgs
|
|
635
|
+
export type HeadersFunction = (args: HeadersArgs) => Headers | HeadersInit
|
|
636
|
+
|
|
634
637
|
export type LoaderArgs = T.CreateServerLoaderArgs<Info>
|
|
635
638
|
export type ClientLoaderArgs = T.CreateClientLoaderArgs<Info>
|
|
636
639
|
export type ActionArgs = T.CreateServerActionArgs<Info>
|
|
@@ -717,6 +720,9 @@ async function watch(rootDirectory, { logger } = {}) {
|
|
|
717
720
|
});
|
|
718
721
|
}
|
|
719
722
|
});
|
|
723
|
+
return {
|
|
724
|
+
close: async () => await ctx.configLoader.close()
|
|
725
|
+
};
|
|
720
726
|
}
|
|
721
727
|
async function createContext2({
|
|
722
728
|
rootDirectory,
|
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Vite from 'vite';
|
|
2
|
-
import { R as RouteManifest, a as RouteManifestEntry } from './routes-
|
|
2
|
+
import { R as RouteManifest, a as RouteManifestEntry } from './routes-DHIOx0R9.js';
|
|
3
3
|
import 'valibot';
|
|
4
4
|
|
|
5
5
|
declare const excludedConfigPresetKeys: readonly ["presets"];
|
|
@@ -45,6 +45,9 @@ type BuildEndHook = (args: {
|
|
|
45
45
|
reactRouterConfig: ResolvedReactRouterConfig;
|
|
46
46
|
viteConfig: Vite.ResolvedConfig;
|
|
47
47
|
}) => void | Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Config to be exported via the default export from `react-router.config.ts`.
|
|
50
|
+
*/
|
|
48
51
|
type ReactRouterConfig = {
|
|
49
52
|
/**
|
|
50
53
|
* The path to the `app` directory, relative to the root directory. Defaults
|
package/dist/config.js
CHANGED
|
@@ -75,7 +75,7 @@ interface RouteConfigEntry {
|
|
|
75
75
|
declare const resolvedRouteConfigSchema: v.ArraySchema<v.BaseSchema<RouteConfigEntry, any, v.BaseIssue<unknown>>, undefined>;
|
|
76
76
|
type ResolvedRouteConfig = v.InferInput<typeof resolvedRouteConfigSchema>;
|
|
77
77
|
/**
|
|
78
|
-
* Route config to be exported via the
|
|
78
|
+
* Route config to be exported via the default export from `app/routes.ts`.
|
|
79
79
|
*/
|
|
80
80
|
type RouteConfig = ResolvedRouteConfig | Promise<ResolvedRouteConfig>;
|
|
81
81
|
declare const createConfigRouteOptionKeys: ["id", "index", "caseSensitive"];
|
package/dist/routes.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { b as RouteConfig, c as RouteConfigEntry, g as getAppDirectory, i as index, l as layout, p as prefix, d as relative, r as route } from './routes-
|
|
1
|
+
export { b as RouteConfig, c as RouteConfigEntry, g as getAppDirectory, i as index, l as layout, p as prefix, d as relative, r as route } from './routes-DHIOx0R9.js';
|
|
2
2
|
import 'valibot';
|
package/dist/routes.js
CHANGED
package/dist/vite/cloudflare.js
CHANGED
package/dist/vite.d.ts
CHANGED
package/dist/vite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v7.0.
|
|
2
|
+
* @react-router/dev v7.0.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -672,6 +672,9 @@ function generate(ctx, route) {
|
|
|
672
672
|
export type MetaDescriptors = T.MetaDescriptors
|
|
673
673
|
export type MetaFunction = (args: MetaArgs) => MetaDescriptors
|
|
674
674
|
|
|
675
|
+
export type HeadersArgs = T.HeadersArgs
|
|
676
|
+
export type HeadersFunction = (args: HeadersArgs) => Headers | HeadersInit
|
|
677
|
+
|
|
675
678
|
export type LoaderArgs = T.CreateServerLoaderArgs<Info>
|
|
676
679
|
export type ClientLoaderArgs = T.CreateClientLoaderArgs<Info>
|
|
677
680
|
export type ActionArgs = T.CreateServerActionArgs<Info>
|
|
@@ -744,6 +747,9 @@ async function watch(rootDirectory, { logger } = {}) {
|
|
|
744
747
|
});
|
|
745
748
|
}
|
|
746
749
|
});
|
|
750
|
+
return {
|
|
751
|
+
close: async () => await ctx.configLoader.close()
|
|
752
|
+
};
|
|
747
753
|
}
|
|
748
754
|
async function createContext2({
|
|
749
755
|
rootDirectory,
|
|
@@ -1134,7 +1140,7 @@ var plugin = {
|
|
|
1134
1140
|
if (id2 !== resolve3(vmodId)) return;
|
|
1135
1141
|
return import_dedent2.default`
|
|
1136
1142
|
import { createElement as h } from "react";
|
|
1137
|
-
import { useActionData, useLoaderData, useMatches, useParams } from "react-router";
|
|
1143
|
+
import { useActionData, useLoaderData, useMatches, useParams, useRouteError } from "react-router";
|
|
1138
1144
|
|
|
1139
1145
|
export function withComponentProps(Component) {
|
|
1140
1146
|
return function Wrapped() {
|
|
@@ -1163,6 +1169,7 @@ var plugin = {
|
|
|
1163
1169
|
params: useParams(),
|
|
1164
1170
|
loaderData: useLoaderData(),
|
|
1165
1171
|
actionData: useActionData(),
|
|
1172
|
+
error: useRouteError(),
|
|
1166
1173
|
};
|
|
1167
1174
|
return h(ErrorBoundary, props);
|
|
1168
1175
|
};
|
|
@@ -1412,6 +1419,7 @@ var reactRouterVitePlugin = () => {
|
|
|
1412
1419
|
let cssModulesManifest = {};
|
|
1413
1420
|
let viteChildCompiler = null;
|
|
1414
1421
|
let reactRouterConfigLoader;
|
|
1422
|
+
let typegenWatcherPromise;
|
|
1415
1423
|
let logger;
|
|
1416
1424
|
let firstLoad = true;
|
|
1417
1425
|
let ctx;
|
|
@@ -1670,7 +1678,7 @@ var reactRouterVitePlugin = () => {
|
|
|
1670
1678
|
});
|
|
1671
1679
|
rootDirectory = viteUserConfig.root ?? process.env.REACT_ROUTER_ROOT ?? process.cwd();
|
|
1672
1680
|
if (viteCommand === "serve") {
|
|
1673
|
-
watch(rootDirectory, {
|
|
1681
|
+
typegenWatcherPromise = watch(rootDirectory, {
|
|
1674
1682
|
// ignore `info` logs from typegen since they are redundant when Vite plugin logs are active
|
|
1675
1683
|
logger: vite2.createLogger("warn", { prefix: "[react-router]" })
|
|
1676
1684
|
});
|
|
@@ -2046,6 +2054,8 @@ var reactRouterVitePlugin = () => {
|
|
|
2046
2054
|
async buildEnd() {
|
|
2047
2055
|
await viteChildCompiler?.close();
|
|
2048
2056
|
await reactRouterConfigLoader.close();
|
|
2057
|
+
let typegenWatcher = await typegenWatcherPromise;
|
|
2058
|
+
await typegenWatcher?.close();
|
|
2049
2059
|
}
|
|
2050
2060
|
},
|
|
2051
2061
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-router/dev",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Dev tools and CLI for React Router",
|
|
5
5
|
"homepage": "https://reactrouter.com",
|
|
6
6
|
"bugs": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"set-cookie-parser": "^2.6.0",
|
|
82
82
|
"valibot": "^0.41.0",
|
|
83
83
|
"vite-node": "^1.6.0",
|
|
84
|
-
"@react-router/node": "7.0.
|
|
84
|
+
"@react-router/node": "7.0.1"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@types/babel__core": "^7.20.5",
|
|
@@ -110,15 +110,15 @@
|
|
|
110
110
|
"vite": "^5.1.0",
|
|
111
111
|
"wireit": "0.14.9",
|
|
112
112
|
"wrangler": "^3.28.2",
|
|
113
|
-
"@react-router/serve": "7.0.
|
|
114
|
-
"react-router": "^7.0.
|
|
113
|
+
"@react-router/serve": "7.0.1",
|
|
114
|
+
"react-router": "^7.0.1"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|
|
117
117
|
"typescript": "^5.1.0",
|
|
118
118
|
"vite": "^5.1.0",
|
|
119
119
|
"wrangler": "^3.28.2",
|
|
120
|
-
"@react-router/serve": "^7.0.
|
|
121
|
-
"react-router": "^7.0.
|
|
120
|
+
"@react-router/serve": "^7.0.1",
|
|
121
|
+
"react-router": "^7.0.1"
|
|
122
122
|
},
|
|
123
123
|
"peerDependenciesMeta": {
|
|
124
124
|
"@react-router/serve": {
|