Unverified Commit f3d51838 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Remove experimental note for has routes (#24529)

This removes the warnings/notes for the `has` custom-routes feature being experimental

## Documentation / Examples

- [x] Make sure the linting passes
parent 5de5e49b
...@@ -173,8 +173,6 @@ module.exports = { ...@@ -173,8 +173,6 @@ module.exports = {
## Header, Cookie, and Query Matching ## Header, Cookie, and Query Matching
Note: this feature is still experimental and not covered by semver and is to be used at your own risk until it is made stable.
To only apply a header when either header, cookie, or query values also match the `has` field can be used. Both the `source` and all `has` items must match for the header to be applied. To only apply a header when either header, cookie, or query values also match the `has` field can be used. Both the `source` and all `has` items must match for the header to be applied.
`has` items have the following fields: `has` items have the following fields:
......
...@@ -117,8 +117,6 @@ module.exports = { ...@@ -117,8 +117,6 @@ module.exports = {
## Header, Cookie, and Query Matching ## Header, Cookie, and Query Matching
Note: this feature is still experimental and not covered by semver and is to be used at your own risk until it is made stable.
To only match a redirect when header, cookie, or query values also match the `has` field can be used. Both the `source` and all `has` items must match for the redirect to be applied. To only match a redirect when header, cookie, or query values also match the `has` field can be used. Both the `source` and all `has` items must match for the redirect to be applied.
`has` items have the following fields: `has` items have the following fields:
......
...@@ -197,8 +197,6 @@ module.exports = { ...@@ -197,8 +197,6 @@ module.exports = {
## Header, Cookie, and Query Matching ## Header, Cookie, and Query Matching
Note: this feature is still experimental and not covered by semver and is to be used at your own risk until it is made stable.
To only match a rewrite when header, cookie, or query values also match the `has` field can be used. Both the `source` and all `has` items must match for the rewrite to be applied. To only match a rewrite when header, cookie, or query values also match the `has` field can be used. Both the `source` and all `has` items must match for the rewrite to be applied.
`has` items have the following fields: `has` items have the following fields:
......
...@@ -6,8 +6,6 @@ import { ...@@ -6,8 +6,6 @@ import {
PERMANENT_REDIRECT_STATUS, PERMANENT_REDIRECT_STATUS,
TEMPORARY_REDIRECT_STATUS, TEMPORARY_REDIRECT_STATUS,
} from '../next-server/lib/constants' } from '../next-server/lib/constants'
import { execOnce } from '../next-server/lib/utils'
import * as Log from '../build/output/log'
// @ts-ignore // @ts-ignore
import Lexer from 'next/dist/compiled/regexr-lexer/lexer' import Lexer from 'next/dist/compiled/regexr-lexer/lexer'
// @ts-ignore // @ts-ignore
...@@ -163,12 +161,6 @@ function tryParsePath(route: string, handleUrl?: boolean): ParseAttemptResult { ...@@ -163,12 +161,6 @@ function tryParsePath(route: string, handleUrl?: boolean): ParseAttemptResult {
export type RouteType = 'rewrite' | 'redirect' | 'header' export type RouteType = 'rewrite' | 'redirect' | 'header'
const experimentalHasWarn = execOnce(() => {
Log.warn(
`'has' route field support is still experimental and not covered by semver, use at your own risk.`
)
})
function checkCustomRoutes( function checkCustomRoutes(
routes: Redirect[] | Header[] | Rewrite[], routes: Redirect[] | Header[] | Rewrite[],
type: RouteType type: RouteType
...@@ -245,7 +237,6 @@ function checkCustomRoutes( ...@@ -245,7 +237,6 @@ function checkCustomRoutes(
invalidParts.push('`has` must be undefined or valid has object') invalidParts.push('`has` must be undefined or valid has object')
hadInvalidHas = true hadInvalidHas = true
} else if (route.has) { } else if (route.has) {
experimentalHasWarn()
const invalidHasItems = [] const invalidHasItems = []
for (const hasItem of route.has) { for (const hasItem of route.has) {
......
...@@ -1783,8 +1783,8 @@ describe('Custom routes', () => { ...@@ -1783,8 +1783,8 @@ describe('Custom routes', () => {
) )
}) })
it('should show warning for experimental has usage', async () => { it('should not show warning for experimental has usage', async () => {
expect(stderr).toContain( expect(stderr).not.toContain(
"'has' route field support is still experimental and not covered by semver, use at your own risk." "'has' route field support is still experimental and not covered by semver, use at your own risk."
) )
}) })
......
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