Skip to content

Commit 6640b0e

Browse files
authored
Merge branch 'canary' into mischnic/turbo-react-rm-props
2 parents fd2e96e + 4e13da5 commit 6640b0e

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

packages/next/src/client/components/router-reducer/create-initial-router-state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function createInitialRouterState({
102102
createPrefetchCacheEntryForInitialLoad({
103103
url,
104104
kind: PrefetchKind.AUTO,
105-
data: [initialFlightData, undefined, false, couldBeIntercepted],
105+
data: [initialFlightData, undefined, couldBeIntercepted],
106106
tree: initialState.tree,
107107
prefetchCache: initialState.prefetchCache,
108108
nextUrl: initialState.nextUrl,

packages/next/src/client/components/router-reducer/fetch-server-response.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {
2323
NEXT_URL,
2424
RSC_HEADER,
2525
RSC_CONTENT_TYPE_HEADER,
26-
NEXT_DID_POSTPONE_HEADER,
2726
NEXT_HMR_REFRESH_HEADER,
2827
} from '../app-router-headers'
2928
import { callServer } from '../../app-call-server'
@@ -41,7 +40,6 @@ export interface FetchServerResponseOptions {
4140
export type FetchServerResponseResult = [
4241
flightData: FlightData,
4342
canonicalUrlOverride: URL | undefined,
44-
postponed?: boolean,
4543
intercepted?: boolean,
4644
]
4745

@@ -63,7 +61,7 @@ function urlToUrlWithoutFlightMarker(url: string): URL {
6361
}
6462

6563
function doMpaNavigation(url: string): FetchServerResponseResult {
66-
return [urlToUrlWithoutFlightMarker(url).toString(), undefined, false, false]
64+
return [urlToUrlWithoutFlightMarker(url).toString(), undefined, false]
6765
}
6866

6967
/**
@@ -159,7 +157,6 @@ export async function fetchServerResponse(
159157
const canonicalUrl = res.redirected ? responseUrl : undefined
160158

161159
const contentType = res.headers.get('content-type') || ''
162-
const postponed = !!res.headers.get(NEXT_DID_POSTPONE_HEADER)
163160
const interception = !!res.headers.get('vary')?.includes(NEXT_URL)
164161
let isFlightResponse = contentType === RSC_CONTENT_TYPE_HEADER
165162

@@ -194,7 +191,7 @@ export async function fetchServerResponse(
194191
return doMpaNavigation(res.url)
195192
}
196193

197-
return [response.f, canonicalUrl, postponed, interception]
194+
return [response.f, canonicalUrl, interception]
198195
} catch (err) {
199196
console.error(
200197
`Failed to fetch RSC payload for ${url}. Falling back to browser navigation.`,
@@ -203,6 +200,6 @@ export async function fetchServerResponse(
203200
// If fetch fails handle it like a mpa navigation
204201
// TODO-APP: Add a test for the case where a CORS request fails, e.g. external url redirect coming from the response.
205202
// See https://github.com/vercel/next.js/issues/43605#issuecomment-1451617521 for a reproduction.
206-
return [url.toString(), undefined, false, false]
203+
return [url.toString(), undefined, false]
207204
}
208205
}

packages/next/src/client/components/router-reducer/prefetch-cache-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export function createPrefetchCacheEntryForInitialLoad({
152152
kind: PrefetchKind
153153
data: FetchServerResponseResult
154154
}) {
155-
const [, , , intercept] = data
155+
const [, , intercept] = data
156156
// if the prefetch corresponds with an interception route, we use the nextUrl to prefix the cache key
157157
const prefetchCacheKey = intercept
158158
? createPrefetchCacheKey(url, nextUrl)
@@ -204,7 +204,7 @@ function createLazyPrefetchEntry({
204204
// TODO: `fetchServerResponse` should be more tighly coupled to these prefetch cache operations
205205
// to avoid drift between this cache key prefixing logic
206206
// (which is currently directly influenced by the server response)
207-
const [, , , intercepted] = prefetchResponse
207+
const [, , intercepted] = prefetchResponse
208208
if (intercepted) {
209209
prefixExistingPrefetchCacheEntry({ url, nextUrl, prefetchCache })
210210
}

packages/next/src/client/components/router-reducer/reducers/navigate-reducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ function navigateReducer_PPR(
324324
prefetchQueue.bump(data)
325325

326326
return data.then(
327-
([flightData, canonicalUrlOverride, _postponed]) => {
327+
([flightData, canonicalUrlOverride]) => {
328328
let isFirstRead = false
329329
// we only want to mark this once
330330
if (!prefetchValues.lastUsedTime) {

0 commit comments

Comments
 (0)