Skip to content

Commit

Permalink
Allow future flag warning supression with explicit false setting (#10358
Browse files Browse the repository at this point in the history
)
  • Loading branch information
brophdawg11 authored Dec 20, 2024
1 parent 7f401df commit 16cd6d6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .changeset/curly-comics-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Allow supression of future flag warnings by setting them to `false`
10 changes: 5 additions & 5 deletions packages/remix-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -882,37 +882,37 @@ function logFutureFlagWarning(args: { flag: string; message: string }) {
}

export function logFutureFlagWarnings(future: FutureConfig) {
if (!future.v3_fetcherPersist) {
if (future.v3_fetcherPersist === undefined) {
logFutureFlagWarning({
flag: "v3_fetcherPersist",
message: "Fetcher persistence behavior is changing in React Router v7",
});
}

if (!future.v3_lazyRouteDiscovery) {
if (future.v3_lazyRouteDiscovery === undefined) {
logFutureFlagWarning({
flag: "v3_lazyRouteDiscovery",
message:
"Route discovery/manifest behavior is changing in React Router v7",
});
}

if (!future.v3_relativeSplatPath) {
if (future.v3_relativeSplatPath === undefined) {
logFutureFlagWarning({
flag: "v3_relativeSplatPath",
message:
"Relative routing behavior for splat routes is changing in React Router v7",
});
}

if (!future.v3_singleFetch) {
if (future.v3_singleFetch === undefined) {
logFutureFlagWarning({
flag: "v3_singleFetch",
message: "Data fetching is changing to a single fetch in React Router v7",
});
}

if (!future.v3_throwAbortReason) {
if (future.v3_throwAbortReason === undefined) {
logFutureFlagWarning({
flag: "v3_throwAbortReason",
message:
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"dependencies": {
"@remix-run/router": "1.21.0",
"@remix-run/server-runtime": "workspace:*",
"react-router": "6.28.1-pre.0",
"react-router-dom": "6.28.1-pre.0",
"react-router": "6.28.1",
"react-router-dom": "6.28.1",
"turbo-stream": "2.4.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@remix-run/node": "workspace:*",
"@remix-run/react": "workspace:*",
"@remix-run/router": "1.21.0",
"react-router-dom": "6.28.1-pre.0"
"react-router-dom": "6.28.1"
},
"devDependencies": {
"@remix-run/server-runtime": "workspace:*",
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 16cd6d6

Please sign in to comment.