@react-router/dev 7.0.0-pre.1 → 7.0.0-pre.2

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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # `@remix-run/dev`
2
2
 
3
+ ## 7.0.0-pre.2
4
+
5
+ ### Major Changes
6
+
7
+ - - Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177))
8
+ - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute`
9
+ - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest`
10
+ - `Record<string, Route> -> Record<string, Route | undefined>`
11
+ - Removed `AppData` type in favor of inlining `unknown` in the few locations it was used
12
+ - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from
13
+ - Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171))
14
+
15
+ - Remove `installGlobals()` as this should no longer be necessary
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies:
20
+ - `react-router@7.0.0-pre.2`
21
+ - `@react-router/node@7.0.0-pre.2`
22
+ - `@react-router/serve@7.0.0-pre.2`
23
+
3
24
  ## 7.0.0-pre.1
4
25
 
5
26
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/cli/run.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -98,8 +98,9 @@ ${colors.logoBlue("react-router")}
98
98
  async function run(argv = process.argv.slice(2)) {
99
99
  // Check the node version
100
100
  let versions = process.versions;
101
- if (versions && versions.node && semver__default["default"].major(versions.node) < 18) {
102
- throw new Error(`️🚨 Oops, Node v${versions.node} detected. react-router requires a Node version greater than 18.`);
101
+ let MINIMUM_NODE_VERSION = 20;
102
+ if (versions && versions.node && semver__default["default"].major(versions.node) < MINIMUM_NODE_VERSION) {
103
+ throw new Error(`️🚨 Oops, Node v${versions.node} detected. react-router requires ` + `a Node version greater than ${MINIMUM_NODE_VERSION}.`);
103
104
  }
104
105
  let isBooleanFlag = arg => {
105
106
  let index = argv.indexOf(arg);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/colors.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/invariant.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -12,7 +12,7 @@
12
12
 
13
13
  function invariant(value, message) {
14
14
  if (value === false || value === null || typeof value === "undefined") {
15
- console.error("The following error is a bug in Remix; please open an issue! https://github.com/remix-run/remix/issues/new");
15
+ console.error("The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose");
16
16
  throw new Error(message);
17
17
  }
18
18
  }
package/dist/routes.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/vite/dev.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1261,11 +1261,13 @@ function validatePrerenderedHtml(html, prefix) {
1261
1261
  function groupRoutesByParentId(manifest) {
1262
1262
  let routes = {};
1263
1263
  Object.values(manifest).forEach(route => {
1264
- let parentId = route.parentId || "";
1265
- if (!routes[parentId]) {
1266
- routes[parentId] = [];
1264
+ if (route) {
1265
+ let parentId = route.parentId || "";
1266
+ if (!routes[parentId]) {
1267
+ routes[parentId] = [];
1268
+ }
1269
+ routes[parentId].push(route);
1267
1270
  }
1268
- routes[parentId].push(route);
1269
1271
  });
1270
1272
  return routes;
1271
1273
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -147,11 +147,13 @@ const findDeps = async (vite, node, deps) => {
147
147
  const groupRoutesByParentId = manifest => {
148
148
  let routes = {};
149
149
  Object.values(manifest).forEach(route => {
150
- let parentId = route.parentId || "";
151
- if (!routes[parentId]) {
152
- routes[parentId] = [];
150
+ if (route) {
151
+ let parentId = route.parentId || "";
152
+ if (!routes[parentId]) {
153
+ routes[parentId] = [];
154
+ }
155
+ routes[parentId].push(route);
153
156
  }
154
- routes[parentId].push(route);
155
157
  });
156
158
  return routes;
157
159
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/vite/vmod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/vite.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.0.0-pre.1
2
+ * @react-router/dev v7.0.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-router/dev",
3
- "version": "7.0.0-pre.1",
3
+ "version": "7.0.0-pre.2",
4
4
  "description": "Dev tools and CLI for React Router",
5
5
  "homepage": "https://reactrouter.com",
6
6
  "bugs": {
@@ -61,7 +61,7 @@
61
61
  "set-cookie-parser": "^2.6.0",
62
62
  "valibot": "^0.41.0",
63
63
  "vite-node": "^1.6.0",
64
- "@react-router/node": "7.0.0-pre.1"
64
+ "@react-router/node": "7.0.0-pre.2"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@types/babel__core": "^7.20.5",
@@ -87,15 +87,15 @@
87
87
  "tiny-invariant": "^1.2.0",
88
88
  "vite": "^5.1.0",
89
89
  "wrangler": "^3.28.2",
90
- "@react-router/serve": "7.0.0-pre.1",
91
- "react-router": "^7.0.0-pre.1"
90
+ "@react-router/serve": "7.0.0-pre.2",
91
+ "react-router": "^7.0.0-pre.2"
92
92
  },
93
93
  "peerDependencies": {
94
94
  "typescript": "^5.1.0",
95
95
  "vite": "^5.1.0",
96
96
  "wrangler": "^3.28.2",
97
- "@react-router/serve": "^7.0.0-pre.1",
98
- "react-router": "^7.0.0-pre.1"
97
+ "@react-router/serve": "^7.0.0-pre.2",
98
+ "react-router": "^7.0.0-pre.2"
99
99
  },
100
100
  "peerDependenciesMeta": {
101
101
  "@react-router/serve": {
@@ -109,7 +109,7 @@
109
109
  }
110
110
  },
111
111
  "engines": {
112
- "node": ">=18.0.0"
112
+ "node": ">=20.0.0"
113
113
  },
114
114
  "files": [
115
115
  "dist/",