@react-router/dev 7.15.1 → 7.16.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,5 +1,24 @@
1
1
  # `@react-router/dev`
2
2
 
3
+ ## v7.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Stabilize `future.unstable_trailingSlashAwareDataRequests` as `future.v8_trailingSlashAwareDataRequests` ([#15098](https://github.com/remix-run/react-router/pull/15098))
8
+
9
+ - The unstable flag is no longer supported and will error during config resolution
10
+
11
+ - Log future flag warnings for upcoming React Router v8 flags ([#15029](https://github.com/remix-run/react-router/pull/15029))
12
+
13
+ - `v8_middleware`, `v8_splitRouteModules`, `v8_viteEnvironmentApi`, `v8_passThroughRequests`, `v8_trailingSlashAwareDataRequests`
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies:
18
+ - [`react-router@7.16.0`](https://github.com/remix-run/react-router/releases/tag/react-router@7.16.0)
19
+ - [`@react-router/node@7.16.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@7.16.0)
20
+ - [`@react-router/serve@7.16.0`](https://github.com/remix-run/react-router/releases/tag/@react-router/serve@7.16.0)
21
+
3
22
  ## v7.15.1
4
23
 
5
24
  ### Patch Changes
@@ -11,6 +30,7 @@
11
30
  strip the base prefix from server-build virtual module import paths, causing
12
31
  "Failed to load url /root.tsx" errors. The fix uses `/@fs/` absolute paths
13
32
  for those imports to bypass Vite's base-stripping logic.
33
+
14
34
  - Updated dependencies:
15
35
  - [`react-router@7.15.1`](https://github.com/remix-run/react-router/releases/tag/react-router@7.15.1)
16
36
  - [`@react-router/node@7.15.1`](https://github.com/remix-run/react-router/releases/tag/@react-router/node@7.15.1)
package/dist/cli/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * @react-router/dev v7.15.1
3
+ * @react-router/dev v7.16.0
4
4
  *
5
5
  * Copyright (c) Remix Software Inc.
6
6
  *
@@ -514,6 +514,11 @@ async function resolveConfig({
514
514
  "The `future.unstable_passThroughRequests` flag has been stabilized as `future.v8_passThroughRequests`"
515
515
  );
516
516
  }
517
+ if ("unstable_trailingSlashAwareDataRequests" in futureConfig) {
518
+ return err(
519
+ "The `future.unstable_trailingSlashAwareDataRequests` flag has been stabilized as `future.v8_trailingSlashAwareDataRequests`"
520
+ );
521
+ }
517
522
  if ("unstable_subResourceIntegrity" in futureConfig) {
518
523
  return err(
519
524
  "The `future.unstable_subResourceIntegrity` flag has been stabilized and moved to a top-level `config.subResourceIntegrity` field"
@@ -523,7 +528,7 @@ async function resolveConfig({
523
528
  let future = {
524
529
  unstable_optimizeDeps: userAndPresetConfigs.future?.unstable_optimizeDeps ?? false,
525
530
  v8_passThroughRequests: userAndPresetConfigs.future?.v8_passThroughRequests ?? false,
526
- unstable_trailingSlashAwareDataRequests: userAndPresetConfigs.future?.unstable_trailingSlashAwareDataRequests ?? false,
531
+ v8_trailingSlashAwareDataRequests: userAndPresetConfigs.future?.v8_trailingSlashAwareDataRequests ?? false,
527
532
  unstable_previewServerPrerendering: userAndPresetConfigs.future?.unstable_previewServerPrerendering ?? false,
528
533
  v8_middleware: userAndPresetConfigs.future?.v8_middleware ?? false,
529
534
  v8_splitRouteModules: userAndPresetConfigs.future?.v8_splitRouteModules ?? false,
@@ -551,8 +556,50 @@ async function resolveConfig({
551
556
  for (let preset of reactRouterUserConfig.presets ?? []) {
552
557
  await preset.reactRouterConfigResolved?.({ reactRouterConfig });
553
558
  }
559
+ logFutureFlagWarnings(userAndPresetConfigs.future || {});
554
560
  return ok(reactRouterConfig);
555
561
  }
562
+ function logFutureFlagWarning(flag, message) {
563
+ console.log(
564
+ import_picocolors.default.yellow(
565
+ ` \u26A0\uFE0F Future Flag Warning: ${message}
566
+ You can use the \`future.${flag}\` flag to opt in early.
567
+ -> https://reactrouter.com/upgrading/future-flags#${flag}`
568
+ )
569
+ );
570
+ }
571
+ function logFutureFlagWarnings(future) {
572
+ if (future.v8_middleware === void 0) {
573
+ logFutureFlagWarning(
574
+ "v8_middleware",
575
+ "Route middleware support is changing in React Router v8."
576
+ );
577
+ }
578
+ if (future.v8_splitRouteModules === void 0) {
579
+ logFutureFlagWarning(
580
+ "v8_splitRouteModules",
581
+ "Route module splitting behavior is changing in React Router v8."
582
+ );
583
+ }
584
+ if (future.v8_viteEnvironmentApi === void 0) {
585
+ logFutureFlagWarning(
586
+ "v8_viteEnvironmentApi",
587
+ "Vite Environment API usage is changing in React Router v8."
588
+ );
589
+ }
590
+ if (future.v8_passThroughRequests === void 0) {
591
+ logFutureFlagWarning(
592
+ "v8_passThroughRequests",
593
+ "Request handling behavior is changing in React Router v8."
594
+ );
595
+ }
596
+ if (future.v8_trailingSlashAwareDataRequests === void 0) {
597
+ logFutureFlagWarning(
598
+ "v8_trailingSlashAwareDataRequests",
599
+ "Data request URL formats are changing in React Router v8."
600
+ );
601
+ }
602
+ }
556
603
  async function createConfigLoader({
557
604
  rootDirectory: root,
558
605
  watch: watch2,
package/dist/config.d.ts CHANGED
@@ -39,7 +39,7 @@ type ServerModuleFormat = "esm" | "cjs";
39
39
  interface FutureConfig {
40
40
  unstable_optimizeDeps: boolean;
41
41
  v8_passThroughRequests: boolean;
42
- unstable_trailingSlashAwareDataRequests: boolean;
42
+ v8_trailingSlashAwareDataRequests: boolean;
43
43
  /**
44
44
  * Prerender with Vite Preview server
45
45
  */
package/dist/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.15.1
2
+ * @react-router/dev v7.16.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.15.1
2
+ * @react-router/dev v7.16.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.15.1
2
+ * @react-router/dev v7.16.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -540,6 +540,11 @@ async function resolveConfig({
540
540
  "The `future.unstable_passThroughRequests` flag has been stabilized as `future.v8_passThroughRequests`"
541
541
  );
542
542
  }
543
+ if ("unstable_trailingSlashAwareDataRequests" in futureConfig) {
544
+ return err(
545
+ "The `future.unstable_trailingSlashAwareDataRequests` flag has been stabilized as `future.v8_trailingSlashAwareDataRequests`"
546
+ );
547
+ }
543
548
  if ("unstable_subResourceIntegrity" in futureConfig) {
544
549
  return err(
545
550
  "The `future.unstable_subResourceIntegrity` flag has been stabilized and moved to a top-level `config.subResourceIntegrity` field"
@@ -549,7 +554,7 @@ async function resolveConfig({
549
554
  let future = {
550
555
  unstable_optimizeDeps: userAndPresetConfigs.future?.unstable_optimizeDeps ?? false,
551
556
  v8_passThroughRequests: userAndPresetConfigs.future?.v8_passThroughRequests ?? false,
552
- unstable_trailingSlashAwareDataRequests: userAndPresetConfigs.future?.unstable_trailingSlashAwareDataRequests ?? false,
557
+ v8_trailingSlashAwareDataRequests: userAndPresetConfigs.future?.v8_trailingSlashAwareDataRequests ?? false,
553
558
  unstable_previewServerPrerendering: userAndPresetConfigs.future?.unstable_previewServerPrerendering ?? false,
554
559
  v8_middleware: userAndPresetConfigs.future?.v8_middleware ?? false,
555
560
  v8_splitRouteModules: userAndPresetConfigs.future?.v8_splitRouteModules ?? false,
@@ -577,8 +582,50 @@ async function resolveConfig({
577
582
  for (let preset of reactRouterUserConfig.presets ?? []) {
578
583
  await preset.reactRouterConfigResolved?.({ reactRouterConfig });
579
584
  }
585
+ logFutureFlagWarnings(userAndPresetConfigs.future || {});
580
586
  return ok(reactRouterConfig);
581
587
  }
588
+ function logFutureFlagWarning(flag, message) {
589
+ console.log(
590
+ import_picocolors.default.yellow(
591
+ ` \u26A0\uFE0F Future Flag Warning: ${message}
592
+ You can use the \`future.${flag}\` flag to opt in early.
593
+ -> https://reactrouter.com/upgrading/future-flags#${flag}`
594
+ )
595
+ );
596
+ }
597
+ function logFutureFlagWarnings(future) {
598
+ if (future.v8_middleware === void 0) {
599
+ logFutureFlagWarning(
600
+ "v8_middleware",
601
+ "Route middleware support is changing in React Router v8."
602
+ );
603
+ }
604
+ if (future.v8_splitRouteModules === void 0) {
605
+ logFutureFlagWarning(
606
+ "v8_splitRouteModules",
607
+ "Route module splitting behavior is changing in React Router v8."
608
+ );
609
+ }
610
+ if (future.v8_viteEnvironmentApi === void 0) {
611
+ logFutureFlagWarning(
612
+ "v8_viteEnvironmentApi",
613
+ "Vite Environment API usage is changing in React Router v8."
614
+ );
615
+ }
616
+ if (future.v8_passThroughRequests === void 0) {
617
+ logFutureFlagWarning(
618
+ "v8_passThroughRequests",
619
+ "Request handling behavior is changing in React Router v8."
620
+ );
621
+ }
622
+ if (future.v8_trailingSlashAwareDataRequests === void 0) {
623
+ logFutureFlagWarning(
624
+ "v8_trailingSlashAwareDataRequests",
625
+ "Data request URL formats are changing in React Router v8."
626
+ );
627
+ }
628
+ }
582
629
  async function createConfigLoader({
583
630
  rootDirectory: root,
584
631
  watch,
package/dist/vite.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.15.1
2
+ * @react-router/dev v7.16.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -577,6 +577,11 @@ async function resolveConfig({
577
577
  "The `future.unstable_passThroughRequests` flag has been stabilized as `future.v8_passThroughRequests`"
578
578
  );
579
579
  }
580
+ if ("unstable_trailingSlashAwareDataRequests" in futureConfig) {
581
+ return err(
582
+ "The `future.unstable_trailingSlashAwareDataRequests` flag has been stabilized as `future.v8_trailingSlashAwareDataRequests`"
583
+ );
584
+ }
580
585
  if ("unstable_subResourceIntegrity" in futureConfig) {
581
586
  return err(
582
587
  "The `future.unstable_subResourceIntegrity` flag has been stabilized and moved to a top-level `config.subResourceIntegrity` field"
@@ -586,7 +591,7 @@ async function resolveConfig({
586
591
  let future = {
587
592
  unstable_optimizeDeps: userAndPresetConfigs.future?.unstable_optimizeDeps ?? false,
588
593
  v8_passThroughRequests: userAndPresetConfigs.future?.v8_passThroughRequests ?? false,
589
- unstable_trailingSlashAwareDataRequests: userAndPresetConfigs.future?.unstable_trailingSlashAwareDataRequests ?? false,
594
+ v8_trailingSlashAwareDataRequests: userAndPresetConfigs.future?.v8_trailingSlashAwareDataRequests ?? false,
590
595
  unstable_previewServerPrerendering: userAndPresetConfigs.future?.unstable_previewServerPrerendering ?? false,
591
596
  v8_middleware: userAndPresetConfigs.future?.v8_middleware ?? false,
592
597
  v8_splitRouteModules: userAndPresetConfigs.future?.v8_splitRouteModules ?? false,
@@ -614,8 +619,50 @@ async function resolveConfig({
614
619
  for (let preset of reactRouterUserConfig.presets ?? []) {
615
620
  await preset.reactRouterConfigResolved?.({ reactRouterConfig });
616
621
  }
622
+ logFutureFlagWarnings(userAndPresetConfigs.future || {});
617
623
  return ok(reactRouterConfig);
618
624
  }
625
+ function logFutureFlagWarning(flag, message) {
626
+ console.log(
627
+ import_picocolors.default.yellow(
628
+ ` \u26A0\uFE0F Future Flag Warning: ${message}
629
+ You can use the \`future.${flag}\` flag to opt in early.
630
+ -> https://reactrouter.com/upgrading/future-flags#${flag}`
631
+ )
632
+ );
633
+ }
634
+ function logFutureFlagWarnings(future) {
635
+ if (future.v8_middleware === void 0) {
636
+ logFutureFlagWarning(
637
+ "v8_middleware",
638
+ "Route middleware support is changing in React Router v8."
639
+ );
640
+ }
641
+ if (future.v8_splitRouteModules === void 0) {
642
+ logFutureFlagWarning(
643
+ "v8_splitRouteModules",
644
+ "Route module splitting behavior is changing in React Router v8."
645
+ );
646
+ }
647
+ if (future.v8_viteEnvironmentApi === void 0) {
648
+ logFutureFlagWarning(
649
+ "v8_viteEnvironmentApi",
650
+ "Vite Environment API usage is changing in React Router v8."
651
+ );
652
+ }
653
+ if (future.v8_passThroughRequests === void 0) {
654
+ logFutureFlagWarning(
655
+ "v8_passThroughRequests",
656
+ "Request handling behavior is changing in React Router v8."
657
+ );
658
+ }
659
+ if (future.v8_trailingSlashAwareDataRequests === void 0) {
660
+ logFutureFlagWarning(
661
+ "v8_trailingSlashAwareDataRequests",
662
+ "Data request URL formats are changing in React Router v8."
663
+ );
664
+ }
665
+ }
619
666
  async function createConfigLoader({
620
667
  rootDirectory: root,
621
668
  watch: watch2,
@@ -4986,7 +5033,7 @@ function getStaticPrerenderPaths(routes) {
4986
5033
  }
4987
5034
  async function prerenderData(handler, prerenderPath, onlyRoutes, clientBuildDirectory, reactRouterConfig, viteConfig, requestInit) {
4988
5035
  let dataRequestPath;
4989
- if (reactRouterConfig.future.unstable_trailingSlashAwareDataRequests) {
5036
+ if (reactRouterConfig.future.v8_trailingSlashAwareDataRequests) {
4990
5037
  if (prerenderPath.endsWith("/")) {
4991
5038
  dataRequestPath = `${prerenderPath}_.data`;
4992
5039
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-router/dev",
3
- "version": "7.15.1",
3
+ "version": "7.16.0",
4
4
  "description": "Dev tools and CLI for React Router",
5
5
  "homepage": "https://reactrouter.com",
6
6
  "bugs": {
@@ -92,7 +92,7 @@
92
92
  "tinyglobby": "^0.2.14",
93
93
  "valibot": "^1.2.0",
94
94
  "vite-node": "^3.2.2",
95
- "@react-router/node": "7.15.1"
95
+ "@react-router/node": "7.16.0"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@types/babel__core": "^7.20.5",
@@ -116,8 +116,8 @@
116
116
  "vite": "^6.3.0",
117
117
  "wireit": "0.14.9",
118
118
  "wrangler": "^4.23.0",
119
- "@react-router/serve": "7.15.1",
120
- "react-router": "^7.15.1"
119
+ "react-router": "^7.16.0",
120
+ "@react-router/serve": "7.16.0"
121
121
  },
122
122
  "peerDependencies": {
123
123
  "@vitejs/plugin-rsc": "~0.5.21",
@@ -125,8 +125,8 @@
125
125
  "typescript": "^5.1.0 || ^6.0.0",
126
126
  "vite": "^5.1.0 || ^6.0.0 || ^7.0.0 || ^8.0.0",
127
127
  "wrangler": "^3.28.2 || ^4.0.0",
128
- "@react-router/serve": "^7.15.1",
129
- "react-router": "^7.15.1"
128
+ "@react-router/serve": "^7.16.0",
129
+ "react-router": "^7.16.0"
130
130
  },
131
131
  "peerDependenciesMeta": {
132
132
  "@vitejs/plugin-rsc": {