Unverified Commit 5a8398e3 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Remove unstable_ prefix from unstable_blocking (#18276)

This removes the `unstable_` prefix to prepare for stabilizing the feature
parent 31a011d6
......@@ -594,7 +594,7 @@ export default async function build(
ssgPageRoutes = workerResult.prerenderRoutes
}
if (workerResult.prerenderFallback === 'unstable_blocking') {
if (workerResult.prerenderFallback === 'blocking') {
ssgBlockingFallbackPages.add(page)
} else if (workerResult.prerenderFallback === true) {
ssgStaticFallbackPages.add(page)
......
......@@ -575,7 +575,7 @@ export async function buildStaticPaths(
if (
!(
typeof staticPathsResult.fallback === 'boolean' ||
staticPathsResult.fallback === 'unstable_blocking'
staticPathsResult.fallback === 'blocking'
)
) {
throw new Error(
......@@ -700,7 +700,7 @@ export async function isPageStatic(
hasServerProps?: boolean
hasStaticProps?: boolean
prerenderRoutes?: string[] | undefined
prerenderFallback?: boolean | 'unstable_blocking' | undefined
prerenderFallback?: boolean | 'blocking' | undefined
}> {
try {
require('../next-server/lib/runtime-config').setConfig(runtimeEnvConfig)
......@@ -775,7 +775,7 @@ export async function isPageStatic(
}
let prerenderRoutes: Array<string> | undefined
let prerenderFallback: boolean | 'unstable_blocking' | undefined
let prerenderFallback: boolean | 'blocking' | undefined
if (hasStaticProps && hasStaticPaths) {
;({
paths: prerenderRoutes,
......
......@@ -556,7 +556,7 @@ export default class DevServer extends Server {
return {
staticPaths,
fallbackMode:
fallback === 'unstable_blocking'
fallback === 'blocking'
? 'blocking'
: fallback === true
? 'static'
......
......@@ -111,7 +111,7 @@ export type GetStaticPathsContext = {
export type GetStaticPathsResult<P extends ParsedUrlQuery = ParsedUrlQuery> = {
paths: Array<string | { params: P; locale?: string }>
fallback: boolean | 'unstable_blocking'
fallback: boolean | 'blocking'
}
export type GetStaticPaths<P extends ParsedUrlQuery = ParsedUrlQuery> = (
......
......@@ -5,7 +5,7 @@ import { useRouter } from 'next/router'
export async function getStaticPaths() {
return {
paths: [],
fallback: 'unstable_blocking',
fallback: 'blocking',
}
}
......
......@@ -5,7 +5,7 @@ import { useRouter } from 'next/router'
export async function getStaticPaths() {
return {
paths: [{ params: { slug: 'a' } }, { params: { slug: 'b' } }],
fallback: 'unstable_blocking',
fallback: 'blocking',
}
}
......
......@@ -5,7 +5,7 @@ import { useRouter } from 'next/router'
export async function getStaticPaths() {
return {
paths: [],
fallback: 'unstable_blocking',
fallback: 'blocking',
}
}
......
......@@ -7,7 +7,7 @@ export async function getStaticProps() {
}
export async function getStaticPaths() {
return { paths: [], fallback: 'unstable_blocking' }
return { paths: [], fallback: 'blocking' }
}
const Page = ({ time }) => {
......
......@@ -2101,7 +2101,7 @@ describe('SSG Prerender', () => {
await fs.writeFile(
pagePath,
fallbackBlockingPageContents[page].replace(
"fallback: 'unstable_blocking'",
"fallback: 'blocking'",
'fallback: false'
)
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment