@react-router/dev 7.7.0-pre.2 → 7.7.1-pre.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/CHANGELOG.md CHANGED
@@ -1,24 +1,16 @@
1
1
  # `@react-router/dev`
2
2
 
3
- ## 7.7.0-pre.2
3
+ ## 7.7.1-pre.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - Update to Prettier v3 for formatting when running `react-router reveal --no-typescript` ([#14049](https://github.com/remix-run/react-router/pull/14049))
7
8
  - Updated dependencies:
8
- - `react-router@7.7.0-pre.2`
9
- - `@react-router/node@7.7.0-pre.2`
10
- - `@react-router/serve@7.7.0-pre.2`
9
+ - `react-router@7.7.1-pre.0`
10
+ - `@react-router/node@7.7.1-pre.0`
11
+ - `@react-router/serve@7.7.1-pre.0`
11
12
 
12
- ## 7.7.0-pre.1
13
-
14
- ### Patch Changes
15
-
16
- - Updated dependencies:
17
- - `react-router@7.7.0-pre.1`
18
- - `@react-router/node@7.7.0-pre.1`
19
- - `@react-router/serve@7.7.0-pre.1`
20
-
21
- ## 7.7.0-pre.0
13
+ ## 7.7.0
22
14
 
23
15
  ### Patch Changes
24
16
 
