Skip to content

Commit b98372e

Browse files
authored
Merge branch 'canary' into feat/update-fauna-fql-10
2 parents d4b2d0b + 28767ad commit b98372e

File tree

24 files changed

+65
-51
lines changed

24 files changed

+65
-51
lines changed

docs/02-app/02-api-reference/04-functions/redirect.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: API Reference for the redirect function.
55

66
The `redirect` function allows you to redirect the user to another URL. `redirect` can be used in Server Components, Client Components, [Route Handlers](/docs/app/building-your-application/routing/route-handlers), and [Server Actions](/docs/app/building-your-application/data-fetching/forms-and-mutations).
77

8-
When used in a streaming context, this will insert a meta tag to emit the redirect on the client side. Otherwise, it will serve a 307 HTTP redirect response to the caller.
8+
When used in a [streaming context](/docs/app/building-your-application/routing/loading-ui-and-streaming#what-is-streaming), this will insert a meta tag to emit the redirect on the client side. Otherwise, it will serve a 307 HTTP redirect response to the caller.
99

1010
If a resource doesn't exist, you can use the [`notFound` function](/docs/app/api-reference/functions/not-found) instead.
1111

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
"registry": "https://registry.npmjs.org/"
1717
}
1818
},
19-
"version": "13.5.5-canary.0"
19+
"version": "13.5.5-canary.1"
2020
}

packages/create-next-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-next-app",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"keywords": [
55
"react",
66
"next",

