@react-router/dev 8.0.0-pre.0 → 8.0.0-pre.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 +33 -0
- package/dist/{build-DM91F_L-.js → build-BNyvbPOz.js} +2 -2
- package/dist/cli/index.js +5 -5
- package/dist/config.js +1 -1
- package/dist/{dev-CNEgIjT-.js → dev-m_IzFFzQ.js} +2 -2
- package/dist/{routes-DXogguGb.js → routes-DPac_fCT.js} +1 -1
- package/dist/routes.js +2 -2
- package/dist/{typegen-BLMwBSoM.js → typegen-BNUacd46.js} +9 -3
- package/dist/vite.js +10 -7
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
+
## v7.18.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Pass Vite `server.watch` config to child compiler in development mode. ([#15178](https://github.com/remix-run/react-router/pull/15178))
|
|
8
|
+
|
|
9
|
+
- Ignore external Vite server environments in Framework Mode build hooks ([#14883](https://github.com/remix-run/react-router/pull/14883))
|
|
10
|
+
|
|
11
|
+
When `future.v8_viteEnvironmentApi` is enabled, React Router previously treated any non-client Vite environment as its own server build. This caused issues with integrations like Nitro, where plugins can register additional environments.
|
|
12
|
+
|
|
13
|
+
Framework Mode build hooks now ignore external server environments and only process the app's own server build.
|
|
14
|
+
|
|
15
|
+
- Updated dependencies:
|
|
16
|
+
- [`react-router@7.18.0`](https://github.com/remix-run/react-router/releases/tag/react-router@7.18.0)
|
|
17
|
+
- [`@react-router/node@7.18.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@7.18.0)
|
|
18
|
+
- [`@react-router/serve@7.18.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@7.18.0)
|
|
19
|
+
|
|
20
|
+
## v7.17.0
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Fix future flag warning URLs and only log each future flag warning one time ([#15138](https://github.com/remix-run/react-router/pull/15138))
|
|
25
|
+
|
|
26
|
+
### Unstable Changes
|
|
27
|
+
|
|
28
|
+
⚠️ _[Unstable features](https://reactrouter.com/community/api-development-strategy#unstable-flags) are not recommended for production use_
|
|
29
|
+
|
|
30
|
+
- Prevent RSC route module server exports from being scanned by the client dependency optimizer when `future.unstable_optimizeDeps` is enabled. ([#15005](https://github.com/remix-run/react-router/pull/15005))
|
|
31
|
+
- Updated dependencies:
|
|
32
|
+
- [`react-router@7.17.0`](https://github.com/remix-run/react-router/releases/tag/react-router@7.17.0)
|
|
33
|
+
- [`@react-router/node@7.17.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@7.17.0)
|
|
34
|
+
- [`@react-router/serve@7.17.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@7.17.0)
|
|
35
|
+
|
|
3
36
|
## v7.16.0
|
|
4
37
|
|
|
5
38
|
### Minor Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v8.0.0-pre.
|
|
2
|
+
* @react-router/dev v8.0.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { g as preloadVite, h as getVite } from "./typegen-
|
|
11
|
+
import { g as preloadVite, h as getVite } from "./typegen-BNUacd46.js";
|
|
12
12
|
//#region vite/build.ts
|
|
13
13
|
async function build(root, viteBuildOptions) {
|
|
14
14
|
await preloadVite();
|
package/dist/cli/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @react-router/dev v8.0.0-pre.
|
|
3
|
+
* @react-router/dev v8.0.0-pre.1
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) Remix Software Inc.
|
|
6
6
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @license MIT
|
|
11
11
|
*/
|
|
12
|
-
import { g as preloadVite, h as getVite, l as loadConfig, n as watch, t as run$1 } from "../typegen-
|
|
12
|
+
import { g as preloadVite, h as getVite, l as loadConfig, n as watch, t as run$1 } from "../typegen-BNUacd46.js";
|
|
13
13
|
import { createRequire } from "node:module";
|
|
14
14
|
import fs, { existsSync } from "node:fs";
|
|
15
15
|
import * as path$1 from "node:path";
|
|
@@ -141,7 +141,7 @@ async function routes(rootDirectory, flags = {}) {
|
|
|
141
141
|
}
|
|
142
142
|
async function build(root, options = {}) {
|
|
143
143
|
root = resolveRootDirectory(root, options);
|
|
144
|
-
let { build } = await import("../build-
|
|
144
|
+
let { build } = await import("../build-BNyvbPOz.js");
|
|
145
145
|
if (options.profile) await start();
|
|
146
146
|
try {
|
|
147
147
|
await build(root, options);
|
|
@@ -150,7 +150,7 @@ async function build(root, options = {}) {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
async function dev(root, options = {}) {
|
|
153
|
-
let { dev } = await import("../dev-
|
|
153
|
+
let { dev } = await import("../dev-m_IzFFzQ.js");
|
|
154
154
|
if (options.profile) await start();
|
|
155
155
|
exitHook(() => stop(console.info));
|
|
156
156
|
root = resolveRootDirectory(root, options);
|
|
@@ -379,7 +379,7 @@ ${colors.blueBright("react-router")}
|
|
|
379
379
|
*/
|
|
380
380
|
async function run(argv = process.argv.slice(2), { isMain = false } = {}) {
|
|
381
381
|
let versions = process.versions;
|
|
382
|
-
let MINIMUM_NODE_VERSION = "22.
|
|
382
|
+
let MINIMUM_NODE_VERSION = "22.22.0";
|
|
383
383
|
if (versions && versions.node && semver.lt(versions.node, MINIMUM_NODE_VERSION)) console.warn(`️⚠️ Oops, Node v${versions.node} detected. react-router requires a Node version greater than ${MINIMUM_NODE_VERSION}.`);
|
|
384
384
|
let isBooleanFlag = (arg) => {
|
|
385
385
|
let nextArg = argv[argv.indexOf(arg) + 1];
|
package/dist/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v8.0.0-pre.
|
|
2
|
+
* @react-router/dev v8.0.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { g as preloadVite, h as getVite } from "./typegen-
|
|
11
|
+
import { g as preloadVite, h as getVite } from "./typegen-BNUacd46.js";
|
|
12
12
|
import { n as start, r as stop, t as getSession } from "./cli/index.js";
|
|
13
13
|
import colors from "picocolors";
|
|
14
14
|
//#region vite/dev.ts
|
package/dist/routes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v8.0.0-pre.
|
|
2
|
+
* @react-router/dev v8.0.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { a as prefix, i as layout, n as getAppDirectory, o as relative, r as index, s as route } from "./routes-
|
|
11
|
+
import { a as prefix, i as layout, n as getAppDirectory, o as relative, r as index, s as route } from "./routes-DPac_fCT.js";
|
|
12
12
|
export { getAppDirectory, index, layout, prefix, relative, route };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v8.0.0-pre.
|
|
2
|
+
* @react-router/dev v8.0.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { c as setAppDirectory, l as validateRouteConfig, t as configRoutesToRouteManifest, u as invariant } from "./routes-
|
|
11
|
+
import { c as setAppDirectory, l as validateRouteConfig, t as configRoutesToRouteManifest, u as invariant } from "./routes-DPac_fCT.js";
|
|
12
12
|
import { createRequire } from "node:module";
|
|
13
13
|
import fs from "node:fs";
|
|
14
14
|
import colors from "picocolors";
|
|
@@ -329,7 +329,13 @@ async function createConfigLoader({ rootDirectory: root, watch, mode, skipRoutes
|
|
|
329
329
|
validateConfig
|
|
330
330
|
});
|
|
331
331
|
let appDirectory;
|
|
332
|
-
let initialConfigResult = await
|
|
332
|
+
let initialConfigResult = await resolveConfig({
|
|
333
|
+
root,
|
|
334
|
+
viteRunnerContext,
|
|
335
|
+
reactRouterConfigFile,
|
|
336
|
+
skipRoutes,
|
|
337
|
+
validateConfig
|
|
338
|
+
});
|
|
333
339
|
if (!initialConfigResult.ok) throw new Error(initialConfigResult.error);
|
|
334
340
|
appDirectory = path.normalize(initialConfigResult.value.appDirectory);
|
|
335
341
|
let currentConfig = initialConfigResult.value;
|
package/dist/vite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v8.0.0-pre.
|
|
2
|
+
* @react-router/dev v8.0.0-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import { a as t, c as createConfigLoader, d as resolveRSCEntryFiles, f as ssrExternals, g as preloadVite, h as getVite, i as parse$1, m as defineOptimizeDepsCompilerOptions, n as watch, o as traverse, p as defineCompilerOptions, r as generate, s as configRouteToBranchRoute, u as resolveEntryFiles } from "./typegen-
|
|
12
|
-
import { u as invariant } from "./routes-
|
|
11
|
+
import { a as t, c as createConfigLoader, d as resolveRSCEntryFiles, f as ssrExternals, g as preloadVite, h as getVite, i as parse$1, m as defineOptimizeDepsCompilerOptions, n as watch, o as traverse, p as defineCompilerOptions, r as generate, s as configRouteToBranchRoute, u as resolveEntryFiles } from "./typegen-BNUacd46.js";
|
|
12
|
+
import { u as invariant } from "./routes-DPac_fCT.js";
|
|
13
13
|
import { createRequire } from "node:module";
|
|
14
14
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
15
15
|
import * as path$2 from "node:path";
|
|
@@ -997,8 +997,11 @@ const SSR_BUNDLE_PREFIX = "ssrBundle_";
|
|
|
997
997
|
function isSsrBundleEnvironmentName(name) {
|
|
998
998
|
return name.startsWith(SSR_BUNDLE_PREFIX);
|
|
999
999
|
}
|
|
1000
|
+
function isReactRouterServerEnvironment(ctx, environmentName) {
|
|
1001
|
+
return ctx.buildManifest?.serverBundles ? isSsrBundleEnvironmentName(environmentName) : environmentName === "ssr";
|
|
1002
|
+
}
|
|
1000
1003
|
function getServerEnvironmentEntries(ctx, record) {
|
|
1001
|
-
return Object.entries(record).filter(([name]) => ctx
|
|
1004
|
+
return Object.entries(record).filter(([name]) => isReactRouterServerEnvironment(ctx, name));
|
|
1002
1005
|
}
|
|
1003
1006
|
function getServerEnvironmentValues(ctx, record) {
|
|
1004
1007
|
return getServerEnvironmentEntries(ctx, record).map(([, value]) => value);
|
|
@@ -1551,7 +1554,7 @@ const reactRouterVitePlugin = () => {
|
|
|
1551
1554
|
};
|
|
1552
1555
|
},
|
|
1553
1556
|
configEnvironment(name, options) {
|
|
1554
|
-
if (ctx
|
|
1557
|
+
if (isReactRouterServerEnvironment(ctx, name)) {
|
|
1555
1558
|
const vite = getVite();
|
|
1556
1559
|
return {
|
|
1557
1560
|
resolve: { external: options.resolve?.noExternal === true ? void 0 : ssrExternals },
|
|
@@ -1584,7 +1587,7 @@ const reactRouterVitePlugin = () => {
|
|
|
1584
1587
|
cacheDir: "node_modules/.vite-child-compiler",
|
|
1585
1588
|
mode: viteConfig.mode,
|
|
1586
1589
|
server: {
|
|
1587
|
-
watch: viteConfig.command === "build" ? null :
|
|
1590
|
+
watch: viteConfig.command === "build" ? null : viteConfig.server.watch,
|
|
1588
1591
|
preTransformRequests: false,
|
|
1589
1592
|
hmr: false
|
|
1590
1593
|
},
|
|
@@ -1735,7 +1738,7 @@ const reactRouterVitePlugin = () => {
|
|
|
1735
1738
|
};
|
|
1736
1739
|
},
|
|
1737
1740
|
writeBundle: { async handler() {
|
|
1738
|
-
if (this.environment.name
|
|
1741
|
+
if (!isReactRouterServerEnvironment(ctx, this.environment.name)) return;
|
|
1739
1742
|
invariant(viteConfig);
|
|
1740
1743
|
let clientBuildDirectory = getClientBuildDirectory$1(ctx.reactRouterConfig);
|
|
1741
1744
|
let serverBuildDirectory = this.environment.config?.build?.outDir;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-router/dev",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.0.0-pre.
|
|
4
|
+
"version": "8.0.0-pre.1",
|
|
5
5
|
"description": "Dev tools and CLI for React Router",
|
|
6
6
|
"homepage": "https://reactrouter.com",
|
|
7
7
|
"bugs": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"semver": "^7.8.1",
|
|
89
89
|
"tinyglobby": "^0.2.16",
|
|
90
90
|
"valibot": "^1.4.1",
|
|
91
|
-
"@react-router/node": "8.0.0-pre.
|
|
91
|
+
"@react-router/node": "8.0.0-pre.1"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@types/babel__core": "^7.20.5",
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
"vite": "^7.0.0",
|
|
111
111
|
"wireit": "0.14.12",
|
|
112
112
|
"wrangler": "^4.95.0",
|
|
113
|
-
"
|
|
114
|
-
"react-router": "
|
|
113
|
+
"react-router": "^8.0.0-pre.1",
|
|
114
|
+
"@react-router/serve": "8.0.0-pre.1"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|
|
117
117
|
"@vitejs/plugin-rsc": "~0.5.26",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"typescript": "^5.1.0 || ^6.0.0",
|
|
120
120
|
"vite": "^7.0.0 || ^8.0.0",
|
|
121
121
|
"wrangler": "^4.0.0",
|
|
122
|
-
"@react-router/serve": "^8.0.0-pre.
|
|
123
|
-
"react-router": "^8.0.0-pre.
|
|
122
|
+
"@react-router/serve": "^8.0.0-pre.1",
|
|
123
|
+
"react-router": "^8.0.0-pre.1"
|
|
124
124
|
},
|
|
125
125
|
"peerDependenciesMeta": {
|
|
126
126
|
"@vitejs/plugin-rsc": {
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
142
|
"engines": {
|
|
143
|
-
"node": ">=22.
|
|
143
|
+
"node": ">=22.22.0"
|
|
144
144
|
},
|
|
145
145
|
"files": [
|
|
146
146
|
"dist/",
|