-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix lint errors, remove unused jsonify implementation #12154
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -998,13 +998,6 @@ export function createRouter(init: RouterInit): Router { | |
// we don't need to update UI state if they change | ||
let blockerFunctions = new Map<string, BlockerFunction>(); | ||
|
||
// Map of pending patchRoutesOnNavigation() promises (keyed by path/matches) so | ||
// that we only kick them off once for a given combo | ||
let pendingPatchRoutes = new Map< | ||
string, | ||
ReturnType<AgnosticPatchRoutesOnNavigationFunction> | ||
>(); | ||
|
||
// Flag to ignore the next history update, so we can revert the URL change on | ||
// a POP navigation that was blocked by the user without touching router state | ||
let unblockBlockerHistoryUpdate: (() => void) | undefined = undefined; | ||
|
@@ -2750,7 +2743,7 @@ export function createRouter(init: RouterInit): Router { | |
} | ||
|
||
for (let [routeId, result] of Object.entries(results)) { | ||
if (isRedirectDataStrategyResultResult(result)) { | ||
if (isRedirectDataStrategyResult(result)) { | ||
let response = result.result as Response; | ||
dataResults[routeId] = { | ||
type: ResultType.redirect, | ||
|
@@ -2779,8 +2772,6 @@ export function createRouter(init: RouterInit): Router { | |
fetchersToLoad: RevalidatingFetcher[], | ||
request: Request | ||
) { | ||
let currentMatches = state.matches; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unused |
||
|
||
// Kick off loaders and fetchers in parallel | ||
let loaderResultsPromise = callDataStrategy( | ||
"loader", | ||
|
@@ -3861,7 +3852,7 @@ export function createStaticHandler( | |
return; | ||
} | ||
let result = results[match.route.id]; | ||
if (isRedirectDataStrategyResultResult(result)) { | ||
if (isRedirectDataStrategyResult(result)) { | ||
let response = result.result as Response; | ||
// Throw redirects and let the server handle them with an HTTP redirect | ||
throw normalizeRelativeRoutingRedirectResponse( | ||
|
@@ -5349,10 +5340,6 @@ function isHashChangeOnly(a: Location, b: Location): boolean { | |
return false; | ||
} | ||
|
||
function isPromise<T = unknown>(val: unknown): val is Promise<T> { | ||
return typeof val === "object" && val != null && "then" in val; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unused |
||
|
||
function isDataStrategyResult(result: unknown): result is DataStrategyResult { | ||
return ( | ||
result != null && | ||
|
@@ -5363,7 +5350,7 @@ function isDataStrategyResult(result: unknown): result is DataStrategyResult { | |
); | ||
} | ||
|
||
function isRedirectDataStrategyResultResult(result: DataStrategyResult) { | ||
function isRedirectDataStrategyResult(result: DataStrategyResult) { | ||
return ( | ||
isResponse(result.result) && redirectStatusCodes.has(result.result.status) | ||
); | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import type { DataWithResponseInit } from "./router/utils"; | ||
import type { AppLoadContext } from "./server-runtime/data"; | ||
import type { Jsonify } from "./server-runtime/jsonify"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unused |
||
import type { Serializable } from "./server-runtime/single-fetch"; | ||
|
||
export type Expect<T extends true> = T; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
export default { | ||
const config = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; | ||
|
||
export default config; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused