Skip to content

Commit

Permalink
Allow future flag warning supression with explicit false setting
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Dec 20, 2024
1 parent 267ee2a commit fc65daf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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

0 comments on commit fc65daf

Please sign in to comment.