packages/eslint-config-next/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-next",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"description": "ESLint configuration used by Next.js.",
55
"main": "index.js",
66
"license": "MIT",
@@ -10,7 +10,7 @@
1010
},
1111
"homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config",
1212
"dependencies": {
13-
"@next/eslint-plugin-next": "13.5.5-canary.0",
13+
"@next/eslint-plugin-next": "13.5.5-canary.1",
1414
"@rushstack/eslint-patch": "^1.3.3",
1515
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
1616
"eslint-import-resolver-node": "^0.3.6",

packages/eslint-plugin-next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/eslint-plugin-next",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"description": "ESLint plugin for Next.js.",
55
"main": "dist/index.js",
66
"license": "MIT",

packages/font/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/font",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"repository": {
55
"url": "vercel/next.js",
66
"directory": "packages/font"

packages/next-bundle-analyzer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/bundle-analyzer",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"main": "index.js",
55
"types": "index.d.ts",
66
"license": "MIT",

packages/next-codemod/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/codemod",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"license": "MIT",
55
"repository": {
66
"type": "git",

packages/next-env/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/env",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"keywords": [
55
"react",
66
"next",

packages/next-mdx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/mdx",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"main": "index.js",
55
"license": "MIT",
66
"repository": {

packages/next-plugin-storybook/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/plugin-storybook",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"repository": {
55
"url": "vercel/next.js",
66
"directory": "packages/next-plugin-storybook"

packages/next-polyfill-module/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/polyfill-module",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
55
"main": "dist/polyfill-module.js",
66
"license": "MIT",

packages/next-polyfill-nomodule/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/polyfill-nomodule",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"description": "A polyfill for non-dead, nomodule browsers.",
55
"main": "dist/polyfill-nomodule.js",
66
"license": "MIT",

packages/next-swc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/swc",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"private": true,
55
"scripts": {
66
"clean": "node ../../scripts/rm.mjs native",

packages/next/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "next",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"description": "The React Framework",
55
"main": "./dist/server/next.js",
66
"license": "MIT",
@@ -90,7 +90,7 @@
9090
]
9191
},
9292
"dependencies": {
93-
"@next/env": "13.5.5-canary.0",
93+
"@next/env": "13.5.5-canary.1",
9494
"@swc/helpers": "0.5.2",
9595
"busboy": "1.6.0",
9696
"caniuse-lite": "^1.0.30001406",
@@ -144,11 +144,11 @@
144144
"@mswjs/interceptors": "0.23.0",
145145
"@napi-rs/cli": "2.16.2",
146146
"@napi-rs/triples": "1.1.0",
147-
"@next/polyfill-module": "13.5.5-canary.0",
148-
"@next/polyfill-nomodule": "13.5.5-canary.0",
149-
"@next/react-dev-overlay": "13.5.5-canary.0",
150-
"@next/react-refresh-utils": "13.5.5-canary.0",
151-
"@next/swc": "13.5.5-canary.0",
147+
"@next/polyfill-module": "13.5.5-canary.1",
148+
"@next/polyfill-nomodule": "13.5.5-canary.1",
149+
"@next/react-dev-overlay": "13.5.5-canary.1",
150+
"@next/react-refresh-utils": "13.5.5-canary.1",
151+
"@next/swc": "13.5.5-canary.1",
152152
"@opentelemetry/api": "1.4.1",
153153
"@playwright/test": "^1.35.1",
154154
"@segment/ajv-human-errors": "2.1.2",

packages/next/src/build/webpack/loaders/next-edge-function-loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const nextEdgeFunctionLoader: webpack.LoaderDefinitionFunction<EdgeFunctionLoade
4747
throw new Error('The Edge Function "pages${page}" must export a \`default\` function');
4848
}
4949
50-
export default function (opts) {
50+
export default function nHandler (opts) {
5151
return adapter({
5252
...opts,
5353
IncrementalCache,

packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ const edgeSSRLoader: webpack.LoaderDefinitionFunction<EdgeSSRLoaderQuery> =
225225
}
226226
const nextFontManifest = maybeJSONParse(self.__NEXT_FONT_MANIFEST)
227227
228-
globalThis.__next_private_global_wait_until__ = []
229-
230228
const render = getRender({
231229
pagesType,
232230
dev: ${dev},
@@ -257,22 +255,12 @@ const edgeSSRLoader: webpack.LoaderDefinitionFunction<EdgeSSRLoaderQuery> =
257255
258256
export const ComponentMod = pageMod
259257
260-
export default async function(opts, event) {
261-
const res = await adapter({
258+
export default function nHandler (opts, event) {
259+
return adapter({
262260
...opts,
263261
IncrementalCache,
264262
handler: render
265263
})
266-
267-
if (event && event.waitUntil) {
268-
event.waitUntil(
269-
Promise.all(
270-
[res?.waitUntil, ...globalThis.__next_private_global_wait_until__]
271-
)
272-
)
273-
}
274-
275-
return res
276264
}`
277265

278266
return transformed

packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { BuildManifest } from '../../../../server/get-page-files'
55
import type { ReactLoadableManifest } from '../../../../server/load-components'
66
import type { ClientReferenceManifest } from '../../plugins/flight-manifest-plugin'
77
import type { NextFontManifest } from '../../plugins/next-font-manifest-plugin'
8+
import type { NextFetchEvent } from '../../../../server/web/spec-extension/fetch-event'
89

910
import WebServer from '../../../../server/web-server'
1011
import {
@@ -16,6 +17,15 @@ import { PrerenderManifest } from '../../..'
1617
import { normalizeAppPath } from '../../../../shared/lib/router/utils/app-paths'
1718
import { SizeLimit } from '../../../../../types'
1819

20+
const NEXT_PRIVATE_GLOBAL_WAIT_UNTIL = Symbol.for(
21+
'__next_private_global_wait_until__'
22+
)
23+
24+
// @ts-ignore
25+
globalThis[NEXT_PRIVATE_GLOBAL_WAIT_UNTIL] =
26+
// @ts-ignore
27+
globalThis[NEXT_PRIVATE_GLOBAL_WAIT_UNTIL] || []
28+
1929
export function getRender({
2030
dev,
2131
page,
@@ -143,13 +153,20 @@ export function getRender({
143153

144154
const handler = server.getRequestHandler()
145155

146-
return async function render(request: Request) {
156+
return async function render(request: Request, event: NextFetchEvent) {
147157
const extendedReq = new WebNextRequest(request)
148158
const extendedRes = new WebNextResponse()
149159

150160
handler(extendedReq, extendedRes)
151161
const result = await extendedRes.toResponse()
152162

163+
if (event && event.waitUntil) {
164+
event.waitUntil(
165+
// @ts-ignore
166+
Promise.all([...globalThis[NEXT_PRIVATE_GLOBAL_WAIT_UNTIL]])
167+
)
168+
}
169+
153170
// fetchMetrics is attached to the web request that going through the server,
154171
// wait for the handler result is ready and attach it back to the original request.
155172
;(request as any).fetchMetrics = extendedReq.fetchMetrics

packages/next/src/build/webpack/loaders/next-middleware-loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default function middlewareLoader(this: any) {
6767
throw new Error('The Middleware "pages${page}" must export a \`middleware\` or a \`default\` function');
6868
}
6969
70-
export default function (opts) {
70+
export default function nHandler(opts) {
7171
return adapter({
7272
...opts,
7373
page: ${JSON.stringify(page)},

packages/react-dev-overlay/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/react-dev-overlay",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"description": "A development-only overlay for developing React applications.",
55
"repository": {
66
"url": "vercel/next.js",

packages/react-refresh-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/react-refresh-utils",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"description": "An experimental package providing utilities for React Refresh.",
55
"repository": {
66
"url": "vercel/next.js",

packages/third-parties/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/third-parties",
3-
"version": "13.5.5-canary.0",
3+
"version": "13.5.5-canary.1",
44
"private": true,
55
"repository": {
66
"url": "vercel/next.js",
@@ -23,7 +23,7 @@
2323
"third-party-capital": "1.0.20"
2424
},
2525
"devDependencies": {
26-
"next": "13.5.5-canary.0",
26+
"next": "13.5.5-canary.1",
2727
"outdent": "0.8.0",
2828
"prettier": "2.5.1"
2929
},

pnpm-lock.yaml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/e2e/app-dir/app/index.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ createNextDescribe(
1515
},
1616
({ next, isNextDev: isDev, isNextStart, isNextDeploy }) => {
1717
if (isNextStart && !process.env.NEXT_EXPERIMENTAL_COMPILE) {
18+
it('should not have loader generated function for edge runtime', async () => {
19+
expect(
20+
await next.readFile('.next/server/app/dashboard/page.js')
21+
).not.toContain('_stringifiedConfig')
22+
expect(await next.readFile('.next/server/middleware.js')).not.toContain(
23+
'_middlewareConfig'
24+
)
25+
})
26+
1827
it('should use RSC prefetch data from build', async () => {
1928
expect(
2029
await next.readFile('.next/server/app/linking.prefetch.rsc')

0 commit comments

Comments
 (0)