@@ -30,9 +22,9 @@
30
22
  - Improve chunk error logging when a chunk cannot be found during the build ([#13799](https://github.com/remix-run/react-router/pull/13799))
31
23
  - Fix incorrectly configured `externalConditions` which had enabled `module` condition for externals and broke builds with certain packages, like Emotion. ([#13871](https://github.com/remix-run/react-router/pull/13871))
32
24
  - Updated dependencies:
33
- - `react-router@7.7.0-pre.0`
34
- - `@react-router/node@7.7.0-pre.0`
35
- - `@react-router/serve@7.7.0-pre.0`
25
+ - `react-router@7.7.0`
26
+ - `@react-router/node@7.7.0`
27
+ - `@react-router/serve@7.7.0`
36
28
 
37
29
  ## 7.6.3
38
30
 
@@ -229,7 +221,6 @@
229
221
  ### Minor Changes
230
222
 
231
223
  - Added a new `react-router.config.ts` `routeDiscovery` option to configure Lazy Route Discovery behavior. ([#13451](https://github.com/remix-run/react-router/pull/13451))
232
-
233
224
  - By default, Lazy Route Discovery is enabled and makes manifest requests to the `/__manifest` path:
234
225
  - `routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" }`
235
226
  - You can modify the manifest path used:
@@ -428,7 +419,6 @@
428
419
  ### Minor Changes
429
420
 
430
421
  - Generate a "SPA fallback" HTML file for scenarios where applications are prerendering the `/` route with `ssr:false` ([#12948](https://github.com/remix-run/react-router/pull/12948))
431
-
432
422
  - If you specify `ssr:false` without a `prerender` config, this is considered "SPA Mode" and the generated `index.html` file will only render down to the root route and will be able to hydrate for any valid application path
433
423
  - If you specify `ssr:false` with a `prerender` config but _do not_ include the `/` path (i.e., `prerender: ['/blog/post']`), then we still generate a "SPA Mode" `index.html` file that can hydrate for any path in the application
434
424
  - However, previously if you specified `ssr:false` and included the `/` path in your `prerender` config, we would prerender the `/` route into `index.html` as a non-SPA page
@@ -438,7 +428,6 @@
438
428
  - `npx sirv-cli build/client --single __spa-fallback.html`
439
429
 
440
430
  - Allow a `loader` in the root route in SPA mode because it can be called/server-rendered at build time ([#12948](https://github.com/remix-run/react-router/pull/12948))
441
-
442
431
  - `Route.HydrateFallbackProps` now also receives `loaderData`
443
432
  - This will be defined so long as the `HydrateFallback` is rendering while _children_ routes are loading
444
433
  - This will be `undefined` if the `HydrateFallback` is rendering because the route has it's own hydrating `clientLoader`
@@ -483,7 +472,6 @@
483
472
  - Skip action-only resource routes when using `prerender:true` ([#13004](https://github.com/remix-run/react-router/pull/13004))
484
473
 
485
474
  - Enhance invalid export detection when using `ssr:false` ([#12948](https://github.com/remix-run/react-router/pull/12948))
486
-
487
475
  - `headers`/`action` are prohibited in all routes with `ssr:false` because there will be no runtime server on which to run them
488
476
  - `loader` functions are more nuanced and depend on whether a given route is prerendered
489
477
  - When using `ssr:false` without a `prerender` config, only the `root` route can have a `loader`
@@ -500,7 +488,6 @@
500
488
  - Add `future.unstable_viteEnvironmentApi` flag to enable experimental Vite Environment API support ([#12936](https://github.com/remix-run/react-router/pull/12936))
501
489
 
502
490
  - Disable Lazy Route Discovery for all `ssr:false` apps and not just "SPA Mode" because there is no runtime server to serve the search-param-configured `__manifest` requests ([#12894](https://github.com/remix-run/react-router/pull/12894))
503
-
504
491
  - We previously only disabled this for "SPA Mode" which is `ssr:false` and no `prerender` config but we realized it should apply to all `ssr:false` apps, including those prerendering multiple pages
505
492
  - In those `prerender` scenarios we would prerender the `/__manifest` file assuming the static file server would serve it but that makes some unneccesary assumptions about the static file server behaviors
506
493
 
@@ -573,7 +560,6 @@
573
560
  - Properly initialize `NODE_ENV` if not already set for compatibility with React 19 ([#12578](https://github.com/remix-run/react-router/pull/12578))
574
561
 
575
562
  - Remove the leftover/unused `abortDelay` prop from `ServerRouter` and update the default `entry.server.tsx` to use the new `streamTimeout` value for Single Fetch ([#12478](https://github.com/remix-run/react-router/pull/12478))
576
-
577
563
  - The `abortDelay` functionality was removed in v7 as it was coupled to the `defer` implementation from Remix v2, but this removal of this prop was missed
578
564
  - If you were still using this prop in your `entry.server` file, it's likely your app is not aborting streams as you would expect and you will need to adopt the new [`streamTimeout`](https://reactrouter.com/explanation/special-files#streamtimeout) value introduced with Single Fetch
579
565
 
@@ -652,14 +638,13 @@
652
638
  await writeFile(
653
639
  "build/manifest.json",
654
640
  JSON.stringify(buildManifest, null, 2),
655
- "utf-8"
641
+ "utf-8",
656
642
  );
657
643
  },
658
644
  } satisfies Config;
659
645
  ```
660
646
 
661
647
  - 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))
662
-
663
648
  - Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute`
664
649
  - The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest`
665
650
  - `Record<string, Route> -> Record<string, Route | undefined>`
@@ -667,7 +652,6 @@
667
652
  - Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from
668
653
 
669
654
  - Update default `isbot` version to v5 and drop support for `isbot@3` ([#11770](https://github.com/remix-run/react-router/pull/11770))
670
-
671
655
  - If you have `isbot@4` or `isbot@5` in your `package.json`:
672
656
  - You do not need to make any changes
673
657
  - If you have `isbot@3` in your `package.json` and you have your own `entry.server.tsx` file in your repo
@@ -677,7 +661,6 @@
677
661
  - You are using the internal default entry provided by React Router v7 and you will need to upgrade to `isbot@5` in your `package.json`
678
662
 
679
663
  - Drop support for Node 18, update minimum Node vestion to 20 ([#12171](https://github.com/remix-run/react-router/pull/12171))
680
-
681
664
  - Remove `installGlobals()` as this should no longer be necessary
682
665
 
683
666
  - For Remix consumers migrating to React Router, Vite manifests (i.e. `.vite/manifest.json`) are now written within each build subdirectory, e.g. `build/client/.vite/manifest.json` and `build/server/.vite/manifest.json` instead of `build/.vite/client-manifest.json` and `build/.vite/server-manifest.json`. This means that the build output is now much closer to what you'd expect from a typical Vite project. ([#11573](https://github.com/remix-run/react-router/pull/11573))
@@ -715,7 +698,6 @@
715
698
  ```
716
699
 
717
700
  This initial implementation targets type inference for:
718
-
719
701
  - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
720
702
  - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
721
703
  - `ActionData` : Action data from `action` and/or `clientAction` within your route module
@@ -730,7 +712,6 @@
730
712
  ```
731
713
 
732
714
  Check out our docs for more:
733
-
734
715
  - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
735
716
  - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
736
717
 
@@ -753,7 +734,6 @@
753
734
  ### Minor Changes
754
735
 
755
736
  - New `future.unstable_singleFetch` flag ([#8773](https://github.com/remix-run/remix/pull/8773))
756
-
757
737
  - Naked objects returned from loaders/actions are no longer automatically converted to JSON responses. They'll be streamed as-is via `turbo-stream` so `Date`'s will become `Date` through `useLoaderData()`
758
738
  - You can return naked objects with `Promise`'s without needing to use `defer()` - including nested `Promise`'s
759
739
  - If you need to return a custom status code or custom response headers, you can still use the `defer` utility
@@ -900,11 +880,9 @@
900
880
  - Always ignore route files starting with `.` ([#8801](https://github.com/remix-run/remix/pull/8801))
901
881
 
902
882
  - Vite: Enable use of [`vite preview`](https://main.vitejs.dev/guide/static-deploy.html#deploying-a-static-site) to preview Remix SPA applications ([#8624](https://github.com/remix-run/remix/pull/8624))
903
-
904
883
  - In the SPA template, `npm run start` has been renamed to `npm run preview` which uses `vite preview` instead of a standalone HTTP server such as `http-server` or `serv-cli`
905
884
 
906
885
  - Vite: Remove the ability to pass `publicPath` as an option to the Remix vite plugin ([#8145](https://github.com/remix-run/remix/pull/8145))
907
-
908
886
  - ⚠️ **This is a breaking change for projects using the unstable Vite plugin with a `publicPath`**
909
887
  - This is already handled in Vite via the [`base`](https://vitejs.dev/guide/build.html#public-base-path) config so we now set the Remix `publicPath` from the Vite `base` config
910
888
 
@@ -933,7 +911,6 @@
933
911
  - Vite: Provide `Unstable_ServerBundlesFunction` and `Unstable_VitePluginConfig` types ([#8654](https://github.com/remix-run/remix/pull/8654))
934
912
 
935
913
  - Vite: add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613))
936
-
937
914
  - `--sourcemapClient`
938
915
 
939
916
  - `--sourcemapClient=inline`
@@ -1160,7 +1137,7 @@
1160
1137
  remix({
1161
1138
  unstable_serverBundles: ({ branch }) => {
1162
1139
  const isAuthenticatedRoute = branch.some(
1163
- (route) => route.id === "routes/_authenticated"
1140
+ (route) => route.id === "routes/_authenticated",
1164
1141
  );
1165
1142
 
1166
1143
  return isAuthenticatedRoute ? "authenticated" : "unauthenticated";
@@ -1173,7 +1150,6 @@
1173
1150
  ### Patch Changes
1174
1151
 
1175
1152
  - Fix issue with `isbot` v4 released on 1/1/2024 ([#8415](https://github.com/remix-run/remix/pull/8415))
1176
-
1177
1153
  - `remix dev` will now add `"isbot": "^4"` to `package.json` instead of using `latest`
1178
1154
  - Update built-in `entry.server` files to work with both `isbot@3` and `isbot@4` for backwards-compatibility with Remix apps that have pinned `isbot` to v3
1179
1155
  - Templates are updated to use `isbot@4` moving forward via `create-remix`
@@ -1195,7 +1171,6 @@
1195
1171
  ### Patch Changes
1196
1172
 
1197
1173
  - Vite: Error messages when `.server` files are referenced by client ([#8267](https://github.com/remix-run/remix/pull/8267))
1198
-
1199
1174
  - Previously, referencing a `.server` module from client code resulted in an error message like:
1200
1175
  - `The requested module '/app/models/answer.server.ts' does not provide an export named 'isDateType'`
1201
1176
  - This was confusing because `answer.server.ts` _does_ provide the `isDateType` export, but Remix was replacing `.server` modules with empty modules (`export {}`) for the client build
@@ -1272,7 +1247,6 @@
1272
1247
  - Add support for `clientLoader`/`clientAction`/`HydrateFallback` route exports ([RFC](https://github.com/remix-run/remix/discussions/7634)) ([#8173](https://github.com/remix-run/remix/pull/8173))
1273
1248
 
1274
1249
  Remix now supports loaders/actions that run on the client (in addition to, or instead of the loader/action that runs on the server). While we still recommend server loaders/actions for the majority of your data needs in a Remix app - these provide some levers you can pull for more advanced use-cases such as:
1275
-
1276
1250
  - Leveraging a data source local to the browser (i.e., `localStorage`)
1277
1251
  - Managing a client-side cache of server data (like `IndexedDB`)
1278
1252
  - Bypassing the Remix server in a BFF setup and hitting your API directly from the browser
@@ -1381,7 +1355,6 @@
1381
1355
  - Add `@remix-run/node` to Vite's `optimizeDeps.include` array ([#8177](https://github.com/remix-run/remix/pull/8177))
1382
1356
 
1383
1357
  - Improve Vite plugin performance ([#8121](https://github.com/remix-run/remix/pull/8121))
1384
-
1385
1358
  - Parallelize detection of route module exports
1386
1359
  - Disable `server.preTransformRequests` in Vite child compiler since it's only used to process route modules
1387
1360
 
@@ -1551,7 +1524,6 @@
1551
1524
  - Additionally, all runtimes (including non-Node runtimes) can use `build.mode` to determine if HMR should be performed
1552
1525
  - Support `bun` package manager ([#7074](https://github.com/remix-run/remix/pull/7074))
1553
1526
  - The `serverNodeBuiltinsPolyfill` option (along with the newly added `browserNodeBuiltinsPolyfill`) now supports defining global polyfills in addition to module polyfills ([#7269](https://github.com/remix-run/remix/pull/7269))
1554
-
1555
1527
  - For example, to polyfill Node's `Buffer` global:
1556
1528
 
1557
1529
  ```js
@@ -1574,7 +1546,6 @@
1574
1546
  - Fix importing of PNGs, SVGs, and other assets from packages in `node_modules` ([#6813](https://github.com/remix-run/remix/pull/6813), [#7182](https://github.com/remix-run/remix/pull/7182))
1575
1547
 
1576
1548
  - Decouple the `@remix-run/dev` package from the contents of the `@remix-run/css-bundle` package. ([#6982](https://github.com/remix-run/remix/pull/6982))
1577
-
1578
1549
  - The contents of the `@remix-run/css-bundle` package are now entirely managed by the Remix compiler
1579
1550
  - Even though it's still recommended that your Remix dependencies all share the same version, this change ensures that there are no runtime errors when upgrading `@remix-run/dev` without upgrading `@remix-run/css-bundle`
1580
1551
 
@@ -1583,7 +1554,6 @@
1583
1554
  - Stop `remix dev` when `esbuild` is not running ([#7158](https://github.com/remix-run/remix/pull/7158))
1584
1555
 
1585
1556
  - Do not interpret JSX in `.ts` files ([#7306](https://github.com/remix-run/remix/pull/7306))
1586
-
1587
1557
  - While JSX is supported in `.js` files for compatibility with existing apps and libraries,
1588
1558
  `.ts` files should not contain JSX. By not interpreting `.ts` files as JSX, `.ts` files
1589
1559
  can contain single-argument type generics without needing a comma to disambiguate from JSX:
@@ -1617,7 +1587,6 @@
1617
1587
  - Kill app server when remix dev terminates ([#7280](https://github.com/remix-run/remix/pull/7280))
1618
1588
 
1619
1589
  - Support dependencies that import polyfill packages for Node built-ins via a trailing slash (e.g. importing the `buffer` package with `var Buffer = require('buffer/').Buffer` as recommended in their README) ([#7198](https://github.com/remix-run/remix/pull/7198))
1620
-
1621
1590
  - These imports were previously marked as external
1622
1591
  - This meant that they were left as dynamic imports in the client bundle and would throw a runtime error in the browser (e.g. `Dynamic require of "buffer/" is not supported`)
1623
1592
 
@@ -1626,14 +1595,12 @@
1626
1595
  - Restart dev server when Remix config changes ([#7269](https://github.com/remix-run/remix/pull/7269))
1627
1596
 
1628
1597
  - Remove outdated ESM import warnings ([#6916](https://github.com/remix-run/remix/pull/6916))
1629
-
1630
1598
  - Most of the time these warnings were false positives.
1631
1599
  - Instead, we now rely on built-in Node warnings for ESM imports.
1632
1600
 
1633
1601
  - Do not trigger rebuilds when `.DS_Store` changes ([#7172](https://github.com/remix-run/remix/pull/7172))
1634
1602
 
1635
1603
  - Remove warnings for stabilized flags: ([#6905](https://github.com/remix-run/remix/pull/6905))
1636
-
1637
1604
  - `unstable_cssSideEffectImports`
1638
1605
  - `unstable_cssModules`
1639
1606
  - `unstable_vanillaExtract`
@@ -1683,7 +1650,6 @@
1683
1650
  - Output esbuild metafiles for bundle analysis ([#6772](https://github.com/remix-run/remix/pull/6772))
1684
1651
 
1685
1652
  Written to server build directory (`build/` by default):
1686
-
1687
1653
  - `metafile.css.json`
1688
1654
  - `metafile.js.json` (browser JS)
1689
1655
  - `metafile.server.json` (server JS)
@@ -1781,7 +1747,6 @@
1781
1747
  - built-in tls support ([#6483](https://github.com/remix-run/remix/pull/6483))
1782
1748
 
1783
1749
  New options:
1784
-
1785
1750
  - `--tls-key` / `tlsKey`: TLS key
1786
1751
  - `--tls-cert` / `tlsCert`: TLS Certificate
1787
1752
 
@@ -1852,7 +1817,7 @@
1852
1817
  key: fs.readFileSync("key.pem"),
1853
1818
  cert: fs.readFileSync("cert.pem"),
1854
1819
  },
1855
- app
1820
+ app,
1856
1821
  );
1857
1822
 
1858
1823
  appServer.listen(3000, () => {
@@ -1915,7 +1880,6 @@
1915
1880
  - restore color for app server output ([#6485](https://github.com/remix-run/remix/pull/6485))
1916
1881
 
1917
1882
  - Fix route ranking bug with pathless layout route next to a sibling index route ([#4421](https://github.com/remix-run/remix/pull/4421))
1918
-
1919
1883
  - Under the hood this is done by removing the trailing slash from all generated `path` values since the number of slash-delimited segments counts towards route ranking so the trailing slash incorrectly increases the score for routes
1920
1884
 
1921
1885
  - Support sibling pathless layout routes by removing pathless layout routes from the unique route path checks in conventional route generation since they inherently trigger duplicate paths ([#4421](https://github.com/remix-run/remix/pull/4421))
@@ -2053,7 +2017,6 @@
2053
2017
  ```
2054
2018
 
2055
2019
  The dev server will:
2056
-
2057
2020
  - force `NODE_ENV=development` and warn you if it was previously set to something else
2058
2021
  - rebuild your app whenever your Remix app code changes
2059
2022
  - restart your app server whenever rebuilds succeed
@@ -2183,7 +2146,6 @@
2183
2146
  - Added deprecation warning for `v2_normalizeFormMethod` ([#5863](https://github.com/remix-run/remix/pull/5863))
2184
2147
 
2185
2148
  - Added a new `future.v2_normalizeFormMethod` flag to normalize the exposed `useNavigation().formMethod` as an uppercase HTTP method to align with the previous `useTransition` behavior as well as the `fetch()` behavior of normalizing to uppercase HTTP methods. ([#5815](https://github.com/remix-run/remix/pull/5815))
2186
-
2187
2149
  - When `future.v2_normalizeFormMethod === false`,
2188
2150
  - `useNavigation().formMethod` is lowercase
2189
2151
  - `useFetcher().formMethod` is uppercase
@@ -2258,7 +2220,6 @@
2258
2220
  ### Patch Changes
2259
2221
 
2260
2222
  - Fixes flat route inconsistencies where `route.{ext}` wasn't always being treated like `index.{ext}` when used in a folder ([#5459](https://github.com/remix-run/remix/pull/5459))
2261
-
2262
2223
  - Route conflict no longer throw errors and instead display a helpful warning that we're using the first one we found.
2263
2224
 
2264
2225
  ```log
package/dist/cli/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * @react-router/dev v7.7.0-pre.2
3
+ * @react-router/dev v7.7.1-pre.0
4
4
  *
5
5
  * Copyright (c) Remix Software Inc.
6
6
  *
@@ -2066,7 +2066,7 @@ var babel = __toESM(require("@babel/core"));
2066
2066
  var import_plugin_syntax_jsx = __toESM(require("@babel/plugin-syntax-jsx"));
2067
2067
  var import_preset_typescript = __toESM(require("@babel/preset-typescript"));
2068
2068
  var import_prettier = __toESM(require("prettier"));
2069
- function transpile(tsx, options = {}) {
2069
+ async function transpile(tsx, options = {}) {
2070
2070
  let mjs = babel.transformSync(tsx, {
2071
2071
  compact: false,
2072
2072
  cwd: options.cwd,
@@ -2076,7 +2076,7 @@ function transpile(tsx, options = {}) {
2076
2076
  retainLines: true
2077
2077
  });
2078
2078
  if (!mjs || !mjs.code) throw new Error("Could not parse TypeScript");
2079
- return import_prettier.default.format(mjs.code, { parser: "babel" });
2079
+ return await import_prettier.default.format(mjs.code, { parser: "babel" });
2080
2080
  }
2081
2081
 
2082
2082
  // cli/commands.ts
@@ -2174,7 +2174,7 @@ async function generateEntry(entry, rootDirectory, flags = {}) {
2174
2174
  let outputEntry = `${entry}.${outputExtension}`;
2175
2175
  let outputFile = path7.resolve(appDirectory, outputEntry);
2176
2176
  if (!useTypeScript) {
2177
- let javascript = transpile(contents, {
2177
+ let javascript = await transpile(contents, {
2178
2178
  cwd: rootDirectory,
2179
2179
  filename: isServerEntry ? defaultEntryServer : defaultEntryClient
2180
2180
  });
@@ -7,6 +7,6 @@ startTransition(() => {
7
7
  document,
8
8
  <StrictMode>
9
9
  <HydratedRouter />
10
- </StrictMode>
10
+ </StrictMode>,
11
11
  );
12
12
  });
@@ -14,7 +14,7 @@ export default function handleRequest(
14
14
  responseStatusCode: number,
15
15
  responseHeaders: Headers,
16
16
  routerContext: EntryContext,
17
- loadContext: AppLoadContext
17
+ loadContext: AppLoadContext,
18
18
  // If you have middleware enabled:
19
19
  // loadContext: unstable_RouterContextProvider
20
20
  ) {
@@ -43,7 +43,7 @@ export default function handleRequest(
43
43
  new Response(stream, {
44
44
  headers: responseHeaders,
45
45
  status: responseStatusCode,
46
- })
46
+ }),
47
47
  );
48
48
 
49
49
  pipe(body);
@@ -60,7 +60,7 @@ export default function handleRequest(
60
60
  console.error(error);
61
61
  }
62
62
  },
63
- }
63
+ },
64
64
  );
65
65
 
66
66
  // Abort the rendering stream after the `streamTimeout` so it has time to
package/dist/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.7.0-pre.2
2
+ * @react-router/dev v7.7.1-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/routes.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.7.0-pre.2
2
+ * @react-router/dev v7.7.1-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -20,7 +20,7 @@ const enqueueUpdate = debounce(async () => {
20
20
  let imported = window.__reactRouterRouteModuleUpdates.get(route.id);
21
21
  if (!imported) {
22
22
  throw Error(
23
- `[react-router:hmr] No module update found for route ${route.id}`
23
+ `[react-router:hmr] No module update found for route ${route.id}`,
24
24
  );
25
25
  }
26
26
  let routeModule = {
@@ -28,16 +28,16 @@ const enqueueUpdate = debounce(async () => {
28
28
  // react-refresh takes care of updating these in-place,
29
29
  // if we don't preserve existing values we'll loose state.
30
30
  default: imported.default
31
- ? window.__reactRouterRouteModules[route.id]?.default ??
32
- imported.default
31
+ ? (window.__reactRouterRouteModules[route.id]?.default ??
32
+ imported.default)
33
33
  : imported.default,
34
34
  ErrorBoundary: imported.ErrorBoundary
35
- ? window.__reactRouterRouteModules[route.id]?.ErrorBoundary ??
36
- imported.ErrorBoundary
35
+ ? (window.__reactRouterRouteModules[route.id]?.ErrorBoundary ??
36
+ imported.ErrorBoundary)
37
37
  : imported.ErrorBoundary,
38
38
  HydrateFallback: imported.HydrateFallback
39
- ? window.__reactRouterRouteModules[route.id]?.HydrateFallback ??
40
- imported.HydrateFallback
39
+ ? (window.__reactRouterRouteModules[route.id]?.HydrateFallback ??
40
+ imported.HydrateFallback)
41
41
  : imported.HydrateFallback,
42
42
  };
43
43
  window.__reactRouterRouteModules[route.id] = routeModule;
@@ -49,9 +49,9 @@ const enqueueUpdate = debounce(async () => {
49
49
  (route) =>
50
50
  route.hasLoader ||
51
51
  route.hasClientLoader ||
52
- route.hasClientMiddleware
52
+ route.hasClientMiddleware,
53
53
  )
54
- .map((route) => route.id)
54
+ .map((route) => route.id),
55
55
  );
56
56
 
57
57
  let routes = __reactRouterDataRouter.createRoutesForHMR(
@@ -59,7 +59,7 @@ const enqueueUpdate = debounce(async () => {
59
59
  manifest.routes,
60
60
  window.__reactRouterRouteModules,
61
61
  window.__reactRouterContext.ssr,
62
- window.__reactRouterContext.isSpaMode
62
+ window.__reactRouterContext.isSpaMode,
63
63
  );
64
64
  __reactRouterDataRouter._internalSetRoutes(routes);
65
65
  routeUpdates.clear();
@@ -99,12 +99,12 @@ function validateRefreshBoundaryAndEnqueueUpdate(
99
99
  prevExports,
100
100
  nextExports,
101
101
  // non-component exports that are handled by the framework (e.g. `meta` and `links` for route modules)
102
- acceptExports = []
102
+ acceptExports = [],
103
103
  ) {
104
104
  if (
105
105
  !predicateOnExport(
106
106
  prevExports,
107
- (key) => key in nextExports || acceptExports.includes(key)
107
+ (key) => key in nextExports || acceptExports.includes(key),
108
108
  )
109
109
  ) {
110
110
  return "Could not Fast Refresh (export removed)";
@@ -112,7 +112,7 @@ function validateRefreshBoundaryAndEnqueueUpdate(
112
112
  if (
113
113
  !predicateOnExport(
114
114
  nextExports,
115
- (key) => key in prevExports || acceptExports.includes(key)
115
+ (key) => key in prevExports || acceptExports.includes(key),
116
116
  )
117
117
  ) {
118
118
  return "Could not Fast Refresh (new export)";
@@ -129,7 +129,7 @@ function validateRefreshBoundaryAndEnqueueUpdate(
129
129
  if (exports.isLikelyComponentType(value)) return true;
130
130
  // Unchanged exports are implicitly handled
131
131
  return prevExports[key] === nextExports[key];
132
- }
132
+ },
133
133
  );
134
134
  if (hasExports && allExportsAreHandledOrUnchanged) {
135
135
  enqueueUpdate();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.7.0-pre.2
2
+ * @react-router/dev v7.7.1-pre.0
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.7.0-pre.2
2
+ * @react-router/dev v7.7.1-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -3819,7 +3819,7 @@ var reactRouterVitePlugin = () => {
3819
3819
  return [
3820
3820
  "const exports = {}",
3821
3821
  await (0, import_promises2.readFile)(reactRefreshRuntimePath, "utf8"),
3822
- await (0, import_promises2.readFile)(require.resolve("./static/refresh-utils.cjs"), "utf8"),
3822
+ await (0, import_promises2.readFile)(require.resolve("./static/refresh-utils.mjs"), "utf8"),
3823
3823
  "export default exports"
3824
3824
  ].join("\n");
3825
3825
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-router/dev",
3
- "version": "7.7.0-pre.2",
3
+ "version": "7.7.1-pre.0",
4
4
  "description": "Dev tools and CLI for React Router",
5
5
  "homepage": "https://reactrouter.com",
6
6
  "bugs": {
@@ -79,14 +79,14 @@
79
79
  "lodash": "^4.17.21",
80
80
  "pathe": "^1.1.2",
81
81
  "picocolors": "^1.1.1",
82
- "prettier": "^2.7.1",
82
+ "prettier": "^3.6.2",
83
83
  "react-refresh": "^0.14.0",
84
84
  "semver": "^7.3.7",
85
85
  "set-cookie-parser": "^2.6.0",
86
86
  "tinyglobby": "^0.2.14",
87
87
  "valibot": "^0.41.0",
88
88
  "vite-node": "^3.2.2",
89
- "@react-router/node": "7.7.0-pre.2"
89
+ "@react-router/node": "7.7.1-pre.0"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@types/babel__core": "^7.20.5",
@@ -98,7 +98,6 @@
98
98
  "@types/lodash": "^4.14.182",
99
99
  "@types/node": "^20.0.0",
100
100
  "@types/npmcli__package-json": "^4.0.0",
101
- "@types/prettier": "^2.7.3",
102
101
  "@types/set-cookie-parser": "^2.4.1",
103
102
  "@types/semver": "^7.7.0",
104
103
  "esbuild-register": "^3.6.0",
@@ -110,15 +109,15 @@
110
109
  "vite": "^6.1.0",
111
110
  "wireit": "0.14.9",
112
111
  "wrangler": "^4.23.0",
113
- "@react-router/serve": "7.7.0-pre.2",
114
- "react-router": "^7.7.0-pre.2"
112
+ "@react-router/serve": "7.7.1-pre.0",
113
+ "react-router": "^7.7.1-pre.0"
115
114
  },
116
115
  "peerDependencies": {
117
116
  "typescript": "^5.1.0",
118
117
  "vite": "^5.1.0 || ^6.0.0 || ^7.0.0",
119
118
  "wrangler": "^3.28.2 || ^4.0.0",
120
- "@react-router/serve": "^7.7.0-pre.2",
121
- "react-router": "^7.7.0-pre.2"
119
+ "@react-router/serve": "^7.7.1-pre.0",
120
+ "react-router": "^7.7.1-pre.0"
122
121
  },
123
122
  "peerDependenciesMeta": {
124
123
  "@react-router/serve": {