From 08fdc1ebcf3132ea9a697cd6d492eacc4f2dbb75 Mon Sep 17 00:00:00 2001 From: Dima Voytenko Date: Fri, 27 Oct 2023 14:10:15 -0700 Subject: [PATCH 01/30] OpenTelemetry: propagate a configured context(s) to root requests (#57084) Implement OTEL propagation according to the OpenTelemetry API per https://opentelemetry.io/docs/specs/otel/context/api-propagators/. Any configured propagator should work with this API, including `W3CTraceContextPropagator` (https://www.w3.org/TR/trace-context/). Alternative to the https://github.com/vercel/next.js/pull/56891. /cc @sfirrin --- packages/next/src/server/base-server.ts | 86 +-- packages/next/src/server/lib/trace/tracer.ts | 18 +- test/e2e/opentelemetry/opentelemetry.test.ts | 645 ++++++++++-------- .../pages/pages/[param]/getStaticProps2.tsx | 17 + 4 files changed, 449 insertions(+), 317 deletions(-) create mode 100644 test/e2e/opentelemetry/pages/pages/[param]/getStaticProps2.tsx diff --git a/packages/next/src/server/base-server.ts b/packages/next/src/server/base-server.ts index 90baeac091fcc..5613268d505d3 100644 --- a/packages/next/src/server/base-server.ts +++ b/packages/next/src/server/base-server.ts @@ -755,50 +755,54 @@ export default abstract class Server { ): Promise { await this.prepare() const method = req.method.toUpperCase() - return getTracer().trace( - BaseServerSpan.handleRequest, - { - spanName: `${method} ${req.url}`, - kind: SpanKind.SERVER, - attributes: { - 'http.method': method, - 'http.target': req.url, - }, - }, - async (span) => - this.handleRequestImpl(req, res, parsedUrl).finally(() => { - if (!span) return - span.setAttributes({ - 'http.status_code': res.statusCode, - }) - const rootSpanAttributes = getTracer().getRootSpanAttributes() - // We were unable to get attributes, probably OTEL is not enabled - if (!rootSpanAttributes) return - - if ( - rootSpanAttributes.get('next.span_type') !== - BaseServerSpan.handleRequest - ) { - console.warn( - `Unexpected root span type '${rootSpanAttributes.get( - 'next.span_type' - )}'. Please report this Next.js issue https://github.com/vercel/next.js` - ) - return - } - const route = rootSpanAttributes.get('next.route') - if (route) { - const newName = `${method} ${route}` + const tracer = getTracer() + return tracer.withPropagatedContext(req, () => { + return tracer.trace( + BaseServerSpan.handleRequest, + { + spanName: `${method} ${req.url}`, + kind: SpanKind.SERVER, + attributes: { + 'http.method': method, + 'http.target': req.url, + }, + }, + async (span) => + this.handleRequestImpl(req, res, parsedUrl).finally(() => { + if (!span) return span.setAttributes({ - 'next.route': route, - 'http.route': route, - 'next.span_name': newName, + 'http.status_code': res.statusCode, }) - span.updateName(newName) - } - }) - ) + const rootSpanAttributes = tracer.getRootSpanAttributes() + // We were unable to get attributes, probably OTEL is not enabled + if (!rootSpanAttributes) return + + if ( + rootSpanAttributes.get('next.span_type') !== + BaseServerSpan.handleRequest + ) { + console.warn( + `Unexpected root span type '${rootSpanAttributes.get( + 'next.span_type' + )}'. Please report this Next.js issue https://github.com/vercel/next.js` + ) + return + } + + const route = rootSpanAttributes.get('next.route') + if (route) { + const newName = `${method} ${route}` + span.setAttributes({ + 'next.route': route, + 'http.route': route, + 'next.span_name': newName, + }) + span.updateName(newName) + } + }) + ) + }) } private async handleRequestImpl( diff --git a/packages/next/src/server/lib/trace/tracer.ts b/packages/next/src/server/lib/trace/tracer.ts index 2183a2eff6c3e..5307aa93ecdbc 100644 --- a/packages/next/src/server/lib/trace/tracer.ts +++ b/packages/next/src/server/lib/trace/tracer.ts @@ -1,3 +1,4 @@ +import type { BaseNextRequest } from '../../base-http' import type { SpanTypes } from './constants' import { NextVanillaSpanAllowlist } from './constants' @@ -28,7 +29,8 @@ if (process.env.NEXT_RUNTIME === 'edge') { } } -const { context, trace, SpanStatusCode, SpanKind } = api +const { context, propagation, trace, SpanStatusCode, SpanKind, ROOT_CONTEXT } = + api const isPromise = (p: any): p is Promise => { return p !== null && typeof p === 'object' && typeof p.then === 'function' @@ -171,6 +173,14 @@ class NextTracerImpl implements NextTracer { return trace.getSpan(context?.active()) } + public withPropagatedContext(req: BaseNextRequest, fn: () => T): T { + if (context.active() !== ROOT_CONTEXT) { + return fn() + } + const remoteContext = propagation.extract(ROOT_CONTEXT, req.headers) + return context.with(remoteContext, fn) + } + // Trace, wrap implementation is inspired by datadog trace implementation // (https://datadoghq.dev/dd-trace-js/interfaces/tracer.html#trace). public trace( @@ -229,7 +239,9 @@ class NextTracerImpl implements NextTracer { let isRootSpan = false if (!spanContext) { - spanContext = api.ROOT_CONTEXT + spanContext = ROOT_CONTEXT + isRootSpan = true + } else if (trace.getSpanContext(spanContext)?.isRemote) { isRootSpan = true } @@ -241,7 +253,7 @@ class NextTracerImpl implements NextTracer { ...options.attributes, } - return api.context.with(spanContext.setValue(rootSpanIdKey, spanId), () => + return context.with(spanContext.setValue(rootSpanIdKey, spanId), () => this.getTracerInstance().startActiveSpan( spanName, options, diff --git a/test/e2e/opentelemetry/opentelemetry.test.ts b/test/e2e/opentelemetry/opentelemetry.test.ts index 89be53d94d7d3..cfc09210b1434 100644 --- a/test/e2e/opentelemetry/opentelemetry.test.ts +++ b/test/e2e/opentelemetry/opentelemetry.test.ts @@ -3,6 +3,11 @@ import { check } from 'next-test-utils' import { SavedSpan, traceFile } from './constants' +const EXTERNAL = { + traceId: 'ee75cd9e534ff5e9ed78b4a0c706f0f2', + spanId: '0f6a325411bdc432', +} as const + createNextDescribe( 'opentelemetry', { @@ -33,8 +38,12 @@ createNextDescribe( delete span.links delete span.events delete span.timestamp - delete span.traceId - span.parentId = span.parentId === undefined ? undefined : '[parent-id]' + span.traceId = + span.traceId === EXTERNAL.traceId ? span.traceId : '[trace-id]' + span.parentId = + span.parentId === undefined || span.parentId === EXTERNAL.spanId + ? span.parentId + : '[parent-id]' return span } const sanitizeSpans = (spans: SavedSpan[]) => { @@ -71,286 +80,376 @@ createNextDescribe( await cleanTraces() }) - // turbopack does not support experimental.instrumentationHook - ;(process.env.TURBOPACK ? describe.skip : describe)('app router', () => { - it('should handle RSC with fetch', async () => { - await next.fetch('/app/param/rsc-fetch') + for (const env of [ + { + name: 'root context', + fetchInit: undefined, + span: { + traceId: '[trace-id]', + rootParentId: undefined, + }, + }, + { + name: 'incoming context propagation', + fetchInit: { + headers: { + traceparent: `00-${EXTERNAL.traceId}-${EXTERNAL.spanId}-01`, + }, + }, + span: { + traceId: EXTERNAL.traceId, + rootParentId: EXTERNAL.spanId, + }, + }, + ]) { + // turbopack does not support experimental.instrumentationHook + ;(process.env.TURBOPACK ? describe.skip : describe)(env.name, () => { + describe('app router', () => { + it('should handle RSC with fetch', async () => { + await next.fetch('/app/param/rsc-fetch', env.fetchInit) - await check(async () => { - expect(await getSanitizedTraces(1)).toMatchInlineSnapshot(` - [ - { - "attributes": { - "http.method": "GET", - "http.url": "https://vercel.com/", - "net.peer.name": "vercel.com", - "next.span_name": "fetch GET https://vercel.com/", - "next.span_type": "AppRender.fetch", - }, - "kind": 2, - "name": "fetch GET https://vercel.com/", - "parentId": "[parent-id]", - "status": { - "code": 0, - }, - }, - { - "attributes": { - "next.route": "/app/[param]/rsc-fetch", - "next.span_name": "render route (app) /app/[param]/rsc-fetch", - "next.span_type": "AppRender.getBodyResult", - }, - "kind": 0, - "name": "render route (app) /app/[param]/rsc-fetch", - "parentId": "[parent-id]", - "status": { - "code": 0, - }, - }, - { - "attributes": { - "http.method": "GET", - "http.route": "/app/[param]/rsc-fetch", - "http.status_code": 200, - "http.target": "/app/param/rsc-fetch", - "next.route": "/app/[param]/rsc-fetch", - "next.span_name": "GET /app/[param]/rsc-fetch", - "next.span_type": "BaseServer.handleRequest", - }, - "kind": 1, - "name": "GET /app/[param]/rsc-fetch", - "parentId": undefined, - "status": { - "code": 0, - }, - }, - { - "attributes": { - "next.page": "/app/[param]/layout", - "next.span_name": "generateMetadata /app/[param]/layout", - "next.span_type": "ResolveMetadata.generateMetadata", - }, - "kind": 0, - "name": "generateMetadata /app/[param]/layout", - "parentId": "[parent-id]", - "status": { - "code": 0, - }, - }, - { - "attributes": { - "next.page": "/app/[param]/rsc-fetch/page", - "next.span_name": "generateMetadata /app/[param]/rsc-fetch/page", - "next.span_type": "ResolveMetadata.generateMetadata", - }, - "kind": 0, - "name": "generateMetadata /app/[param]/rsc-fetch/page", - "parentId": "[parent-id]", - "status": { - "code": 0, - }, - }, - ] - `) - return 'success' - }, 'success') - }) + await check(async () => { + const numberOfRootTraces = + env.span.rootParentId === undefined ? 1 : 0 + const traces = await getSanitizedTraces(numberOfRootTraces) + if (traces.length < 5) { + return `not enough traces, expected 5, but got ${traces.length}` + } + expect(traces).toMatchInlineSnapshot(` + [ + { + "attributes": { + "http.method": "GET", + "http.url": "https://vercel.com/", + "net.peer.name": "vercel.com", + "next.span_name": "fetch GET https://vercel.com/", + "next.span_type": "AppRender.fetch", + }, + "kind": 2, + "name": "fetch GET https://vercel.com/", + "parentId": "[parent-id]", + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + { + "attributes": { + "next.route": "/app/[param]/rsc-fetch", + "next.span_name": "render route (app) /app/[param]/rsc-fetch", + "next.span_type": "AppRender.getBodyResult", + }, + "kind": 0, + "name": "render route (app) /app/[param]/rsc-fetch", + "parentId": "[parent-id]", + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + { + "attributes": { + "http.method": "GET", + "http.route": "/app/[param]/rsc-fetch", + "http.status_code": 200, + "http.target": "/app/param/rsc-fetch", + "next.route": "/app/[param]/rsc-fetch", + "next.span_name": "GET /app/[param]/rsc-fetch", + "next.span_type": "BaseServer.handleRequest", + }, + "kind": 1, + "name": "GET /app/[param]/rsc-fetch", + "parentId": ${ + env.span.rootParentId + ? `"${env.span.rootParentId}"` + : undefined + }, + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + { + "attributes": { + "next.page": "/app/[param]/layout", + "next.span_name": "generateMetadata /app/[param]/layout", + "next.span_type": "ResolveMetadata.generateMetadata", + }, + "kind": 0, + "name": "generateMetadata /app/[param]/layout", + "parentId": "[parent-id]", + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + { + "attributes": { + "next.page": "/app/[param]/rsc-fetch/page", + "next.span_name": "generateMetadata /app/[param]/rsc-fetch/page", + "next.span_type": "ResolveMetadata.generateMetadata", + }, + "kind": 0, + "name": "generateMetadata /app/[param]/rsc-fetch/page", + "parentId": "[parent-id]", + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + ] + `) + return 'success' + }, 'success') + }) - it('should handle route handlers in app router', async () => { - await next.fetch('/api/app/param/data') + it('should handle route handlers in app router', async () => { + await next.fetch('/api/app/param/data', env.fetchInit) - await check(async () => { - expect(await getSanitizedTraces(1)).toMatchInlineSnapshot(` - [ - { - "attributes": { - "next.route": "/api/app/[param]/data/route", - "next.span_name": "executing api route (app) /api/app/[param]/data/route", - "next.span_type": "AppRouteRouteHandlers.runHandler", - }, - "kind": 0, - "name": "executing api route (app) /api/app/[param]/data/route", - "parentId": "[parent-id]", - "status": { - "code": 0, - }, - }, - { - "attributes": { - "http.method": "GET", - "http.route": "/api/app/[param]/data/route", - "http.status_code": 200, - "http.target": "/api/app/param/data", - "next.route": "/api/app/[param]/data/route", - "next.span_name": "GET /api/app/[param]/data/route", - "next.span_type": "BaseServer.handleRequest", - }, - "kind": 1, - "name": "GET /api/app/[param]/data/route", - "parentId": undefined, - "status": { - "code": 0, - }, - }, - ] - `) - return 'success' - }, 'success') - }) - }) + await check(async () => { + const numberOfRootTraces = + env.span.rootParentId === undefined ? 1 : 0 + const traces = await getSanitizedTraces(numberOfRootTraces) + if (traces.length < 2) { + return `not enough traces, expected 2, but got ${traces.length}` + } + expect(traces).toMatchInlineSnapshot(` + [ + { + "attributes": { + "next.route": "/api/app/[param]/data/route", + "next.span_name": "executing api route (app) /api/app/[param]/data/route", + "next.span_type": "AppRouteRouteHandlers.runHandler", + }, + "kind": 0, + "name": "executing api route (app) /api/app/[param]/data/route", + "parentId": "[parent-id]", + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + { + "attributes": { + "http.method": "GET", + "http.route": "/api/app/[param]/data/route", + "http.status_code": 200, + "http.target": "/api/app/param/data", + "next.route": "/api/app/[param]/data/route", + "next.span_name": "GET /api/app/[param]/data/route", + "next.span_type": "BaseServer.handleRequest", + }, + "kind": 1, + "name": "GET /api/app/[param]/data/route", + "parentId": ${ + env.span.rootParentId + ? `"${env.span.rootParentId}"` + : undefined + }, + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + ] + `) + return 'success' + }, 'success') + }) + }) - // turbopack does not support experimental.instrumentationHook - ;(process.env.TURBOPACK ? describe.skip : describe)('pages', () => { - it('should handle getServerSideProps', async () => { - await next.fetch('/pages/param/getServerSideProps') + describe('pages', () => { + it('should handle getServerSideProps', async () => { + await next.fetch('/pages/param/getServerSideProps', env.fetchInit) - await check(async () => { - expect(await getSanitizedTraces(1)).toMatchInlineSnapshot(` - [ - { - "attributes": { - "http.method": "GET", - "http.route": "/pages/[param]/getServerSideProps", - "http.status_code": 200, - "http.target": "/pages/param/getServerSideProps", - "next.route": "/pages/[param]/getServerSideProps", - "next.span_name": "GET /pages/[param]/getServerSideProps", - "next.span_type": "BaseServer.handleRequest", - }, - "kind": 1, - "name": "GET /pages/[param]/getServerSideProps", - "parentId": undefined, - "status": { - "code": 0, - }, - }, - { - "attributes": { - "next.route": "/pages/[param]/getServerSideProps", - "next.span_name": "getServerSideProps /pages/[param]/getServerSideProps", - "next.span_type": "Render.getServerSideProps", - }, - "kind": 0, - "name": "getServerSideProps /pages/[param]/getServerSideProps", - "parentId": "[parent-id]", - "status": { - "code": 0, - }, - }, - { - "attributes": { - "next.route": "/pages/[param]/getServerSideProps", - "next.span_name": "render route (pages) /pages/[param]/getServerSideProps", - "next.span_type": "Render.renderDocument", - }, - "kind": 0, - "name": "render route (pages) /pages/[param]/getServerSideProps", - "parentId": "[parent-id]", - "status": { - "code": 0, - }, - }, - ] - `) - return 'success' - }, 'success') - }) + await check(async () => { + const numberOfRootTraces = + env.span.rootParentId === undefined ? 1 : 0 + const traces = await getSanitizedTraces(numberOfRootTraces) + if (traces.length < 3) { + return `not enough traces, expected 3, but got ${traces.length}` + } + expect(traces).toMatchInlineSnapshot(` + [ + { + "attributes": { + "http.method": "GET", + "http.route": "/pages/[param]/getServerSideProps", + "http.status_code": 200, + "http.target": "/pages/param/getServerSideProps", + "next.route": "/pages/[param]/getServerSideProps", + "next.span_name": "GET /pages/[param]/getServerSideProps", + "next.span_type": "BaseServer.handleRequest", + }, + "kind": 1, + "name": "GET /pages/[param]/getServerSideProps", + "parentId": ${ + env.span.rootParentId + ? `"${env.span.rootParentId}"` + : undefined + }, + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + { + "attributes": { + "next.route": "/pages/[param]/getServerSideProps", + "next.span_name": "getServerSideProps /pages/[param]/getServerSideProps", + "next.span_type": "Render.getServerSideProps", + }, + "kind": 0, + "name": "getServerSideProps /pages/[param]/getServerSideProps", + "parentId": "[parent-id]", + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + { + "attributes": { + "next.route": "/pages/[param]/getServerSideProps", + "next.span_name": "render route (pages) /pages/[param]/getServerSideProps", + "next.span_type": "Render.renderDocument", + }, + "kind": 0, + "name": "render route (pages) /pages/[param]/getServerSideProps", + "parentId": "[parent-id]", + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + ] + `) + return 'success' + }, 'success') + }) - it("should handle getStaticProps when fallback: 'blocking'", async () => { - await next.fetch('/pages/param/getStaticProps') + it("should handle getStaticProps when fallback: 'blocking'", async () => { + const v = env.span.rootParentId ? '2' : '' + await next.fetch(`/pages/param/getStaticProps${v}`, env.fetchInit) - await check(async () => { - expect(await getSanitizedTraces(1)).toMatchInlineSnapshot(` - [ - { - "attributes": { - "http.method": "GET", - "http.route": "/pages/[param]/getStaticProps", - "http.status_code": 200, - "http.target": "/pages/param/getStaticProps", - "next.route": "/pages/[param]/getStaticProps", - "next.span_name": "GET /pages/[param]/getStaticProps", - "next.span_type": "BaseServer.handleRequest", - }, - "kind": 1, - "name": "GET /pages/[param]/getStaticProps", - "parentId": undefined, - "status": { - "code": 0, - }, - }, - { - "attributes": { - "next.route": "/pages/[param]/getStaticProps", - "next.span_name": "getStaticProps /pages/[param]/getStaticProps", - "next.span_type": "Render.getStaticProps", - }, - "kind": 0, - "name": "getStaticProps /pages/[param]/getStaticProps", - "parentId": "[parent-id]", - "status": { - "code": 0, - }, - }, - { - "attributes": { - "next.route": "/pages/[param]/getStaticProps", - "next.span_name": "render route (pages) /pages/[param]/getStaticProps", - "next.span_type": "Render.renderDocument", - }, - "kind": 0, - "name": "render route (pages) /pages/[param]/getStaticProps", - "parentId": "[parent-id]", - "status": { - "code": 0, - }, - }, - ] - `) - return 'success' - }, 'success') - }) + await check(async () => { + const numberOfRootTraces = + env.span.rootParentId === undefined ? 1 : 0 + const traces = await getSanitizedTraces(numberOfRootTraces) + if (traces.length < 3) { + return `not enough traces, expected 3, but got ${traces.length}` + } + expect(traces).toMatchInlineSnapshot(` + [ + { + "attributes": { + "http.method": "GET", + "http.route": "/pages/[param]/getStaticProps${v}", + "http.status_code": 200, + "http.target": "/pages/param/getStaticProps${v}", + "next.route": "/pages/[param]/getStaticProps${v}", + "next.span_name": "GET /pages/[param]/getStaticProps${v}", + "next.span_type": "BaseServer.handleRequest", + }, + "kind": 1, + "name": "GET /pages/[param]/getStaticProps${v}", + "parentId": ${ + env.span.rootParentId + ? `"${env.span.rootParentId}"` + : undefined + }, + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + { + "attributes": { + "next.route": "/pages/[param]/getStaticProps${v}", + "next.span_name": "getStaticProps /pages/[param]/getStaticProps${v}", + "next.span_type": "Render.getStaticProps", + }, + "kind": 0, + "name": "getStaticProps /pages/[param]/getStaticProps${v}", + "parentId": "[parent-id]", + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + { + "attributes": { + "next.route": "/pages/[param]/getStaticProps${v}", + "next.span_name": "render route (pages) /pages/[param]/getStaticProps${v}", + "next.span_type": "Render.renderDocument", + }, + "kind": 0, + "name": "render route (pages) /pages/[param]/getStaticProps${v}", + "parentId": "[parent-id]", + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + ] + `) + return 'success' + }, 'success') + }) - it('should handle api routes in pages', async () => { - await next.fetch('/api/pages/param/basic') + it('should handle api routes in pages', async () => { + await next.fetch('/api/pages/param/basic', env.fetchInit) - await check(async () => { - expect(await getSanitizedTraces(1)).toMatchInlineSnapshot(` - [ - { - "attributes": { - "http.method": "GET", - "http.route": "/api/pages/[param]/basic", - "http.status_code": 200, - "http.target": "/api/pages/param/basic", - "next.route": "/api/pages/[param]/basic", - "next.span_name": "GET /api/pages/[param]/basic", - "next.span_type": "BaseServer.handleRequest", - }, - "kind": 1, - "name": "GET /api/pages/[param]/basic", - "parentId": undefined, - "status": { - "code": 0, - }, - }, - { - "attributes": { - "next.span_name": "executing api route (pages) /api/pages/[param]/basic", - "next.span_type": "Node.runHandler", - }, - "kind": 0, - "name": "executing api route (pages) /api/pages/[param]/basic", - "parentId": "[parent-id]", - "status": { - "code": 0, - }, - }, - ] - `) - return 'success' - }, 'success') + await check(async () => { + const numberOfRootTraces = + env.span.rootParentId === undefined ? 1 : 0 + const traces = await getSanitizedTraces(numberOfRootTraces) + if (traces.length < 2) { + return `not enough traces, expected 2, but got ${traces.length}` + } + expect(traces).toMatchInlineSnapshot(` + [ + { + "attributes": { + "http.method": "GET", + "http.route": "/api/pages/[param]/basic", + "http.status_code": 200, + "http.target": "/api/pages/param/basic", + "next.route": "/api/pages/[param]/basic", + "next.span_name": "GET /api/pages/[param]/basic", + "next.span_type": "BaseServer.handleRequest", + }, + "kind": 1, + "name": "GET /api/pages/[param]/basic", + "parentId": ${ + env.span.rootParentId + ? `"${env.span.rootParentId}"` + : undefined + }, + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + { + "attributes": { + "next.span_name": "executing api route (pages) /api/pages/[param]/basic", + "next.span_type": "Node.runHandler", + }, + "kind": 0, + "name": "executing api route (pages) /api/pages/[param]/basic", + "parentId": "[parent-id]", + "status": { + "code": 0, + }, + "traceId": "${env.span.traceId}", + }, + ] + `) + return 'success' + }, 'success') + }) + }) }) - }) + } } ) diff --git a/test/e2e/opentelemetry/pages/pages/[param]/getStaticProps2.tsx b/test/e2e/opentelemetry/pages/pages/[param]/getStaticProps2.tsx new file mode 100644 index 0000000000000..3ba125ed2fe9c --- /dev/null +++ b/test/e2e/opentelemetry/pages/pages/[param]/getStaticProps2.tsx @@ -0,0 +1,17 @@ +export default function Page() { + return
Page
+} + +export function getStaticProps() { + return { + props: {}, + } +} + +// We don't want to render in build time +export async function getStaticPaths() { + return { + paths: [], + fallback: 'blocking', + } +} From 71116ce3648c3c715d1de5380bee72ee71be1992 Mon Sep 17 00:00:00 2001 From: mknichel <7355009+mknichel@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:51:26 -0700 Subject: [PATCH 02/30] debug: Add tags to next build traces to track build configuration in the .next/trace file (#56965) This PR adds two simple tags to the `.next/trace` output for the `next-build` span to keep track of parameters to the build step when looking at build traces, and a `isTurbotrace` for the tracing step. --- packages/next/src/build/collect-build-traces.ts | 4 +++- packages/next/src/build/index.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/next/src/build/collect-build-traces.ts b/packages/next/src/build/collect-build-traces.ts index 9b50e7d23abd0..4a38017e52f98 100644 --- a/packages/next/src/build/collect-build-traces.ts +++ b/packages/next/src/build/collect-build-traces.ts @@ -193,7 +193,9 @@ export async function collectBuildTraces({ const excludeGlobKeys = Object.keys(outputFileTracingExcludes) await nextBuildSpan - .traceChild('node-file-trace-build') + .traceChild('node-file-trace-build', { + isTurbotrace: Boolean(config.experimental.turbotrace) ? 'true' : 'false', + }) .traceAsyncFn(async () => { const nextServerTraceOutput = path.join( distDir, diff --git a/packages/next/src/build/index.ts b/packages/next/src/build/index.ts index c221b35c3628f..266022dcd65e8 100644 --- a/packages/next/src/build/index.ts +++ b/packages/next/src/build/index.ts @@ -350,6 +350,8 @@ export default async function build( let hasAppDir = false try { const nextBuildSpan = trace('next-build', undefined, { + buildMode: buildMode, + isTurboBuild: String(turboNextBuild), version: process.env.__NEXT_VERSION as string, }) From ec20e2464508a1d952e06c22374cbd2c08fac9ae Mon Sep 17 00:00:00 2001 From: mknichel <7355009+mknichel@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:14:34 -0700 Subject: [PATCH 03/30] [Traces] Await the flush of the trace write stream to make sure trace file is written (#57641) This PR fixes an issue where sometimes the `.next/trace` file would not be written at the end of a build. The process was not waiting for the write stream to be flushed before closing, losing the contents of the trace, which was especially visible when using `experimental-compile`. --- packages/next/src/trace/report/to-json.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/src/trace/report/to-json.ts b/packages/next/src/trace/report/to-json.ts index 40965d6fe2d4b..8c13a0a8d1b8b 100644 --- a/packages/next/src/trace/report/to-json.ts +++ b/packages/next/src/trace/report/to-json.ts @@ -174,7 +174,7 @@ export default { const phase = traceGlobals.get('phase') // Only end writeStream when manually flushing in production if (phase !== PHASE_DEVELOPMENT_SERVER) { - writeStream.end() + return writeStream.end() } }) : undefined, From c70506de776839640dc53c24da198de5a75570a8 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Fri, 27 Oct 2023 23:22:34 +0000 Subject: [PATCH 04/30] v14.0.1-canary.1 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/eslint-config-next/package.json | 4 ++-- packages/eslint-plugin-next/package.json | 2 +- packages/font/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-codemod/package.json | 2 +- packages/next-env/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-storybook/package.json | 2 +- packages/next-polyfill-module/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next-swc/package.json | 2 +- packages/next/package.json | 14 +++++++------- packages/react-dev-overlay/package.json | 2 +- packages/react-refresh-utils/package.json | 2 +- packages/third-parties/package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++-------- 18 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lerna.json b/lerna.json index 060c4923f63bb..f2377b607e6f0 100644 --- a/lerna.json +++ b/lerna.json @@ -16,5 +16,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "14.0.1-canary.0" + "version": "14.0.1-canary.1" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 717522ca7b955..49a6b9268577c 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "keywords": [ "react", "next", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 34fd0204ae306..011833a11967c 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "description": "ESLint configuration used by Next.js.", "main": "index.js", "license": "MIT", @@ -10,7 +10,7 @@ }, "homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config", "dependencies": { - "@next/eslint-plugin-next": "14.0.1-canary.0", + "@next/eslint-plugin-next": "14.0.1-canary.1", "@rushstack/eslint-patch": "^1.3.3", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", "eslint-import-resolver-node": "^0.3.6", diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 9619ecf8b4038..2db3b4f8615b5 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "description": "ESLint plugin for Next.js.", "main": "dist/index.js", "license": "MIT", diff --git a/packages/font/package.json b/packages/font/package.json index 66ef87f841153..f38191dfe7143 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@next/font", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index be6f7473c1d72..d7601d466dba6 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index 935532c65a8b8..5ce3192fe71b8 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index bdd09b11d451a..2442169ee0aad 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index a1379cb71ab9e..061fcecdc1432 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index 12f8f7a157d06..09c6afc0056eb 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index f2784d3fc7b4d..f2ba81fdafdb8 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 1ac12d0a5a582..b456049e506c2 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index 49171161dddb5..c250601f85458 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "private": true, "scripts": { "clean": "node ../../scripts/rm.mjs native", diff --git a/packages/next/package.json b/packages/next/package.json index d400eb4079011..cb05fca4a6b9e 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -92,7 +92,7 @@ ] }, "dependencies": { - "@next/env": "14.0.1-canary.0", + "@next/env": "14.0.1-canary.1", "@swc/helpers": "0.5.2", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", @@ -146,11 +146,11 @@ "@mswjs/interceptors": "0.23.0", "@napi-rs/cli": "2.16.2", "@napi-rs/triples": "1.1.0", - "@next/polyfill-module": "14.0.1-canary.0", - "@next/polyfill-nomodule": "14.0.1-canary.0", - "@next/react-dev-overlay": "14.0.1-canary.0", - "@next/react-refresh-utils": "14.0.1-canary.0", - "@next/swc": "14.0.1-canary.0", + "@next/polyfill-module": "14.0.1-canary.1", + "@next/polyfill-nomodule": "14.0.1-canary.1", + "@next/react-dev-overlay": "14.0.1-canary.1", + "@next/react-refresh-utils": "14.0.1-canary.1", + "@next/swc": "14.0.1-canary.1", "@opentelemetry/api": "1.4.1", "@playwright/test": "^1.35.1", "@taskr/clear": "1.1.0", diff --git a/packages/react-dev-overlay/package.json b/packages/react-dev-overlay/package.json index b09d8ad0bcf9b..f3d06cb130da5 100644 --- a/packages/react-dev-overlay/package.json +++ b/packages/react-dev-overlay/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-dev-overlay", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "description": "A development-only overlay for developing React applications.", "repository": { "url": "vercel/next.js", diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index 6ff68e1e1fb5d..aeeeda94321ea 100644 --- a/packages/react-refresh-utils/package.json +++ b/packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-refresh-utils", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "description": "An experimental package providing utilities for React Refresh.", "repository": { "url": "vercel/next.js", diff --git a/packages/third-parties/package.json b/packages/third-parties/package.json index c2a1c18d793dd..098dbd9f55fc0 100644 --- a/packages/third-parties/package.json +++ b/packages/third-parties/package.json @@ -1,6 +1,6 @@ { "name": "@next/third-parties", - "version": "14.0.1-canary.0", + "version": "14.0.1-canary.1", "repository": { "url": "vercel/next.js", "directory": "packages/third-parties" @@ -22,7 +22,7 @@ "third-party-capital": "1.0.20" }, "devDependencies": { - "next": "14.0.1-canary.0", + "next": "14.0.1-canary.1", "outdent": "0.8.0", "prettier": "2.5.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 37a2f9bacd52f..b7c687f875b84 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,7 +735,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 14.0.1-canary.0 + specifier: 14.0.1-canary.1 version: link:../eslint-plugin-next '@rushstack/eslint-patch': specifier: ^1.3.3 @@ -796,7 +796,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 14.0.1-canary.0 + specifier: 14.0.1-canary.1 version: link:../next-env '@swc/helpers': specifier: 0.5.2 @@ -920,19 +920,19 @@ importers: specifier: 1.1.0 version: 1.1.0 '@next/polyfill-module': - specifier: 14.0.1-canary.0 + specifier: 14.0.1-canary.1 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 14.0.1-canary.0 + specifier: 14.0.1-canary.1 version: link:../next-polyfill-nomodule '@next/react-dev-overlay': - specifier: 14.0.1-canary.0 + specifier: 14.0.1-canary.1 version: link:../react-dev-overlay '@next/react-refresh-utils': - specifier: 14.0.1-canary.0 + specifier: 14.0.1-canary.1 version: link:../react-refresh-utils '@next/swc': - specifier: 14.0.1-canary.0 + specifier: 14.0.1-canary.1 version: link:../next-swc '@opentelemetry/api': specifier: 1.4.1 @@ -1583,7 +1583,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 14.0.1-canary.0 + specifier: 14.0.1-canary.1 version: link:../next outdent: specifier: 0.8.0 From 27471acd30e839703de0f83af9f6f2e53451b6de Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 27 Oct 2023 17:06:54 -0700 Subject: [PATCH 05/30] Add node-pty to externals list (#57640) This is a native module so exteranlize it by default --- packages/next/src/lib/server-external-packages.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/next/src/lib/server-external-packages.json b/packages/next/src/lib/server-external-packages.json index 3469c959b5ac8..25367d5c89cd8 100644 --- a/packages/next/src/lib/server-external-packages.json +++ b/packages/next/src/lib/server-external-packages.json @@ -30,6 +30,7 @@ "mongoose", "next-mdx-remote", "next-seo", + "node-pty", "payload", "pg", "playwright", From 26b71fcf9f3f21109fb5ca3bcdcee4092263c1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Maest=C3=A1?= Date: Fri, 27 Oct 2023 22:52:44 -0300 Subject: [PATCH 06/30] docs: Fix typos in third parties section (#57592) --- .../06-optimizing/10-third-party-libraries.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx b/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx index 24e867589087f..d26c18dd3b999 100644 --- a/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx +++ b/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx @@ -88,7 +88,7 @@ export default function MyApp({ Component, pageProps }) { -To load Google Tag Manager for a single route, include the comopnent in your page file: +To load Google Tag Manager for a single route, include the component in your page file: @@ -238,9 +238,9 @@ docs](https://developers.google.com/maps/documentation/embed/embedding-map). | `width` | Optional | Width of the embed. Defaults to `auto`. | | `style` | Optional | Pass styles to the iframe. | | `allowfullscreen` | Optional | Property to allow certain map parts to go full screen. | -| `loading` | Optional | Defaults to lazy. Consider changing if you know your embed will be above-the-fold. | +| `loading` | Optional | Defaults to lazy. Consider changing if you know your embed will be above the fold. | | `q` | Optional | Defines map marker location. _This may be required depending on the map mode_. | -| `center` | Optional | Defines center of the map view. | +| `center` | Optional | Defines the center of the map view. | | `zoom` | Optional | Sets initial zoom level of the map. | | `maptype` | Optional | Defines type of map tiles to load. | | `language` | Optional | Defines the language to use for UI elements and for the display of labels on map tiles. | From 86d3043d22e58344d785ed9cf6fc15de0c8c8c3d Mon Sep 17 00:00:00 2001 From: Anthony Zheng <34593012+ajz003@users.noreply.github.com> Date: Fri, 27 Oct 2023 18:53:20 -0700 Subject: [PATCH 07/30] docs: Add missing apostrophe (#57626) --- .../01-routing/07-error-handling.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02-app/01-building-your-application/01-routing/07-error-handling.mdx b/docs/02-app/01-building-your-application/01-routing/07-error-handling.mdx index 752b7923a4884..6c130293f3bea 100644 --- a/docs/02-app/01-building-your-application/01-routing/07-error-handling.mdx +++ b/docs/02-app/01-building-your-application/01-routing/07-error-handling.mdx @@ -153,7 +153,7 @@ For example, a nested route with two segments that both include `layout.js` and The nested component hierarchy has implications for the behavior of `error.js` files across a nested route: - Errors bubble up to the nearest parent error boundary. This means an `error.js` file will handle errors for all its nested child segments. More or less granular error UI can be achieved by placing `error.js` files at different levels in the nested folders of a route. -- An `error.js` boundary will **not** handle errors thrown in a `layout.js` component in the **same** segment because the error boundary is nested **inside** that layouts component. +- An `error.js` boundary will **not** handle errors thrown in a `layout.js` component in the **same** segment because the error boundary is nested **inside** that layout's component. ### Handling Errors in Layouts From ee9a13aaa0592102e229bb3e5959cebe0a7a060c Mon Sep 17 00:00:00 2001 From: Kunal Agrawal <92196937+its-kunal@users.noreply.github.com> Date: Sat, 28 Oct 2023 07:24:49 +0530 Subject: [PATCH 08/30] docs: fix incorrect heading structure in codemods (#57605) Fixes #57593 --- .../01-building-your-application/09-upgrading/01-codemods.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/02-app/01-building-your-application/09-upgrading/01-codemods.mdx b/docs/02-app/01-building-your-application/09-upgrading/01-codemods.mdx index 6695fb6ed88c4..a6166fb69b5bd 100644 --- a/docs/02-app/01-building-your-application/09-upgrading/01-codemods.mdx +++ b/docs/02-app/01-building-your-application/09-upgrading/01-codemods.mdx @@ -28,7 +28,7 @@ Replacing `` and `` with appropriate values. #### Migrate `ImageResponse` imports -#### `next-og-import` +##### `next-og-import` ```bash filename="Terminal" npx @next/codemod@latest next-og-import . @@ -50,7 +50,7 @@ import { ImageResponse } from 'next/og' #### Use `viewport` export -#### `metadata-to-viewport-export` +##### `metadata-to-viewport-export` ```bash filename="Terminal" npx @next/codemod@latest metadata-to-viewport-export . From 6a8010dbb60606099a22b02a5fe2ab3ddeb5193a Mon Sep 17 00:00:00 2001 From: Joel Hooks Date: Sat, 28 Oct 2023 09:57:27 -0700 Subject: [PATCH 09/30] examples: Add inngest next.js example (#56049) Co-authored-by: Lee Robinson Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../10-third-party-libraries.mdx | 2 +- examples/inngest/.env.development | 2 + examples/inngest/.gitignore | 35 ++++++++++++ examples/inngest/README.md | 54 +++++++++++++++++++ examples/inngest/next.config.js | 4 ++ examples/inngest/package.json | 24 +++++++++ examples/inngest/src/app/api/inngest/route.ts | 5 ++ examples/inngest/src/app/layout.tsx | 18 +++++++ examples/inngest/src/app/page.tsx | 24 +++++++++ .../src/inngest/functions/hello-world.ts | 10 ++++ .../inngest/src/inngest/inngest.client.ts | 4 ++ examples/inngest/tsconfig.json | 27 ++++++++++ 12 files changed, 208 insertions(+), 1 deletion(-) create mode 100755 examples/inngest/.env.development create mode 100755 examples/inngest/.gitignore create mode 100755 examples/inngest/README.md create mode 100755 examples/inngest/next.config.js create mode 100755 examples/inngest/package.json create mode 100755 examples/inngest/src/app/api/inngest/route.ts create mode 100755 examples/inngest/src/app/layout.tsx create mode 100755 examples/inngest/src/app/page.tsx create mode 100755 examples/inngest/src/inngest/functions/hello-world.ts create mode 100755 examples/inngest/src/inngest/inngest.client.ts create mode 100755 examples/inngest/tsconfig.json diff --git a/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx b/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx index d26c18dd3b999..e4fe3ed67dab2 100644 --- a/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx +++ b/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx @@ -240,7 +240,7 @@ docs](https://developers.google.com/maps/documentation/embed/embedding-map). | `allowfullscreen` | Optional | Property to allow certain map parts to go full screen. | | `loading` | Optional | Defaults to lazy. Consider changing if you know your embed will be above the fold. | | `q` | Optional | Defines map marker location. _This may be required depending on the map mode_. | -| `center` | Optional | Defines the center of the map view. | +| `center` | Optional | Defines the center of the map view. | | `zoom` | Optional | Sets initial zoom level of the map. | | `maptype` | Optional | Defines type of map tiles to load. | | `language` | Optional | Defines the language to use for UI elements and for the display of labels on map tiles. | diff --git a/examples/inngest/.env.development b/examples/inngest/.env.development new file mode 100755 index 0000000000000..aa2b20861928e --- /dev/null +++ b/examples/inngest/.env.development @@ -0,0 +1,2 @@ +INNGEST_EVENT_KEY=your-event-key +INNGEST_SIGNING_KEY=your-signing-key \ No newline at end of file diff --git a/examples/inngest/.gitignore b/examples/inngest/.gitignore new file mode 100755 index 0000000000000..8f322f0d8f495 --- /dev/null +++ b/examples/inngest/.gitignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/examples/inngest/README.md b/examples/inngest/README.md new file mode 100755 index 0000000000000..bdcf54db89fdf --- /dev/null +++ b/examples/inngest/README.md @@ -0,0 +1,54 @@ +# Next.js and Inngest Example + +This is an example of how to use [Inngest](https://inngest.com) to easily add durable work flows to your Next.js application. It keeps things simple: + +- Bare bones examples with a single button UI that triggers an event +- Runs the Inngest dev server locally for immediate feedback + +## Deploy your own + +Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/inngest&project-name=inngest&repository-name=inngest) + +To full deploy you'll need an [Inngest Cloud account](https://inngest.com) and the [Vercel Inngest integration](https://vercel.com/integrations/inngest) configured. + +## How to use + +Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [Bun](https://bun.sh/docs/cli/bunx) to bootstrap the example: + +```bash +npx create-next-app --example inngest inngest-app +``` + +```bash +yarn create next-app --example inngest inngest-app +``` + +```bash +pnpm create next-app --example inngest inngest-app +``` + +```bash +bunx create-next-app --example inngest inngest-app +``` + +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Notes + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +The Inngest dev server will be running at [http://localhost:8288](http://localhost:8288). It can take a few seconds to start up. diff --git a/examples/inngest/next.config.js b/examples/inngest/next.config.js new file mode 100755 index 0000000000000..767719fc4fba5 --- /dev/null +++ b/examples/inngest/next.config.js @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {} + +module.exports = nextConfig diff --git a/examples/inngest/package.json b/examples/inngest/package.json new file mode 100755 index 0000000000000..3592b8cd9bb7f --- /dev/null +++ b/examples/inngest/package.json @@ -0,0 +1,24 @@ +{ + "private": true, + "scripts": { + "dev": "concurrently \"npm:dev:*\"", + "dev:next": "next dev", + "dev:inngest": "npx inngest-cli@latest dev", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "inngest": "^3.4.1", + "next": "latest", + "react": "18.2.0", + "react-dom": "18.2.0" + }, + "devDependencies": { + "@types/node": "20.7.0", + "@types/react": "18.2.23", + "@types/react-dom": "18.2.7", + "concurrently": "^8.2.1", + "encoding": "^0.1.13", + "typescript": "5.2.2" + } +} diff --git a/examples/inngest/src/app/api/inngest/route.ts b/examples/inngest/src/app/api/inngest/route.ts new file mode 100755 index 0000000000000..ed9c2f485a542 --- /dev/null +++ b/examples/inngest/src/app/api/inngest/route.ts @@ -0,0 +1,5 @@ +import { serve } from 'inngest/next' +import { inngest } from '@/inngest/inngest.client' +import { helloWorld } from '@/inngest/functions/hello-world' + +export const { GET, POST, PUT } = serve(inngest, [helloWorld]) diff --git a/examples/inngest/src/app/layout.tsx b/examples/inngest/src/app/layout.tsx new file mode 100755 index 0000000000000..52ca0eb7bc80a --- /dev/null +++ b/examples/inngest/src/app/layout.tsx @@ -0,0 +1,18 @@ +import type { Metadata } from 'next' + +export const metadata: Metadata = { + title: 'Next.js Inngest Example', + description: 'Generated by create next app', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/examples/inngest/src/app/page.tsx b/examples/inngest/src/app/page.tsx new file mode 100755 index 0000000000000..a19c4b3261e38 --- /dev/null +++ b/examples/inngest/src/app/page.tsx @@ -0,0 +1,24 @@ +import { inngest } from '@/inngest/inngest.client' +import { redirect } from 'next/navigation' + +export default function Home() { + async function triggerInngestEvent() { + 'use server' + await inngest.send({ + name: 'test/hello.world', + data: { + message: 'Hello from Next.js!', + }, + }) + redirect('http://localhost:8288/stream') + } + return ( +
+
+
+ +
+
+
+ ) +} diff --git a/examples/inngest/src/inngest/functions/hello-world.ts b/examples/inngest/src/inngest/functions/hello-world.ts new file mode 100755 index 0000000000000..304bb6d9552dc --- /dev/null +++ b/examples/inngest/src/inngest/functions/hello-world.ts @@ -0,0 +1,10 @@ +import { inngest } from '../inngest.client' + +export const helloWorld = inngest.createFunction( + { id: 'hello-world', name: 'Hello World' }, + { event: 'test/hello.world' }, + async ({ event, step }) => { + await step.sleep('sleep for a second', '1s') + return { event, body: event.data.message } + } +) diff --git a/examples/inngest/src/inngest/inngest.client.ts b/examples/inngest/src/inngest/inngest.client.ts new file mode 100755 index 0000000000000..0e8d5db8e1eef --- /dev/null +++ b/examples/inngest/src/inngest/inngest.client.ts @@ -0,0 +1,4 @@ +import { Inngest } from 'inngest' + +// Create a client to send and receive events +export const inngest = new Inngest({ name: 'Basic Inngest Application' }) diff --git a/examples/inngest/tsconfig.json b/examples/inngest/tsconfig.json new file mode 100755 index 0000000000000..e59724b283f9c --- /dev/null +++ b/examples/inngest/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} From 54a9da0a1edc419b8e84c7b63bcfbdc0e8195114 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Sat, 28 Oct 2023 23:21:43 +0000 Subject: [PATCH 10/30] v14.0.1-canary.2 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/eslint-config-next/package.json | 4 ++-- packages/eslint-plugin-next/package.json | 2 +- packages/font/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-codemod/package.json | 2 +- packages/next-env/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-storybook/package.json | 2 +- packages/next-polyfill-module/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next-swc/package.json | 2 +- packages/next/package.json | 14 +++++++------- packages/react-dev-overlay/package.json | 2 +- packages/react-refresh-utils/package.json | 2 +- packages/third-parties/package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++-------- 18 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lerna.json b/lerna.json index f2377b607e6f0..95f611e11bdbc 100644 --- a/lerna.json +++ b/lerna.json @@ -16,5 +16,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "14.0.1-canary.1" + "version": "14.0.1-canary.2" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 49a6b9268577c..8e2343c6a891b 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "keywords": [ "react", "next", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 011833a11967c..047395c5d0191 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "description": "ESLint configuration used by Next.js.", "main": "index.js", "license": "MIT", @@ -10,7 +10,7 @@ }, "homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config", "dependencies": { - "@next/eslint-plugin-next": "14.0.1-canary.1", + "@next/eslint-plugin-next": "14.0.1-canary.2", "@rushstack/eslint-patch": "^1.3.3", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", "eslint-import-resolver-node": "^0.3.6", diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 2db3b4f8615b5..315715bc3c27a 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "description": "ESLint plugin for Next.js.", "main": "dist/index.js", "license": "MIT", diff --git a/packages/font/package.json b/packages/font/package.json index f38191dfe7143..51d310a10f19e 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@next/font", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index d7601d466dba6..5d5c73120ab10 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index 5ce3192fe71b8..9af2b0e53d92d 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index 2442169ee0aad..737b4e0450235 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 061fcecdc1432..39f067e2173b2 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index 09c6afc0056eb..e69eb72b712c4 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index f2ba81fdafdb8..3ef2a03f38af8 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index b456049e506c2..1ba0e1b674a07 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index c250601f85458..eff9db9185536 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "private": true, "scripts": { "clean": "node ../../scripts/rm.mjs native", diff --git a/packages/next/package.json b/packages/next/package.json index cb05fca4a6b9e..9d2ab4af3b862 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -92,7 +92,7 @@ ] }, "dependencies": { - "@next/env": "14.0.1-canary.1", + "@next/env": "14.0.1-canary.2", "@swc/helpers": "0.5.2", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", @@ -146,11 +146,11 @@ "@mswjs/interceptors": "0.23.0", "@napi-rs/cli": "2.16.2", "@napi-rs/triples": "1.1.0", - "@next/polyfill-module": "14.0.1-canary.1", - "@next/polyfill-nomodule": "14.0.1-canary.1", - "@next/react-dev-overlay": "14.0.1-canary.1", - "@next/react-refresh-utils": "14.0.1-canary.1", - "@next/swc": "14.0.1-canary.1", + "@next/polyfill-module": "14.0.1-canary.2", + "@next/polyfill-nomodule": "14.0.1-canary.2", + "@next/react-dev-overlay": "14.0.1-canary.2", + "@next/react-refresh-utils": "14.0.1-canary.2", + "@next/swc": "14.0.1-canary.2", "@opentelemetry/api": "1.4.1", "@playwright/test": "^1.35.1", "@taskr/clear": "1.1.0", diff --git a/packages/react-dev-overlay/package.json b/packages/react-dev-overlay/package.json index f3d06cb130da5..a51e60ae72b77 100644 --- a/packages/react-dev-overlay/package.json +++ b/packages/react-dev-overlay/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-dev-overlay", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "description": "A development-only overlay for developing React applications.", "repository": { "url": "vercel/next.js", diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index aeeeda94321ea..03d0bd49fe0cb 100644 --- a/packages/react-refresh-utils/package.json +++ b/packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-refresh-utils", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "description": "An experimental package providing utilities for React Refresh.", "repository": { "url": "vercel/next.js", diff --git a/packages/third-parties/package.json b/packages/third-parties/package.json index 098dbd9f55fc0..0106e5fe555d6 100644 --- a/packages/third-parties/package.json +++ b/packages/third-parties/package.json @@ -1,6 +1,6 @@ { "name": "@next/third-parties", - "version": "14.0.1-canary.1", + "version": "14.0.1-canary.2", "repository": { "url": "vercel/next.js", "directory": "packages/third-parties" @@ -22,7 +22,7 @@ "third-party-capital": "1.0.20" }, "devDependencies": { - "next": "14.0.1-canary.1", + "next": "14.0.1-canary.2", "outdent": "0.8.0", "prettier": "2.5.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b7c687f875b84..9c39c5cf61342 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,7 +735,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 14.0.1-canary.1 + specifier: 14.0.1-canary.2 version: link:../eslint-plugin-next '@rushstack/eslint-patch': specifier: ^1.3.3 @@ -796,7 +796,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 14.0.1-canary.1 + specifier: 14.0.1-canary.2 version: link:../next-env '@swc/helpers': specifier: 0.5.2 @@ -920,19 +920,19 @@ importers: specifier: 1.1.0 version: 1.1.0 '@next/polyfill-module': - specifier: 14.0.1-canary.1 + specifier: 14.0.1-canary.2 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 14.0.1-canary.1 + specifier: 14.0.1-canary.2 version: link:../next-polyfill-nomodule '@next/react-dev-overlay': - specifier: 14.0.1-canary.1 + specifier: 14.0.1-canary.2 version: link:../react-dev-overlay '@next/react-refresh-utils': - specifier: 14.0.1-canary.1 + specifier: 14.0.1-canary.2 version: link:../react-refresh-utils '@next/swc': - specifier: 14.0.1-canary.1 + specifier: 14.0.1-canary.2 version: link:../next-swc '@opentelemetry/api': specifier: 1.4.1 @@ -1583,7 +1583,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 14.0.1-canary.1 + specifier: 14.0.1-canary.2 version: link:../next outdent: specifier: 0.8.0 From c88e089ade9c6835da0a6169719460f0b29da0df Mon Sep 17 00:00:00 2001 From: Boris Besemer Date: Sun, 29 Oct 2023 16:09:33 +0100 Subject: [PATCH 11/30] fix: move logging config validation out of experimental (#57530) --- packages/next/src/server/config-schema.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/next/src/server/config-schema.ts b/packages/next/src/server/config-schema.ts index fec94d71623f7..caeb2cd965142 100644 --- a/packages/next/src/server/config-schema.ts +++ b/packages/next/src/server/config-schema.ts @@ -357,12 +357,6 @@ export const configSchema: zod.ZodType = z.lazy(() => memoryLimit: z.number().int().optional(), }) .optional(), - logging: z - .object({ - level: z.literal('verbose').optional(), - fullUrl: z.boolean().optional(), - }) - .optional(), serverMinification: z.boolean().optional(), serverSourceMaps: z.boolean().optional(), bundlePagesExternals: z.boolean().optional(), @@ -458,6 +452,15 @@ export const configSchema: zod.ZodType = z.lazy(() => path: z.string().optional(), }) .optional(), + logging: z + .object({ + fetches: z + .object({ + fullUrl: z.boolean().optional(), + }) + .optional(), + }) + .optional(), modularizeImports: z .record( z.string(), From 13d61529dc656b13c7ceb03f82505986b69bb4c3 Mon Sep 17 00:00:00 2001 From: Joel Hooks Date: Sun, 29 Oct 2023 09:38:21 -0700 Subject: [PATCH 12/30] examples: fix inngest example for 3.x sdk (#57712) Co-authored-by: Lee Robinson Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- examples/inngest/package.json | 2 +- examples/inngest/src/inngest/inngest.client.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/inngest/package.json b/examples/inngest/package.json index 3592b8cd9bb7f..c86ec816af529 100755 --- a/examples/inngest/package.json +++ b/examples/inngest/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "inngest": "^3.4.1", + "inngest": "latest", "next": "latest", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/examples/inngest/src/inngest/inngest.client.ts b/examples/inngest/src/inngest/inngest.client.ts index 0e8d5db8e1eef..ed92e911e4cc9 100755 --- a/examples/inngest/src/inngest/inngest.client.ts +++ b/examples/inngest/src/inngest/inngest.client.ts @@ -1,4 +1,4 @@ import { Inngest } from 'inngest' // Create a client to send and receive events -export const inngest = new Inngest({ name: 'Basic Inngest Application' }) +export const inngest = new Inngest({ id: 'Basic Inngest Application' }) From fc1ecc407c938b5df3ce2fa1820e55122820063b Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Sun, 29 Oct 2023 23:22:02 +0000 Subject: [PATCH 13/30] v14.0.1-canary.3 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/eslint-config-next/package.json | 4 ++-- packages/eslint-plugin-next/package.json | 2 +- packages/font/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-codemod/package.json | 2 +- packages/next-env/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-storybook/package.json | 2 +- packages/next-polyfill-module/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next-swc/package.json | 2 +- packages/next/package.json | 14 +++++++------- packages/react-dev-overlay/package.json | 2 +- packages/react-refresh-utils/package.json | 2 +- packages/third-parties/package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++-------- 18 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lerna.json b/lerna.json index 95f611e11bdbc..bba2f8622adda 100644 --- a/lerna.json +++ b/lerna.json @@ -16,5 +16,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "14.0.1-canary.2" + "version": "14.0.1-canary.3" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 8e2343c6a891b..4b9327c88e92c 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "keywords": [ "react", "next", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 047395c5d0191..06157f0301728 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "description": "ESLint configuration used by Next.js.", "main": "index.js", "license": "MIT", @@ -10,7 +10,7 @@ }, "homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config", "dependencies": { - "@next/eslint-plugin-next": "14.0.1-canary.2", + "@next/eslint-plugin-next": "14.0.1-canary.3", "@rushstack/eslint-patch": "^1.3.3", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", "eslint-import-resolver-node": "^0.3.6", diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 315715bc3c27a..8065635ddb117 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "description": "ESLint plugin for Next.js.", "main": "dist/index.js", "license": "MIT", diff --git a/packages/font/package.json b/packages/font/package.json index 51d310a10f19e..e99f9617060c5 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@next/font", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 5d5c73120ab10..02d772ff94c18 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index 9af2b0e53d92d..9c4f1d542e339 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index 737b4e0450235..c61759ca17588 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 39f067e2173b2..78eff4297d338 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index e69eb72b712c4..9e07195a002c7 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index 3ef2a03f38af8..893e9bbb78eaa 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 1ba0e1b674a07..7e4de4b2cf7d8 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index eff9db9185536..321ca4627458c 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "private": true, "scripts": { "clean": "node ../../scripts/rm.mjs native", diff --git a/packages/next/package.json b/packages/next/package.json index 9d2ab4af3b862..e1ca719bc4add 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -92,7 +92,7 @@ ] }, "dependencies": { - "@next/env": "14.0.1-canary.2", + "@next/env": "14.0.1-canary.3", "@swc/helpers": "0.5.2", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", @@ -146,11 +146,11 @@ "@mswjs/interceptors": "0.23.0", "@napi-rs/cli": "2.16.2", "@napi-rs/triples": "1.1.0", - "@next/polyfill-module": "14.0.1-canary.2", - "@next/polyfill-nomodule": "14.0.1-canary.2", - "@next/react-dev-overlay": "14.0.1-canary.2", - "@next/react-refresh-utils": "14.0.1-canary.2", - "@next/swc": "14.0.1-canary.2", + "@next/polyfill-module": "14.0.1-canary.3", + "@next/polyfill-nomodule": "14.0.1-canary.3", + "@next/react-dev-overlay": "14.0.1-canary.3", + "@next/react-refresh-utils": "14.0.1-canary.3", + "@next/swc": "14.0.1-canary.3", "@opentelemetry/api": "1.4.1", "@playwright/test": "^1.35.1", "@taskr/clear": "1.1.0", diff --git a/packages/react-dev-overlay/package.json b/packages/react-dev-overlay/package.json index a51e60ae72b77..537c67c2af522 100644 --- a/packages/react-dev-overlay/package.json +++ b/packages/react-dev-overlay/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-dev-overlay", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "description": "A development-only overlay for developing React applications.", "repository": { "url": "vercel/next.js", diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index 03d0bd49fe0cb..ac617d432b577 100644 --- a/packages/react-refresh-utils/package.json +++ b/packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-refresh-utils", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "description": "An experimental package providing utilities for React Refresh.", "repository": { "url": "vercel/next.js", diff --git a/packages/third-parties/package.json b/packages/third-parties/package.json index 0106e5fe555d6..557993106692f 100644 --- a/packages/third-parties/package.json +++ b/packages/third-parties/package.json @@ -1,6 +1,6 @@ { "name": "@next/third-parties", - "version": "14.0.1-canary.2", + "version": "14.0.1-canary.3", "repository": { "url": "vercel/next.js", "directory": "packages/third-parties" @@ -22,7 +22,7 @@ "third-party-capital": "1.0.20" }, "devDependencies": { - "next": "14.0.1-canary.2", + "next": "14.0.1-canary.3", "outdent": "0.8.0", "prettier": "2.5.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c39c5cf61342..ea39243e210d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,7 +735,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 14.0.1-canary.2 + specifier: 14.0.1-canary.3 version: link:../eslint-plugin-next '@rushstack/eslint-patch': specifier: ^1.3.3 @@ -796,7 +796,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 14.0.1-canary.2 + specifier: 14.0.1-canary.3 version: link:../next-env '@swc/helpers': specifier: 0.5.2 @@ -920,19 +920,19 @@ importers: specifier: 1.1.0 version: 1.1.0 '@next/polyfill-module': - specifier: 14.0.1-canary.2 + specifier: 14.0.1-canary.3 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 14.0.1-canary.2 + specifier: 14.0.1-canary.3 version: link:../next-polyfill-nomodule '@next/react-dev-overlay': - specifier: 14.0.1-canary.2 + specifier: 14.0.1-canary.3 version: link:../react-dev-overlay '@next/react-refresh-utils': - specifier: 14.0.1-canary.2 + specifier: 14.0.1-canary.3 version: link:../react-refresh-utils '@next/swc': - specifier: 14.0.1-canary.2 + specifier: 14.0.1-canary.3 version: link:../next-swc '@opentelemetry/api': specifier: 1.4.1 @@ -1583,7 +1583,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 14.0.1-canary.2 + specifier: 14.0.1-canary.3 version: link:../next outdent: specifier: 0.8.0 From 7e1f57bef48a3fe4491948b0e0df1d94ef8a9969 Mon Sep 17 00:00:00 2001 From: Vercel Release Bot <88769842+vercel-release-bot@users.noreply.github.com> Date: Sun, 29 Oct 2023 20:36:48 -0400 Subject: [PATCH 14/30] Update font data (#57728) This auto-generated PR updates font data with latest available --- packages/font/src/google/font-data.json | 88 +++++++++++++++-- packages/font/src/google/index.ts | 122 ++++++++++++++++++++++-- 2 files changed, 194 insertions(+), 16 deletions(-) diff --git a/packages/font/src/google/font-data.json b/packages/font/src/google/font-data.json index 7b3eb52f9b0be..a3f3ecbc4bd21 100644 --- a/packages/font/src/google/font-data.json +++ b/packages/font/src/google/font-data.json @@ -103,6 +103,11 @@ ], "subsets": ["cyrillic", "cyrillic-ext", "greek", "latin", "latin-ext"] }, + "Agbalumo": { + "weights": ["400"], + "styles": ["normal"], + "subsets": ["cyrillic-ext", "latin", "latin-ext", "vietnamese"] + }, "Agdasima": { "weights": ["400", "700"], "styles": ["normal"], @@ -1728,8 +1733,22 @@ "subsets": ["latin", "latin-ext"] }, "BioRhyme": { - "weights": ["200", "300", "400", "700", "800"], + "weights": ["200", "300", "400", "500", "600", "700", "800", "variable"], "styles": ["normal"], + "axes": [ + { + "tag": "wdth", + "min": 100, + "max": 125, + "defaultValue": 100 + }, + { + "tag": "wght", + "min": 200, + "max": 800, + "defaultValue": 400 + } + ], "subsets": ["latin", "latin-ext"] }, "BioRhyme Expanded": { @@ -5365,6 +5384,11 @@ "styles": ["normal"], "subsets": ["latin", "latin-ext"] }, + "Kay Pho Du": { + "weights": ["400", "500", "600", "700"], + "styles": ["normal"], + "subsets": ["kayah-li", "latin", "latin-ext"] + }, "Kdam Thmor Pro": { "weights": ["400"], "styles": ["normal"], @@ -6029,6 +6053,37 @@ "styles": ["normal", "italic"], "subsets": ["latin"] }, + "Linefont": { + "weights": [ + "100", + "200", + "300", + "400", + "500", + "600", + "700", + "800", + "900", + "1000", + "variable" + ], + "styles": ["normal"], + "axes": [ + { + "tag": "wdth", + "min": 25, + "max": 200, + "defaultValue": 100 + }, + { + "tag": "wght", + "min": 4, + "max": 1000, + "defaultValue": 400 + } + ], + "subsets": [] + }, "Lisu Bosa": { "weights": ["200", "300", "400", "500", "600", "700", "800", "900"], "styles": ["normal", "italic"], @@ -7510,7 +7565,7 @@ "Noto Sans Caucasian Albanian": { "weights": ["400"], "styles": ["normal"], - "subsets": ["caucasian-albanian"] + "subsets": ["caucasian-albanian", "latin", "latin-ext"] }, "Noto Sans Chakma": { "weights": ["400"], @@ -7681,7 +7736,7 @@ "Noto Sans Elymaic": { "weights": ["400"], "styles": ["normal"], - "subsets": ["elymaic"] + "subsets": ["elymaic", "latin", "latin-ext"] }, "Noto Sans Ethiopic": { "weights": [ @@ -8024,6 +8079,19 @@ ], "subsets": ["kannada", "latin", "latin-ext"] }, + "Noto Sans Kawi": { + "weights": ["400", "500", "600", "700", "variable"], + "styles": ["normal"], + "axes": [ + { + "tag": "wght", + "min": 400, + "max": 700, + "defaultValue": 400 + } + ], + "subsets": ["kawi", "latin", "latin-ext"] + }, "Noto Sans Kayah Li": { "weights": ["400", "500", "600", "700", "variable"], "styles": ["normal"], @@ -9527,6 +9595,11 @@ ], "subsets": ["latin", "nyiakeng-puachue-hmong"] }, + "Noto Serif Old Uyghur": { + "weights": ["400"], + "styles": ["normal"], + "subsets": ["latin", "latin-ext", "old-uyghur"] + }, "Noto Serif Oriya": { "weights": ["400", "500", "600", "700", "variable"], "styles": ["normal"], @@ -11921,7 +11994,7 @@ "Shanti": { "weights": ["400"], "styles": ["normal"], - "subsets": ["latin"] + "subsets": ["latin", "latin-ext"] }, "Share": { "weights": ["400", "700"], @@ -13452,6 +13525,7 @@ "700", "800", "900", + "1000", "variable" ], "styles": ["normal"], @@ -13470,12 +13544,12 @@ }, { "tag": "wght", - "min": 100, - "max": 900, + "min": 4, + "max": 1000, "defaultValue": 400 } ], - "subsets": ["latin", "latin-ext"] + "subsets": [] }, "Wellfleet": { "weights": ["400"], diff --git a/packages/font/src/google/index.ts b/packages/font/src/google/index.ts index 2269aa0cb8abf..41853e6a833d5 100644 --- a/packages/font/src/google/index.ts +++ b/packages/font/src/google/index.ts @@ -190,6 +190,18 @@ export declare function Advent_Pro< subsets?: Array<'cyrillic' | 'cyrillic-ext' | 'greek' | 'latin' | 'latin-ext'> axes?: 'wdth'[] }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Agbalumo< + T extends CssVariable | undefined = undefined +>(options: { + weight: '400' | Array<'400'> + style?: 'normal' | Array<'normal'> + display?: Display + variable?: T + preload?: boolean + fallback?: string[] + adjustFontFallback?: boolean + subsets?: Array<'cyrillic-ext' | 'latin' | 'latin-ext' | 'vietnamese'> +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Agdasima< T extends CssVariable | undefined = undefined >(options: { @@ -2913,14 +2925,17 @@ export declare function Bilbo_Swash_Caps< }): T extends undefined ? NextFont : NextFontWithVariable export declare function BioRhyme< T extends CssVariable | undefined = undefined ->(options: { - weight: +>(options?: { + weight?: | '200' | '300' | '400' + | '500' + | '600' | '700' | '800' - | Array<'200' | '300' | '400' | '700' | '800'> + | 'variable' + | Array<'200' | '300' | '400' | '500' | '600' | '700' | '800'> style?: 'normal' | Array<'normal'> display?: Display variable?: T @@ -2928,6 +2943,7 @@ export declare function BioRhyme< fallback?: string[] adjustFontFallback?: boolean subsets?: Array<'latin' | 'latin-ext'> + axes?: 'wdth'[] }): T extends undefined ? NextFont : NextFontWithVariable export declare function BioRhyme_Expanded< T extends CssVariable | undefined = undefined @@ -9660,6 +9676,18 @@ export declare function Kavoon< adjustFontFallback?: boolean subsets?: Array<'latin' | 'latin-ext'> }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Kay_Pho_Du< + T extends CssVariable | undefined = undefined +>(options: { + weight: '400' | '500' | '600' | '700' | Array<'400' | '500' | '600' | '700'> + style?: 'normal' | Array<'normal'> + display?: Display + variable?: T + preload?: boolean + fallback?: string[] + adjustFontFallback?: boolean + subsets?: Array<'kayah-li' | 'latin' | 'latin-ext'> +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Kdam_Thmor_Pro< T extends CssVariable | undefined = undefined >(options: { @@ -10849,6 +10877,42 @@ export declare function Linden_Hill< adjustFontFallback?: boolean subsets?: Array<'latin'> }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Linefont< + T extends CssVariable | undefined = undefined +>(options?: { + weight?: + | '100' + | '200' + | '300' + | '400' + | '500' + | '600' + | '700' + | '800' + | '900' + | '1000' + | 'variable' + | Array< + | '100' + | '200' + | '300' + | '400' + | '500' + | '600' + | '700' + | '800' + | '900' + | '1000' + > + style?: 'normal' | Array<'normal'> + display?: Display + variable?: T + + fallback?: string[] + adjustFontFallback?: boolean + + axes?: 'wdth'[] +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Lisu_Bosa< T extends CssVariable | undefined = undefined >(options: { @@ -13611,7 +13675,7 @@ export declare function Noto_Sans_Caucasian_Albanian< preload?: boolean fallback?: string[] adjustFontFallback?: boolean - subsets?: Array<'caucasian-albanian'> + subsets?: Array<'caucasian-albanian' | 'latin' | 'latin-ext'> }): T extends undefined ? NextFont : NextFontWithVariable export declare function Noto_Sans_Chakma< T extends CssVariable | undefined = undefined @@ -13853,7 +13917,7 @@ export declare function Noto_Sans_Elymaic< preload?: boolean fallback?: string[] adjustFontFallback?: boolean - subsets?: Array<'elymaic'> + subsets?: Array<'elymaic' | 'latin' | 'latin-ext'> }): T extends undefined ? NextFont : NextFontWithVariable export declare function Noto_Sans_Ethiopic< T extends CssVariable | undefined = undefined @@ -14260,6 +14324,24 @@ export declare function Noto_Sans_Kannada< subsets?: Array<'kannada' | 'latin' | 'latin-ext'> axes?: 'wdth'[] }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Noto_Sans_Kawi< + T extends CssVariable | undefined = undefined +>(options?: { + weight?: + | '400' + | '500' + | '600' + | '700' + | 'variable' + | Array<'400' | '500' | '600' | '700'> + style?: 'normal' | Array<'normal'> + display?: Display + variable?: T + preload?: boolean + fallback?: string[] + adjustFontFallback?: boolean + subsets?: Array<'kawi' | 'latin' | 'latin-ext'> +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Noto_Sans_Kayah_Li< T extends CssVariable | undefined = undefined >(options?: { @@ -16391,6 +16473,18 @@ export declare function Noto_Serif_NP_Hmong< adjustFontFallback?: boolean subsets?: Array<'latin' | 'nyiakeng-puachue-hmong'> }): T extends undefined ? NextFont : NextFontWithVariable +export declare function Noto_Serif_Old_Uyghur< + T extends CssVariable | undefined = undefined +>(options: { + weight: '400' | Array<'400'> + style?: 'normal' | Array<'normal'> + display?: Display + variable?: T + preload?: boolean + fallback?: string[] + adjustFontFallback?: boolean + subsets?: Array<'latin' | 'latin-ext' | 'old-uyghur'> +}): T extends undefined ? NextFont : NextFontWithVariable export declare function Noto_Serif_Oriya< T extends CssVariable | undefined = undefined >(options?: { @@ -20483,7 +20577,7 @@ export declare function Shanti< preload?: boolean fallback?: string[] adjustFontFallback?: boolean - subsets?: Array<'latin'> + subsets?: Array<'latin' | 'latin-ext'> }): T extends undefined ? NextFont : NextFontWithVariable export declare function Share< T extends CssVariable | undefined = undefined @@ -23238,17 +23332,27 @@ export declare function Wavefont< | '700' | '800' | '900' + | '1000' | 'variable' | Array< - '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' + | '100' + | '200' + | '300' + | '400' + | '500' + | '600' + | '700' + | '800' + | '900' + | '1000' > style?: 'normal' | Array<'normal'> display?: Display variable?: T - preload?: boolean + fallback?: string[] adjustFontFallback?: boolean - subsets?: Array<'latin' | 'latin-ext'> + axes?: ('ROND' | 'YELA')[] }): T extends undefined ? NextFont : NextFontWithVariable export declare function Wellfleet< From d88d8aed36c068d2c1520a3901b02224ec329d38 Mon Sep 17 00:00:00 2001 From: Tarik <112902780+tariknh@users.noreply.github.com> Date: Mon, 30 Oct 2023 01:48:12 +0100 Subject: [PATCH 15/30] Typo fix, version "13" to "14" (#57723) Typo fix --- .../01-building-your-application/08-upgrading/03-version-14.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/03-pages/01-building-your-application/08-upgrading/03-version-14.mdx b/docs/03-pages/01-building-your-application/08-upgrading/03-version-14.mdx index 1b43956e8446e..c5fcaf32a88cd 100644 --- a/docs/03-pages/01-building-your-application/08-upgrading/03-version-14.mdx +++ b/docs/03-pages/01-building-your-application/08-upgrading/03-version-14.mdx @@ -5,7 +5,7 @@ description: Upgrade your Next.js Application from Version 13 to 14. ## Upgrading from 13 to 14 -To update to Next.js version 13, run the following command using your preferred package manager: +To update to Next.js version 14, run the following command using your preferred package manager: ```bash filename="Terminal" npm i next@latest react@latest react-dom@latest eslint-config-next@latest From 24a71dcd72fd367d415367671efe6eff4d833471 Mon Sep 17 00:00:00 2001 From: Dak Washbrook Date: Sun, 29 Oct 2023 17:59:47 -0700 Subject: [PATCH 16/30] Support viewport export via TS Plugin (#57554) ### What? The Next.js TS Plugin generally supports the named exports for the pages and layouts. Currently the TS Plugin doesn't support the new viewport export. See: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#use-viewport-export ### How? Added the `viewport` export to the `constants.ts`. Closes #57680 --- packages/next/src/server/typescript/constant.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/next/src/server/typescript/constant.ts b/packages/next/src/server/typescript/constant.ts index d200e80e3cfec..0622bc3f13674 100644 --- a/packages/next/src/server/typescript/constant.ts +++ b/packages/next/src/server/typescript/constant.ts @@ -15,6 +15,8 @@ export const ALLOWED_EXPORTS = [ 'generateStaticParams', 'metadata', 'generateMetadata', + 'viewport', + 'generateViewport', ] export const LEGACY_CONFIG_EXPORT = 'config' From 3248ee71c8e3b4c329e60aec9d8f550612a9ab0a Mon Sep 17 00:00:00 2001 From: Niaz Morshed Nayeem Date: Mon, 30 Oct 2023 08:15:11 +0600 Subject: [PATCH 17/30] Fix: Build compilation warning when using middleware (#57685) ### Fixing a bug - Related issues linked using `fixes #57533` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### What? If there is a `middleware.js` or `middleware.ts` file in Next.JS 14, running `next build` shows the following warning: ``` ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js A Node.js module is loaded ('url' at line 3) which is not supported in the Edge Runtime. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime Import trace for requested module: ./node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js ``` This PR will remove the warning. Closes NEXT- Fixes #57533 --- packages/next/src/shared/lib/router/utils/app-paths.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/next/src/shared/lib/router/utils/app-paths.ts b/packages/next/src/shared/lib/router/utils/app-paths.ts index 541fbdc398866..60402b1deb36b 100644 --- a/packages/next/src/shared/lib/router/utils/app-paths.ts +++ b/packages/next/src/shared/lib/router/utils/app-paths.ts @@ -1,6 +1,5 @@ import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash' import { isGroupSegment } from '../../segment' -import { parse, format } from 'url' /** * Normalizes an app route so it represents the actual request path. Essentially @@ -70,12 +69,12 @@ export function normalizeRscURL(url: string) { * @param url the url to normalize */ export function normalizePostponedURL(url: string) { - const parsed = parse(url) - let { pathname } = parsed + const parsed = new URL(url) + const { pathname } = parsed if (pathname && pathname.startsWith('/_next/postponed')) { - pathname = pathname.substring('/_next/postponed'.length) || '/' + parsed.pathname = pathname.substring('/_next/postponed'.length) || '/' - return format({ ...parsed, pathname }) + return parsed.toString() } return url From 8dbf4e616dc76fead49d0b629e1b83850f30b53c Mon Sep 17 00:00:00 2001 From: AZM Date: Tue, 31 Oct 2023 00:31:59 +0900 Subject: [PATCH 18/30] chore: Update flight-client-entry-plugin.ts typo (#57734) Updated typo --- .../src/build/webpack/plugins/flight-client-entry-plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts b/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts index 42f61cd32fa75..ee62a55b7bcbc 100644 --- a/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts +++ b/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts @@ -197,7 +197,7 @@ export class FlightClientEntryPlugin { const modPath = mod.matchResource || mod.resourceResolveData?.path const modQuery = mod.resourceResolveData?.query || '' // query is already part of mod.resource - // so it's only neccessary to add it for matchResource or mod.resourceResolveData + // so it's only necessary to add it for matchResource or mod.resourceResolveData const modResource = modPath ? modPath + modQuery : mod.resource if (mod.layer !== WEBPACK_LAYERS.serverSideRendering) { From a07e0de64fcde7d53620a41914e63ae9663a680a Mon Sep 17 00:00:00 2001 From: Alexandre Spehler Date: Mon, 30 Oct 2023 09:11:48 -0700 Subject: [PATCH 19/30] Fix Google Tag Manager URL in Third Party Libraries documentation (#57731) ## Description Updating the URL for the Google Tag Manager in the Next.js documentation for [Third Party Libraries](https://nextjs.org/docs/pages/building-your-application/optimizing/third-party-libraries). We were using https://developers.google.com/maps/documentation/embed/embedding-map, which redirected to the documentation for embedding Google Maps. ## Implementation - Replacing https://developers.google.com/maps/documentation/embed/embedding-map by https://developers.google.com/tag-platform/tag-manager --- .../06-optimizing/10-third-party-libraries.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx b/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx index e4fe3ed67dab2..b82cce869d257 100644 --- a/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx +++ b/docs/02-app/01-building-your-application/06-optimizing/10-third-party-libraries.mdx @@ -30,7 +30,7 @@ All supported third-party libraries from Google can be imported from `@next/thir ### Google Tag Manager The `GoogleTagManager` component can be used to instantiate a [Google Tag -Manager](https://developers.google.com/maps/documentation/embed/embedding-map) container to your +Manager](https://developers.google.com/tag-platform/tag-manager) container to your page. By default, it fetches the original inline script after hydration occurs on the page. From 3553c6516d7a9aba98876f9660af0ee7c94dc2a3 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Mon, 30 Oct 2023 17:36:24 +0100 Subject: [PATCH 20/30] Improve error for missing default export in dynamic metadata routes (#57711) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Displaying hints of "missing default export" if you didn't properly export the `default` handler for og image ``` ▲ Next.js 14.0.1-canary.2 - Local: http://localhost:3000 ✓ Ready in 1089ms ✓ Compiled /opengraph-image/[[...__metadata_id__]]/route in 211ms (44 modules) ⨯ Error: Default export is missing in "/Users/huozhi/workspace/next.js/test/e2e/app-dir/metadata-dynam ic-routes/app/opengraph-image.tsx" at eval (webpack:///app/opengraph-image.tsx?3407:11:1) at (app-metadata-route)/../../../../packages/next/dist/build/webpack/loaders/next-metadata-route-lo ader.js?page=%2Fopengraph-image%2F%5B%5B...__metadata_id__%5D%5D%2Froute&isDynamic=1!./app/opengraph-im age.tsx?__next_metadata_route__ (/Users/huozhi/workspace/next.js/test/e2e/app-dir/metadata-dynamic-rout es/.next/server/app/opengraph-image/[[...__metadata_id__]]/route.js:362:1) at __webpack_require__ (/Users/huozhi/workspace/next.js/test/e2e/app-dir/metadata-dynamic-routes/.n ext/server/webpack-runtime.js:33:42) ``` --- .../loaders/next-metadata-route-loader.ts | 16 +++++++++++ .../metadata-dynamic-routes/index.test.ts | 27 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/packages/next/src/build/webpack/loaders/next-metadata-route-loader.ts b/packages/next/src/build/webpack/loaders/next-metadata-route-loader.ts index a566eb3d2e7bc..f66bd2d3912c7 100644 --- a/packages/next/src/build/webpack/loaders/next-metadata-route-loader.ts +++ b/packages/next/src/build/webpack/loaders/next-metadata-route-loader.ts @@ -3,6 +3,16 @@ import fs from 'fs' import path from 'path' import { imageExtMimeTypeMap } from '../../../lib/mime-type' +function errorOnBadHandler(resourcePath: string) { + return ` + if (typeof handler !== 'function') { + throw new Error('Default export is missing in ${JSON.stringify( + resourcePath + )}') + } + ` +} + const cacheHeader = { none: 'no-cache, no-store', longCache: 'public, immutable, no-transform, max-age=31536000', @@ -78,6 +88,8 @@ import { resolveRouteData } from 'next/dist/build/webpack/loaders/metadata/resol const contentType = ${JSON.stringify(getContentType(resourcePath))} const fileType = ${JSON.stringify(getFilenameAndExtension(resourcePath).name)} +${errorOnBadHandler(resourcePath)} + export async function GET() { const data = await handler() const content = resolveRouteData(data, fileType) @@ -103,6 +115,8 @@ const imageModule = { ...userland } const handler = imageModule.default const generateImageMetadata = imageModule.generateImageMetadata +${errorOnBadHandler(resourcePath)} + export async function GET(_, ctx) { const { __metadata_id__ = [], ...params } = ctx.params || {} const targetId = __metadata_id__[0] @@ -160,6 +174,8 @@ const generateSitemaps = sitemapModule.generateSitemaps const contentType = ${JSON.stringify(getContentType(resourcePath))} const fileType = ${JSON.stringify(getFilenameAndExtension(resourcePath).name)} +${errorOnBadHandler(resourcePath)} + ${'' /* re-export the userland route configs */} export * from ${JSON.stringify(resourcePath)} diff --git a/test/e2e/app-dir/metadata-dynamic-routes/index.test.ts b/test/e2e/app-dir/metadata-dynamic-routes/index.test.ts index 60c77d18241b3..188575f9ae6d0 100644 --- a/test/e2e/app-dir/metadata-dynamic-routes/index.test.ts +++ b/test/e2e/app-dir/metadata-dynamic-routes/index.test.ts @@ -497,6 +497,33 @@ createNextDescribe( await next.fetch('/metadata-base/unset/sitemap.xml/0') } }) + + it('should error if the default export of dynamic image is missing', async () => { + const ogImageFilePath = 'app/opengraph-image.tsx' + const ogImageFileContent = await next.readFile(ogImageFilePath) + const ogImageFileContentWithoutDefaultExport = + ogImageFileContent.replace( + 'export default function', + 'export function' + ) + + try { + await next.patchFile( + ogImageFilePath, + ogImageFileContentWithoutDefaultExport + ) + const currentNextCliOutputLength = next.cliOutput.length + + await check(async () => { + await next.fetch('/opengraph-image') + const output = next.cliOutput.slice(currentNextCliOutputLength) + expect(output).toContain(`Default export is missing in`) + return 'success' + }, /success/) + } finally { + await next.patchFile(ogImageFilePath, ogImageFileContent) + } + }) } if (isNextStart) { From 9128b58654fdb7e07a909d6e8b742c28aed78a21 Mon Sep 17 00:00:00 2001 From: Zack Tanner Date: Mon, 30 Oct 2023 10:24:51 -0700 Subject: [PATCH 21/30] fix gsp tracing issue (#57766) This removes the ignores for dev react bundles which was added as an optimization but causes issues when react is imported from an ESM module since all requires are being analyzed for named exports. Fixes #57582 --- .../next/src/build/collect-build-traces.ts | 2 +- test/e2e/app-dir/app/standalone-gsp.test.ts | 88 +++++++++++++++++++ 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 test/e2e/app-dir/app/standalone-gsp.test.ts diff --git a/packages/next/src/build/collect-build-traces.ts b/packages/next/src/build/collect-build-traces.ts index 4a38017e52f98..9dde7a2952035 100644 --- a/packages/next/src/build/collect-build-traces.ts +++ b/packages/next/src/build/collect-build-traces.ts @@ -266,7 +266,6 @@ export async function collectBuildTraces({ const sharedIgnores = [ '**/next/dist/compiled/next-server/**/*.dev.js', - '**/node_modules/react{,-dom,-dom-server-turbopack}/**/*.development.js', isStandalone ? null : '**/next/dist/compiled/jest-worker/**/*', '**/next/dist/compiled/webpack/(bundle4|bundle5).js', '**/node_modules/webpack5/**/*', @@ -294,6 +293,7 @@ export async function collectBuildTraces({ const serverIgnores = [ ...sharedIgnores, + '**/node_modules/react{,-dom,-dom-server-turbopack}/**/*.development.js', '**/*.d.ts', '**/*.map', '**/next/dist/pages/**/*', diff --git a/test/e2e/app-dir/app/standalone-gsp.test.ts b/test/e2e/app-dir/app/standalone-gsp.test.ts new file mode 100644 index 0000000000000..99a281078ac58 --- /dev/null +++ b/test/e2e/app-dir/app/standalone-gsp.test.ts @@ -0,0 +1,88 @@ +import { createNextDescribe } from 'e2e-utils' +import fs from 'fs-extra' +import os from 'os' +import path from 'path' +import { + findPort, + initNextServerScript, + killApp, + fetchViaHTTP, +} from 'next-test-utils' + +if (!(globalThis as any).isNextStart) { + it('should skip for non-next start', () => {}) +} else { + createNextDescribe( + 'output: standalone with getStaticProps', + { + files: __dirname, + skipStart: true, + dependencies: { + swr: 'latest', + }, + }, + ({ next }) => { + beforeAll(async () => { + await next.patchFile( + 'next.config.js', + (await next.readFile('next.config.js')).replace('// output', 'output') + ) + + await next.patchFile( + 'pages/gsp.js', + ` + import useSWR from 'swr' + + console.log(useSWR) + + export default function Home() { + return

Hello

+ } + + export async function getStaticProps() { + return { + props: { + foo: "bar", + }, + }; + } + ` + ) + + await next.start() + }) + + it('should work correctly with output standalone', async () => { + const tmpFolder = path.join( + os.tmpdir(), + 'next-standalone-' + Date.now() + ) + await fs.move(path.join(next.testDir, '.next/standalone'), tmpFolder) + let server: any + + try { + const testServer = path.join(tmpFolder, 'server.js') + const appPort = await findPort() + server = await initNextServerScript( + testServer, + /- Local:/, + { + ...process.env, + PORT: appPort.toString(), + }, + undefined, + { + cwd: tmpFolder, + } + ) + + const res = await fetchViaHTTP(appPort, '/gsp') + expect(res.status).toBe(200) + } finally { + if (server) await killApp(server) + await fs.remove(tmpFolder) + } + }) + } + ) +} From 9d49afc5eab088209c8142f3f2a3886db78d2a2f Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Mon, 30 Oct 2023 17:29:15 +0000 Subject: [PATCH 22/30] v14.0.1-canary.4 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/eslint-config-next/package.json | 4 ++-- packages/eslint-plugin-next/package.json | 2 +- packages/font/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-codemod/package.json | 2 +- packages/next-env/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-storybook/package.json | 2 +- packages/next-polyfill-module/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next-swc/package.json | 2 +- packages/next/package.json | 14 +++++++------- packages/react-dev-overlay/package.json | 2 +- packages/react-refresh-utils/package.json | 2 +- packages/third-parties/package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++-------- 18 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lerna.json b/lerna.json index bba2f8622adda..53733075a77f7 100644 --- a/lerna.json +++ b/lerna.json @@ -16,5 +16,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "14.0.1-canary.3" + "version": "14.0.1-canary.4" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 4b9327c88e92c..54a24f07cf343 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "keywords": [ "react", "next", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 06157f0301728..4573f581c9962 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "description": "ESLint configuration used by Next.js.", "main": "index.js", "license": "MIT", @@ -10,7 +10,7 @@ }, "homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config", "dependencies": { - "@next/eslint-plugin-next": "14.0.1-canary.3", + "@next/eslint-plugin-next": "14.0.1-canary.4", "@rushstack/eslint-patch": "^1.3.3", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", "eslint-import-resolver-node": "^0.3.6", diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 8065635ddb117..4cf70ffe104da 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "description": "ESLint plugin for Next.js.", "main": "dist/index.js", "license": "MIT", diff --git a/packages/font/package.json b/packages/font/package.json index e99f9617060c5..2fb238621ca93 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@next/font", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 02d772ff94c18..c1bc66b9aab3b 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index 9c4f1d542e339..4d955fdfc28dd 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index c61759ca17588..5333dac24528a 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 78eff4297d338..e40e9975976c2 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index 9e07195a002c7..d55ee77a49254 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index 893e9bbb78eaa..d2bfb047704f9 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 7e4de4b2cf7d8..5478499cced6f 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index 321ca4627458c..7879d8f99bc95 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "private": true, "scripts": { "clean": "node ../../scripts/rm.mjs native", diff --git a/packages/next/package.json b/packages/next/package.json index e1ca719bc4add..97b82f6927250 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -92,7 +92,7 @@ ] }, "dependencies": { - "@next/env": "14.0.1-canary.3", + "@next/env": "14.0.1-canary.4", "@swc/helpers": "0.5.2", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", @@ -146,11 +146,11 @@ "@mswjs/interceptors": "0.23.0", "@napi-rs/cli": "2.16.2", "@napi-rs/triples": "1.1.0", - "@next/polyfill-module": "14.0.1-canary.3", - "@next/polyfill-nomodule": "14.0.1-canary.3", - "@next/react-dev-overlay": "14.0.1-canary.3", - "@next/react-refresh-utils": "14.0.1-canary.3", - "@next/swc": "14.0.1-canary.3", + "@next/polyfill-module": "14.0.1-canary.4", + "@next/polyfill-nomodule": "14.0.1-canary.4", + "@next/react-dev-overlay": "14.0.1-canary.4", + "@next/react-refresh-utils": "14.0.1-canary.4", + "@next/swc": "14.0.1-canary.4", "@opentelemetry/api": "1.4.1", "@playwright/test": "^1.35.1", "@taskr/clear": "1.1.0", diff --git a/packages/react-dev-overlay/package.json b/packages/react-dev-overlay/package.json index 537c67c2af522..bd2c1432dceb6 100644 --- a/packages/react-dev-overlay/package.json +++ b/packages/react-dev-overlay/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-dev-overlay", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "description": "A development-only overlay for developing React applications.", "repository": { "url": "vercel/next.js", diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index ac617d432b577..b5efeec74562f 100644 --- a/packages/react-refresh-utils/package.json +++ b/packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-refresh-utils", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "description": "An experimental package providing utilities for React Refresh.", "repository": { "url": "vercel/next.js", diff --git a/packages/third-parties/package.json b/packages/third-parties/package.json index 557993106692f..7d4df7d51f871 100644 --- a/packages/third-parties/package.json +++ b/packages/third-parties/package.json @@ -1,6 +1,6 @@ { "name": "@next/third-parties", - "version": "14.0.1-canary.3", + "version": "14.0.1-canary.4", "repository": { "url": "vercel/next.js", "directory": "packages/third-parties" @@ -22,7 +22,7 @@ "third-party-capital": "1.0.20" }, "devDependencies": { - "next": "14.0.1-canary.3", + "next": "14.0.1-canary.4", "outdent": "0.8.0", "prettier": "2.5.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ea39243e210d8..3344813f7ddab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,7 +735,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 14.0.1-canary.3 + specifier: 14.0.1-canary.4 version: link:../eslint-plugin-next '@rushstack/eslint-patch': specifier: ^1.3.3 @@ -796,7 +796,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 14.0.1-canary.3 + specifier: 14.0.1-canary.4 version: link:../next-env '@swc/helpers': specifier: 0.5.2 @@ -920,19 +920,19 @@ importers: specifier: 1.1.0 version: 1.1.0 '@next/polyfill-module': - specifier: 14.0.1-canary.3 + specifier: 14.0.1-canary.4 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 14.0.1-canary.3 + specifier: 14.0.1-canary.4 version: link:../next-polyfill-nomodule '@next/react-dev-overlay': - specifier: 14.0.1-canary.3 + specifier: 14.0.1-canary.4 version: link:../react-dev-overlay '@next/react-refresh-utils': - specifier: 14.0.1-canary.3 + specifier: 14.0.1-canary.4 version: link:../react-refresh-utils '@next/swc': - specifier: 14.0.1-canary.3 + specifier: 14.0.1-canary.4 version: link:../next-swc '@opentelemetry/api': specifier: 1.4.1 @@ -1583,7 +1583,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 14.0.1-canary.3 + specifier: 14.0.1-canary.4 version: link:../next outdent: specifier: 0.8.0 From 6dc7c3c4363276ac05ac2c08f12384b391fa9fd2 Mon Sep 17 00:00:00 2001 From: Leah Date: Mon, 30 Oct 2023 18:44:02 +0100 Subject: [PATCH 23/30] fix(turbopack): don't match empty route groups (#57647) ### What? Previously the matching just used the last match for children which could lead to empty groups or groups without page matches overriding the actual page. This PR makes sure this doesn't happen and emits an issue (which unfortunately doesn't get displayed yet) in case there are 2 `page` matches which would go into the children slot. Closes WEB-1895 --- .../crates/next-core/src/app_structure.rs | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/packages/next-swc/crates/next-core/src/app_structure.rs b/packages/next-swc/crates/next-core/src/app_structure.rs index 27b6f09c355c7..3e028e64d39bc 100644 --- a/packages/next-swc/crates/next-core/src/app_structure.rs +++ b/packages/next-swc/crates/next-core/src/app_structure.rs @@ -400,6 +400,25 @@ pub struct LoaderTree { pub global_metadata: Vc, } +#[turbo_tasks::value_impl] +impl LoaderTree { + /// Returns true if there's a page match in this loader tree. + #[turbo_tasks::function] + pub async fn has_page(&self) -> Result> { + if self.segment == "__PAGE__" { + return Ok(Vc::cell(true)); + } + + for (_, tree) in &self.parallel_routes { + if *tree.has_page().await? { + return Ok(Vc::cell(true)); + } + } + + Ok(Vc::cell(false)) + } +} + #[derive( Clone, PartialEq, Eq, Serialize, Deserialize, TraceRawVcs, ValueDebugFormat, Debug, TaskInput, )] @@ -425,6 +444,10 @@ fn is_parallel_route(name: &str) -> bool { name.starts_with('@') } +fn is_group_route(name: &str) -> bool { + name.starts_with('(') && name.ends_with(')') +} + fn match_parallel_route(name: &str) -> Option<&str> { name.strip_prefix('@') } @@ -677,14 +700,10 @@ async fn directory_tree_to_loader_tree( tree.segment = "children".to_string(); } - let mut has_page = false; - if let Some(page) = (app_path == for_app_path) .then_some(components.page) .flatten() { - has_page = true; - // When resolving metadata with corresponding module // (https://github.com/vercel/next.js/blob/aa1ee5995cdd92cc9a2236ce4b6aa2b67c9d32b2/packages/next/src/lib/metadata/resolve-metadata.ts#L340) // layout takes precedence over page (https://github.com/vercel/next.js/blob/aa1ee5995cdd92cc9a2236ce4b6aa2b67c9d32b2/packages/next/src/server/lib/app-dir-module.ts#L22) @@ -751,9 +770,26 @@ async fn directory_tree_to_loader_tree( continue; } - // TODO: detect duplicate page in group segment - if !has_page { + // skip groups which don't have a page match. + if is_group_route(subdir_name) && !*subtree.has_page().await? { + continue; + } + + if !tree.parallel_routes.contains_key("children") { tree.parallel_routes.insert("children".to_string(), subtree); + } else { + // TODO: improve error message to have the full paths + DirectoryTreeIssue { + app_dir, + message: Vc::cell(format!( + "You cannot have two parallel pages that resolve to the same path. Route \ + {} has multiple matches in {}", + for_app_path, app_page + )), + severity: IssueSeverity::Error.cell(), + } + .cell() + .emit(); } } else if let Some(key) = parallel_route_key { bail!( @@ -772,7 +808,7 @@ async fn directory_tree_to_loader_tree( ..Default::default() } .cell(); - } else if components.layout.is_some() || current_level_is_parallel_route { + } else if current_level_is_parallel_route { // default fallback component tree.components = Components { default: Some( From 0623a4f79fb5521cd21b464f1895485553f3b658 Mon Sep 17 00:00:00 2001 From: moka-ayumu <10963468+moka-ayumu@users.noreply.github.com> Date: Tue, 31 Oct 2023 02:54:28 +0900 Subject: [PATCH 24/30] Modify tailwindcss related dependency of `create-next-app` (#57262) ### What? If the version of `autoprefixer` is 10.0.0 and the version of `tailwindcss` is less than 3.3.0, the error `RangeError: Maximum call stack size exceeded` occurs when you create with tailwindcss & typescript and run it. ### Why? The exact reason is unknown, but it appears to be a compatibility issue. Also, currently configuring tailwindcss with ts makes the tailwind config file in ts, which is supported since tailwindcss version 3.3.0. (In js, it works even if you set the version of `autoprefixer` to 10.0.1 and lower the version of tailwindcss.) ### How? Simply default the minimum version of `autoprefixer` to 10.0.1 and the minimum version of `tailwindcss` to 3.3.0. --- packages/create-next-app/templates/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/create-next-app/templates/index.ts b/packages/create-next-app/templates/index.ts index 0acc200fee636..166309f937e18 100644 --- a/packages/create-next-app/templates/index.ts +++ b/packages/create-next-app/templates/index.ts @@ -209,9 +209,9 @@ export const installTemplate = async ({ if (tailwind) { packageJson.devDependencies = { ...packageJson.devDependencies, - autoprefixer: '^10', + autoprefixer: '^10.0.1', postcss: '^8', - tailwindcss: '^3', + tailwindcss: '^3.3.0', } } From 676d1ee4ceaffd1e8a91fdb8f1c69d1ae7af24f4 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 30 Oct 2023 11:03:48 -0700 Subject: [PATCH 25/30] Remove extra CI step and lock Node.js version (#57769) Seems this command is causing intermittent issues and we don't actually need this information so removes it --- .github/workflows/build_reusable.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build_reusable.yml b/.github/workflows/build_reusable.yml index 87ad391ddb36d..9b4e6cb8074a1 100644 --- a/.github/workflows/build_reusable.yml +++ b/.github/workflows/build_reusable.yml @@ -61,7 +61,7 @@ on: env: NAPI_CLI_VERSION: 2.14.7 TURBO_VERSION: 1.10.9 - NODE_LTS_VERSION: 20 + NODE_LTS_VERSION: 20.9.0 TEST_CONCURRENCY: 8 # disable backtrace for test snapshots RUST_BACKTRACE: 0 @@ -165,8 +165,6 @@ jobs: - run: git checkout . if: ${{ inputs.skipInstallBuild != 'yes' }} - - run: pnpm store path - - run: pnpm install if: ${{ inputs.skipInstallBuild != 'yes' }} From e26c9011d6ccf01ca03ea9da51677c2f8163d28b Mon Sep 17 00:00:00 2001 From: Josh Story Date: Mon, 30 Oct 2023 11:31:38 -0700 Subject: [PATCH 26/30] Update React from 8c8ee9ee6 to 0c6348758 and types (#57772) Update React from 8c8ee9ee6 to 0c6348758 - https://github.com/facebook/react/pull/27627 - https://github.com/facebook/react/pull/27624 - https://github.com/facebook/react/pull/27610 - https://github.com/facebook/react/pull/27592 - https://github.com/facebook/react/pull/27593 - https://github.com/facebook/react/pull/27588 - https://github.com/facebook/react/pull/27591 - https://github.com/facebook/react/pull/27587 Update @types/react to 18.2.33 Update @types/react-dom to 18.2.14 --- package.json | 28 ++-- packages/next/package.json | 4 +- ...t-dom-server-legacy.browser.development.js | 2 +- ...om-server-legacy.browser.production.min.js | 2 +- ...eact-dom-server-legacy.node.development.js | 2 +- ...t-dom-server-legacy.node.production.min.js | 2 +- ...t-dom-server-rendering-stub.development.js | 2 +- ...om-server-rendering-stub.production.min.js | 2 +- .../react-dom-server.browser.development.js | 2 +- ...react-dom-server.browser.production.min.js | 2 +- .../cjs/react-dom-server.edge.development.js | 2 +- .../react-dom-server.edge.production.min.js | 2 +- .../cjs/react-dom-server.node.development.js | 2 +- .../react-dom-server.node.production.min.js | 2 +- .../react-dom-unstable_testing.development.js | 4 +- ...act-dom-unstable_testing.production.min.js | 8 +- .../cjs/react-dom.development.js | 4 +- .../cjs/react-dom.production.min.js | 8 +- .../cjs/react-dom.profiling.min.js | 8 +- .../react-dom-experimental/package.json | 4 +- ...t-dom-server-legacy.browser.development.js | 2 +- ...om-server-legacy.browser.production.min.js | 2 +- ...eact-dom-server-legacy.node.development.js | 2 +- ...t-dom-server-legacy.node.production.min.js | 2 +- ...t-dom-server-rendering-stub.development.js | 2 +- ...om-server-rendering-stub.production.min.js | 2 +- .../react-dom-server.browser.development.js | 2 +- ...react-dom-server.browser.production.min.js | 2 +- .../cjs/react-dom-server.edge.development.js | 2 +- .../react-dom-server.edge.production.min.js | 2 +- .../cjs/react-dom-server.node.development.js | 2 +- .../react-dom-server.node.production.min.js | 2 +- .../react-dom/cjs/react-dom.development.js | 4 +- .../react-dom/cjs/react-dom.production.min.js | 8 +- .../react-dom/cjs/react-dom.profiling.min.js | 8 +- .../next/src/compiled/react-dom/package.json | 4 +- .../cjs/react.development.js | 2 +- .../cjs/react.production.min.js | 2 +- .../cjs/react.shared-subset.development.js | 2 +- .../cjs/react.shared-subset.production.min.js | 2 +- .../package.json | 4 +- .../react-server-dom-turbopack/package.json | 4 +- .../package.json | 4 +- .../react-server-dom-webpack/package.json | 4 +- .../compiled/react/cjs/react.development.js | 2 +- .../react/cjs/react.production.min.js | 2 +- .../cjs/react.shared-subset.development.js | 2 +- .../cjs/react.shared-subset.production.min.js | 2 +- pnpm-lock.yaml | 146 +++++++++--------- 49 files changed, 159 insertions(+), 159 deletions(-) diff --git a/package.json b/package.json index bb26f1d70949e..a720dbb32bc60 100644 --- a/package.json +++ b/package.json @@ -100,8 +100,8 @@ "@types/jest": "29.5.5", "@types/node": "20.2.5", "@types/node-fetch": "2.6.1", - "@types/react": "18.2.28", - "@types/react-dom": "18.2.13", + "@types/react": "18.2.33", + "@types/react-dom": "18.2.14", "@types/relay-runtime": "14.1.13", "@types/selenium-webdriver": "4.0.15", "@types/sharp": "0.29.3", @@ -193,16 +193,16 @@ "random-seed": "0.3.0", "react": "18.2.0", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@18.3.0-canary-8c8ee9ee6-20231026", + "react-builtin": "npm:react@18.3.0-canary-0c6348758-20231030", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@18.3.0-canary-8c8ee9ee6-20231026", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-8c8ee9ee6-20231026", - "react-experimental-builtin": "npm:react@0.0.0-experimental-8c8ee9ee6-20231026", - "react-server-dom-turbopack": "18.3.0-canary-8c8ee9ee6-20231026", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-8c8ee9ee6-20231026", - "react-server-dom-webpack": "18.3.0-canary-8c8ee9ee6-20231026", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-8c8ee9ee6-20231026", + "react-dom-builtin": "npm:react-dom@18.3.0-canary-0c6348758-20231030", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-0c6348758-20231030", + "react-experimental-builtin": "npm:react@0.0.0-experimental-0c6348758-20231030", + "react-server-dom-turbopack": "18.3.0-canary-0c6348758-20231030", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-0c6348758-20231030", + "react-server-dom-webpack": "18.3.0-canary-0c6348758-20231030", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-0c6348758-20231030", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -212,8 +212,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.10.6", - "scheduler-builtin": "npm:scheduler@0.24.0-canary-8c8ee9ee6-20231026", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-8c8ee9ee6-20231026", + "scheduler-builtin": "npm:scheduler@0.24.0-canary-0c6348758-20231030", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-0c6348758-20231030", "seedrandom": "3.0.5", "selenium-webdriver": "4.0.0-beta.4", "semver": "7.3.7", @@ -245,8 +245,8 @@ "@babel/parser": "7.22.5", "@babel/types": "7.22.5", "@babel/traverse": "7.22.5", - "@types/react": "18.2.28", - "@types/react-dom": "18.2.13" + "@types/react": "18.2.33", + "@types/react-dom": "18.2.14" }, "engines": { "node": ">=18.17.0", diff --git a/packages/next/package.json b/packages/next/package.json index 97b82f6927250..140d09b04d6a2 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -179,8 +179,8 @@ "@types/micromatch": "4.0.2", "@types/path-to-regexp": "1.7.0", "@types/platform": "1.3.4", - "@types/react": "18.2.5", - "@types/react-dom": "18.2.3", + "@types/react": "18.2.33", + "@types/react-dom": "18.2.14", "@types/react-is": "17.0.3", "@types/semver": "7.3.1", "@types/send": "0.14.4", diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js index 616c376dc1666..dc457f34e8d96 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js @@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { var React = require("next/dist/compiled/react-experimental"); var ReactDOM = require('react-dom'); -var ReactVersion = '18.3.0-experimental-8c8ee9ee6-20231026'; +var ReactVersion = '18.3.0-experimental-0c6348758-20231030'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js index 7641181327a64..b6189b15dddc3 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js @@ -193,4 +193,4 @@ for(c=0;c=16' dependencies: '@types/mdx': 2.0.3 - '@types/react': 18.2.28 + '@types/react': 18.2.33 react: 18.2.0 /@mswjs/cookies@0.2.2: @@ -6225,7 +6225,7 @@ packages: dependencies: '@babel/runtime': 7.22.5 '@testing-library/dom': 8.20.0 - '@types/react-dom': 18.2.13 + '@types/react-dom': 18.2.14 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: true @@ -6699,20 +6699,20 @@ packages: resolution: {integrity: sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==} dev: true - /@types/react-dom@18.2.13: - resolution: {integrity: sha512-eJIUv7rPP+EC45uNYp/ThhSpE16k22VJUknt5OLoH9tbXoi8bMhwLf5xRuWMywamNbWzhrSmU7IBJfPup1+3fw==} + /@types/react-dom@18.2.14: + resolution: {integrity: sha512-V835xgdSVmyQmI1KLV2BEIUgqEuinxp9O4G6g3FqO/SqLac049E53aysv0oEFD2kHfejeKU+ZqL2bcFWj9gLAQ==} dependencies: - '@types/react': 18.2.28 + '@types/react': 18.2.33 dev: true /@types/react-is@17.0.3: resolution: {integrity: sha512-aBTIWg1emtu95bLTLx0cpkxwGW3ueZv71nE2YFBpL8k/z5czEW8yYpOo8Dp+UUAFAtKwNaOsh/ioSeQnWlZcfw==} dependencies: - '@types/react': 18.2.28 + '@types/react': 18.2.33 dev: true - /@types/react@18.2.28: - resolution: {integrity: sha512-ad4aa/RaaJS3hyGz0BGegdnSRXQBkd1CCYDCdNjBPg90UUpLgo+WlJqb9fMYUxtehmzF3PJaTWqRZjko6BRzBg==} + /@types/react@18.2.33: + resolution: {integrity: sha512-v+I7S+hu3PIBoVkKGpSYYpiBT1ijqEzWpzQD62/jm4K74hPpSP7FF9BnKG6+fg2+62weJYkkBWDJlZt5JO/9hg==} dependencies: '@types/prop-types': 15.7.8 '@types/scheduler': 0.16.4 @@ -20472,14 +20472,14 @@ packages: strip-json-comments: 2.0.1 dev: true - /react-dom@0.0.0-experimental-8c8ee9ee6-20231026(react@18.2.0): - resolution: {integrity: sha512-xbNyQJegIcUZWdcSCXy6em9zSe8tLenj548XjnWafb1dCzaODCc99lEB2vO41MrBQRPDNjYp57Ob6Dr+/qBzCQ==} + /react-dom@0.0.0-experimental-0c6348758-20231030(react@18.2.0): + resolution: {integrity: sha512-1nnSiMl5J7kCez30+FFUMBfwli1+ykqVApQmu4CjJktTRGfH5AOa5qtlsMhhvxgDVMHILKYHRVQGjdvsP1cIoQ==} peerDependencies: - react: 0.0.0-experimental-8c8ee9ee6-20231026 + react: 0.0.0-experimental-0c6348758-20231030 dependencies: loose-envify: 1.4.0 react: 18.2.0 - scheduler: 0.0.0-experimental-8c8ee9ee6-20231026 + scheduler: 0.0.0-experimental-0c6348758-20231030 dev: true /react-dom@17.0.2(react@17.0.2): @@ -20513,14 +20513,14 @@ packages: react: 18.2.0 scheduler: 0.23.0 - /react-dom@18.3.0-canary-8c8ee9ee6-20231026(react@18.2.0): - resolution: {integrity: sha512-uQ1CgtW1lJQvJus+5YD4Rx/iEk0hhUi4wWacCuiQ2KhRbRPW1CN7+K26pwGRI4H2mopX7z3lD+PEihshO6nmmg==} + /react-dom@18.3.0-canary-0c6348758-20231030(react@18.2.0): + resolution: {integrity: sha512-ZYrHNgyzQ0qrJmgVSl4zq15REphtmKIGFlQxzeyazePPhw8HMyh03gNQcpBdySaWMThuFk0/q14RPIqivYnHBg==} peerDependencies: - react: 18.3.0-canary-8c8ee9ee6-20231026 + react: 18.3.0-canary-0c6348758-20231030 dependencies: loose-envify: 1.4.0 react: 18.2.0 - scheduler: 0.24.0-canary-8c8ee9ee6-20231026 + scheduler: 0.24.0-canary-0c6348758-20231030 dev: true /react-is@16.13.1: @@ -20543,12 +20543,12 @@ packages: engines: {node: '>=0.10.0'} dev: true - /react-server-dom-turbopack@0.0.0-experimental-8c8ee9ee6-20231026(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-JDU51pk7ncHX/iko73M98FN3IvuzlFpfpgTtevSfhhuQLoI8KFY/TY94td+VHAiTrJA0mCwpC3nA5VW9RuorDg==} + /react-server-dom-turbopack@0.0.0-experimental-0c6348758-20231030(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-kpPwhDYaM+VWviwiJCQAhhpSIvit20VmET0eOwMWABWXLLmZpf3r9P2vtfaPHtiDPM7jn6KM8Q2b+7KVJ4fh3A==} engines: {node: '>=0.10.0'} peerDependencies: - react: 0.0.0-experimental-8c8ee9ee6-20231026 - react-dom: 0.0.0-experimental-8c8ee9ee6-20231026 + react: 0.0.0-experimental-0c6348758-20231030 + react-dom: 0.0.0-experimental-0c6348758-20231030 dependencies: acorn-loose: 8.3.0 loose-envify: 1.4.0 @@ -20557,12 +20557,12 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true - /react-server-dom-turbopack@18.3.0-canary-8c8ee9ee6-20231026(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-D0OpptanWajHU3TLd7Sp8GuhqUKs+iWMMdXnqnTVQMGenlO+ZsKWSbnbkw+CaVFn3U8RTz7maA7Favy+OFigRQ==} + /react-server-dom-turbopack@18.3.0-canary-0c6348758-20231030(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-a+chGW8J4uXCF9Owul+5B1GK+ajdqGQVvsQ11ouI/eQ92ONDu0O6QvQCO4WfamYDt5Ze1YmLT6ZQ/8ltSts+eQ==} engines: {node: '>=0.10.0'} peerDependencies: - react: 18.3.0-canary-8c8ee9ee6-20231026 - react-dom: 18.3.0-canary-8c8ee9ee6-20231026 + react: 18.3.0-canary-0c6348758-20231030 + react-dom: 18.3.0-canary-0c6348758-20231030 dependencies: acorn-loose: 8.3.0 loose-envify: 1.4.0 @@ -20571,12 +20571,12 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true - /react-server-dom-webpack@0.0.0-experimental-8c8ee9ee6-20231026(react-dom@18.2.0)(react@18.2.0)(webpack@5.86.0): - resolution: {integrity: sha512-1Ace+AlTkkl67Pzp2YSsL08GRJjFoVVMc3Jpl5gDXpjeEiE+37coCDyv3z8YWFfd2Pxd4cs+JSIHpXddcSwdWw==} + /react-server-dom-webpack@0.0.0-experimental-0c6348758-20231030(react-dom@18.2.0)(react@18.2.0)(webpack@5.86.0): + resolution: {integrity: sha512-lIre+UADInC0xJNf+i5SVxeODiharSG453DwCaA23c1d5zjFeZVJ+6vQ1rcP7WwRv5bZfCPVUXss2PbyERuYNw==} engines: {node: '>=0.10.0'} peerDependencies: - react: 0.0.0-experimental-8c8ee9ee6-20231026 - react-dom: 0.0.0-experimental-8c8ee9ee6-20231026 + react: 0.0.0-experimental-0c6348758-20231030 + react-dom: 0.0.0-experimental-0c6348758-20231030 webpack: 5.86.0 dependencies: acorn-loose: 8.3.0 @@ -20587,12 +20587,12 @@ packages: webpack: 5.86.0(@swc/core@1.3.85) dev: true - /react-server-dom-webpack@18.3.0-canary-8c8ee9ee6-20231026(react-dom@18.2.0)(react@18.2.0)(webpack@5.86.0): - resolution: {integrity: sha512-TaIknRaMmmatAIo/x3FVSfcyR6GPEnx2dB8pjWvv/NrjIq/ufWe8jdOc/7X0aiwLu4LyZQpPZC4Rv5gq5LseSQ==} + /react-server-dom-webpack@18.3.0-canary-0c6348758-20231030(react-dom@18.2.0)(react@18.2.0)(webpack@5.86.0): + resolution: {integrity: sha512-OOaq1avebjP+l4cDDEUlh7/R6HRFxR/x2LNnkkTK45NzcRlOzpX60gckToFN48pCJWONSCiuV63CfkRBtjmLNA==} engines: {node: '>=0.10.0'} peerDependencies: - react: 18.3.0-canary-8c8ee9ee6-20231026 - react-dom: 18.3.0-canary-8c8ee9ee6-20231026 + react: 18.3.0-canary-0c6348758-20231030 + react-dom: 18.3.0-canary-0c6348758-20231030 webpack: 5.86.0 dependencies: acorn-loose: 8.3.0 @@ -20630,8 +20630,8 @@ packages: react-lifecycles-compat: 3.0.4 dev: true - /react@0.0.0-experimental-8c8ee9ee6-20231026: - resolution: {integrity: sha512-UP/u7R113QJDwOU6p5bjJLjbUZLdqk8CPY6cE5PThx7pY6qPiNMa3cBSAz8ZBUCap5nXULrfTG86v0W7wtfvxg==} + /react@0.0.0-experimental-0c6348758-20231030: + resolution: {integrity: sha512-zi0JRh3YC/O44bTeouA/pZdWWAqV7FPubCyNhLMNHzaRZSH6Sy3upQhQ3so32FrxRATzPgg+XB4eASiPucsrlg==} engines: {node: '>=0.10.0'} dependencies: loose-envify: 1.4.0 @@ -20650,8 +20650,8 @@ packages: dependencies: loose-envify: 1.4.0 - /react@18.3.0-canary-8c8ee9ee6-20231026: - resolution: {integrity: sha512-3k2XzRwl4N/D2hEMzS21eYTh6HvpVdZThIwJQUqcllOfwkfMKrUfqxPiqx6M/wtouvcFE5zILK7no4PQMA4xkA==} + /react@18.3.0-canary-0c6348758-20231030: + resolution: {integrity: sha512-vrPsYnWupofiPqO5TH7UNBoQ7+ypmlYSaKGPlYFnqbcnEoNYYq3se4FaPbl2Owl4aXLcvTVh2xxGh+LGuCo83g==} engines: {node: '>=0.10.0'} dependencies: loose-envify: 1.4.0 @@ -21711,8 +21711,8 @@ packages: xmlchars: 2.2.0 dev: true - /scheduler@0.0.0-experimental-8c8ee9ee6-20231026: - resolution: {integrity: sha512-9TnrWbdXi1ERjtgYsEYvt2yaP2IN9QYEnSzy7l9lbQkjiW27uC7bRlk+dRfLkHaRcsP75mG1q3VjhKnd6pExrQ==} + /scheduler@0.0.0-experimental-0c6348758-20231030: + resolution: {integrity: sha512-LQYJiIVJzyt/NBea/Nfz+OyoCc3RA5m1ggokmon60th44HPaDm5U4Tvgge+YUwMV/A6veS5gHulux2Abq61HwQ==} dependencies: loose-envify: 1.4.0 dev: true @@ -21728,8 +21728,8 @@ packages: dependencies: loose-envify: 1.4.0 - /scheduler@0.24.0-canary-8c8ee9ee6-20231026: - resolution: {integrity: sha512-Mx4La61XpqM+N+61xP55YUq4UHTx77r03vkbf722V5+BeJVhTh2zXiY42/2O6+Rcj29EzkY0o1b/vooWxz6Zkw==} + /scheduler@0.24.0-canary-0c6348758-20231030: + resolution: {integrity: sha512-yVnA284fGTOL7zORXOqSxXJYuFfLa7R+1IEuiArM+qG019hkuEwxLYX3mUhatE5XQecXBa487hb0k2VNWebdLA==} dependencies: loose-envify: 1.4.0 dev: true From 41dec2cbd645b8db0134aef91efaf3f4b7c9a8bd Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Mon, 30 Oct 2023 18:37:29 +0000 Subject: [PATCH 27/30] v14.0.1-canary.5 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/eslint-config-next/package.json | 4 ++-- packages/eslint-plugin-next/package.json | 2 +- packages/font/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-codemod/package.json | 2 +- packages/next-env/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-storybook/package.json | 2 +- packages/next-polyfill-module/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next-swc/package.json | 2 +- packages/next/package.json | 14 +++++++------- packages/react-dev-overlay/package.json | 2 +- packages/react-refresh-utils/package.json | 2 +- packages/third-parties/package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++-------- 18 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lerna.json b/lerna.json index 53733075a77f7..53cc7af7f6cae 100644 --- a/lerna.json +++ b/lerna.json @@ -16,5 +16,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "14.0.1-canary.4" + "version": "14.0.1-canary.5" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 54a24f07cf343..cc5379a94f279 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "keywords": [ "react", "next", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 4573f581c9962..a1684f04673f8 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "description": "ESLint configuration used by Next.js.", "main": "index.js", "license": "MIT", @@ -10,7 +10,7 @@ }, "homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config", "dependencies": { - "@next/eslint-plugin-next": "14.0.1-canary.4", + "@next/eslint-plugin-next": "14.0.1-canary.5", "@rushstack/eslint-patch": "^1.3.3", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", "eslint-import-resolver-node": "^0.3.6", diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 4cf70ffe104da..eecc995990293 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "description": "ESLint plugin for Next.js.", "main": "dist/index.js", "license": "MIT", diff --git a/packages/font/package.json b/packages/font/package.json index 2fb238621ca93..0bb2a58190941 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@next/font", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index c1bc66b9aab3b..6d1a1accad073 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index 4d955fdfc28dd..e11f8b4e52641 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index 5333dac24528a..8d893247d2224 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index e40e9975976c2..5c5cc8de57d0f 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index d55ee77a49254..8c7b500e122e8 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index d2bfb047704f9..f0ad543999653 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 5478499cced6f..5378977eddf92 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index 7879d8f99bc95..8ebf011c44896 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "private": true, "scripts": { "clean": "node ../../scripts/rm.mjs native", diff --git a/packages/next/package.json b/packages/next/package.json index 140d09b04d6a2..badabf6ee936d 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -92,7 +92,7 @@ ] }, "dependencies": { - "@next/env": "14.0.1-canary.4", + "@next/env": "14.0.1-canary.5", "@swc/helpers": "0.5.2", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", @@ -146,11 +146,11 @@ "@mswjs/interceptors": "0.23.0", "@napi-rs/cli": "2.16.2", "@napi-rs/triples": "1.1.0", - "@next/polyfill-module": "14.0.1-canary.4", - "@next/polyfill-nomodule": "14.0.1-canary.4", - "@next/react-dev-overlay": "14.0.1-canary.4", - "@next/react-refresh-utils": "14.0.1-canary.4", - "@next/swc": "14.0.1-canary.4", + "@next/polyfill-module": "14.0.1-canary.5", + "@next/polyfill-nomodule": "14.0.1-canary.5", + "@next/react-dev-overlay": "14.0.1-canary.5", + "@next/react-refresh-utils": "14.0.1-canary.5", + "@next/swc": "14.0.1-canary.5", "@opentelemetry/api": "1.4.1", "@playwright/test": "^1.35.1", "@taskr/clear": "1.1.0", diff --git a/packages/react-dev-overlay/package.json b/packages/react-dev-overlay/package.json index bd2c1432dceb6..6c44bb6fc1de3 100644 --- a/packages/react-dev-overlay/package.json +++ b/packages/react-dev-overlay/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-dev-overlay", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "description": "A development-only overlay for developing React applications.", "repository": { "url": "vercel/next.js", diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index b5efeec74562f..b1011c903c4ff 100644 --- a/packages/react-refresh-utils/package.json +++ b/packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-refresh-utils", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "description": "An experimental package providing utilities for React Refresh.", "repository": { "url": "vercel/next.js", diff --git a/packages/third-parties/package.json b/packages/third-parties/package.json index 7d4df7d51f871..94513bcbd5281 100644 --- a/packages/third-parties/package.json +++ b/packages/third-parties/package.json @@ -1,6 +1,6 @@ { "name": "@next/third-parties", - "version": "14.0.1-canary.4", + "version": "14.0.1-canary.5", "repository": { "url": "vercel/next.js", "directory": "packages/third-parties" @@ -22,7 +22,7 @@ "third-party-capital": "1.0.20" }, "devDependencies": { - "next": "14.0.1-canary.4", + "next": "14.0.1-canary.5", "outdent": "0.8.0", "prettier": "2.5.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b2a4221533e0d..73b045a32eddf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,7 +735,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 14.0.1-canary.4 + specifier: 14.0.1-canary.5 version: link:../eslint-plugin-next '@rushstack/eslint-patch': specifier: ^1.3.3 @@ -796,7 +796,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 14.0.1-canary.4 + specifier: 14.0.1-canary.5 version: link:../next-env '@swc/helpers': specifier: 0.5.2 @@ -920,19 +920,19 @@ importers: specifier: 1.1.0 version: 1.1.0 '@next/polyfill-module': - specifier: 14.0.1-canary.4 + specifier: 14.0.1-canary.5 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 14.0.1-canary.4 + specifier: 14.0.1-canary.5 version: link:../next-polyfill-nomodule '@next/react-dev-overlay': - specifier: 14.0.1-canary.4 + specifier: 14.0.1-canary.5 version: link:../react-dev-overlay '@next/react-refresh-utils': - specifier: 14.0.1-canary.4 + specifier: 14.0.1-canary.5 version: link:../react-refresh-utils '@next/swc': - specifier: 14.0.1-canary.4 + specifier: 14.0.1-canary.5 version: link:../next-swc '@opentelemetry/api': specifier: 1.4.1 @@ -1583,7 +1583,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 14.0.1-canary.4 + specifier: 14.0.1-canary.5 version: link:../next outdent: specifier: 0.8.0 From 4df888a55f6deb4dbdd5c1bae633c58e712b96bc Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Mon, 30 Oct 2023 19:21:25 +0000 Subject: [PATCH 28/30] v14.0.1 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/eslint-config-next/package.json | 4 ++-- packages/eslint-plugin-next/package.json | 2 +- packages/font/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-codemod/package.json | 2 +- packages/next-env/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-storybook/package.json | 2 +- packages/next-polyfill-module/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next-swc/package.json | 2 +- packages/next/package.json | 14 +++++++------- packages/react-dev-overlay/package.json | 2 +- packages/react-refresh-utils/package.json | 2 +- packages/third-parties/package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++-------- 18 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lerna.json b/lerna.json index 53cc7af7f6cae..be7dc578fde93 100644 --- a/lerna.json +++ b/lerna.json @@ -16,5 +16,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "14.0.1-canary.5" + "version": "14.0.1" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index cc5379a94f279..75867286d50cd 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "14.0.1-canary.5", + "version": "14.0.1", "keywords": [ "react", "next", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index a1684f04673f8..00f55800b5320 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "14.0.1-canary.5", + "version": "14.0.1", "description": "ESLint configuration used by Next.js.", "main": "index.js", "license": "MIT", @@ -10,7 +10,7 @@ }, "homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config", "dependencies": { - "@next/eslint-plugin-next": "14.0.1-canary.5", + "@next/eslint-plugin-next": "14.0.1", "@rushstack/eslint-patch": "^1.3.3", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", "eslint-import-resolver-node": "^0.3.6", diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index eecc995990293..023c774b413ad 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "14.0.1-canary.5", + "version": "14.0.1", "description": "ESLint plugin for Next.js.", "main": "dist/index.js", "license": "MIT", diff --git a/packages/font/package.json b/packages/font/package.json index 0bb2a58190941..3e9ac8e46013c 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@next/font", - "version": "14.0.1-canary.5", + "version": "14.0.1", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 6d1a1accad073..155f3e4be62cb 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "14.0.1-canary.5", + "version": "14.0.1", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index e11f8b4e52641..08bfdb577d804 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "14.0.1-canary.5", + "version": "14.0.1", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index 8d893247d2224..457799e3d81a0 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "14.0.1-canary.5", + "version": "14.0.1", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 5c5cc8de57d0f..6356bfe4ecca2 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "14.0.1-canary.5", + "version": "14.0.1", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index 8c7b500e122e8..03f375fc91cc3 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "14.0.1-canary.5", + "version": "14.0.1", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index f0ad543999653..2a7644a0682f7 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "14.0.1-canary.5", + "version": "14.0.1", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 5378977eddf92..0ffb7ad38a40b 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "14.0.1-canary.5", + "version": "14.0.1", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index 8ebf011c44896..8d2619f28d438 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "14.0.1-canary.5", + "version": "14.0.1", "private": true, "scripts": { "clean": "node ../../scripts/rm.mjs native", diff --git a/packages/next/package.json b/packages/next/package.json index badabf6ee936d..fde6d3ac2863b 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "14.0.1-canary.5", + "version": "14.0.1", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -92,7 +92,7 @@ ] }, "dependencies": { - "@next/env": "14.0.1-canary.5", + "@next/env": "14.0.1", "@swc/helpers": "0.5.2", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", @@ -146,11 +146,11 @@ "@mswjs/interceptors": "0.23.0", "@napi-rs/cli": "2.16.2", "@napi-rs/triples": "1.1.0", - "@next/polyfill-module": "14.0.1-canary.5", - "@next/polyfill-nomodule": "14.0.1-canary.5", - "@next/react-dev-overlay": "14.0.1-canary.5", - "@next/react-refresh-utils": "14.0.1-canary.5", - "@next/swc": "14.0.1-canary.5", + "@next/polyfill-module": "14.0.1", + "@next/polyfill-nomodule": "14.0.1", + "@next/react-dev-overlay": "14.0.1", + "@next/react-refresh-utils": "14.0.1", + "@next/swc": "14.0.1", "@opentelemetry/api": "1.4.1", "@playwright/test": "^1.35.1", "@taskr/clear": "1.1.0", diff --git a/packages/react-dev-overlay/package.json b/packages/react-dev-overlay/package.json index 6c44bb6fc1de3..bf962922494ae 100644 --- a/packages/react-dev-overlay/package.json +++ b/packages/react-dev-overlay/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-dev-overlay", - "version": "14.0.1-canary.5", + "version": "14.0.1", "description": "A development-only overlay for developing React applications.", "repository": { "url": "vercel/next.js", diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index b1011c903c4ff..707be26b16095 100644 --- a/packages/react-refresh-utils/package.json +++ b/packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-refresh-utils", - "version": "14.0.1-canary.5", + "version": "14.0.1", "description": "An experimental package providing utilities for React Refresh.", "repository": { "url": "vercel/next.js", diff --git a/packages/third-parties/package.json b/packages/third-parties/package.json index 94513bcbd5281..e3c9d4d0bd080 100644 --- a/packages/third-parties/package.json +++ b/packages/third-parties/package.json @@ -1,6 +1,6 @@ { "name": "@next/third-parties", - "version": "14.0.1-canary.5", + "version": "14.0.1", "repository": { "url": "vercel/next.js", "directory": "packages/third-parties" @@ -22,7 +22,7 @@ "third-party-capital": "1.0.20" }, "devDependencies": { - "next": "14.0.1-canary.5", + "next": "14.0.1", "outdent": "0.8.0", "prettier": "2.5.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 73b045a32eddf..c1727ac7d7376 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,7 +735,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 14.0.1-canary.5 + specifier: 14.0.1 version: link:../eslint-plugin-next '@rushstack/eslint-patch': specifier: ^1.3.3 @@ -796,7 +796,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 14.0.1-canary.5 + specifier: 14.0.1 version: link:../next-env '@swc/helpers': specifier: 0.5.2 @@ -920,19 +920,19 @@ importers: specifier: 1.1.0 version: 1.1.0 '@next/polyfill-module': - specifier: 14.0.1-canary.5 + specifier: 14.0.1 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 14.0.1-canary.5 + specifier: 14.0.1 version: link:../next-polyfill-nomodule '@next/react-dev-overlay': - specifier: 14.0.1-canary.5 + specifier: 14.0.1 version: link:../react-dev-overlay '@next/react-refresh-utils': - specifier: 14.0.1-canary.5 + specifier: 14.0.1 version: link:../react-refresh-utils '@next/swc': - specifier: 14.0.1-canary.5 + specifier: 14.0.1 version: link:../next-swc '@opentelemetry/api': specifier: 1.4.1 @@ -1583,7 +1583,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 14.0.1-canary.5 + specifier: 14.0.1 version: link:../next outdent: specifier: 0.8.0 From cce9f0d34f9226aae97337c792cd8616d973f69f Mon Sep 17 00:00:00 2001 From: OJ Kwon <1210596+kwonoj@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:56:55 -0700 Subject: [PATCH 29/30] fix(metadata): align metadata suffix hash between turbopack (#57544) ### What? Wraps up metadata-dynamic-routes tests fixes for the turbopack. There is 1 remaining failing test due to lacks of supporting `import.meta.url` which need to be addressed separately. I spent amount of time why turbopack cannot find the route for the dynamic metadata for a certain route. In the end, found there are mismatching expectations for the route due to different hash for the certain route. We do use the same djb2 hash between next.js and turbopack both, so it was quite confusing why we don't get deterministic hash. After trying some experiments, found out root cause was how 2 different runtimes handle overflow for given type of numbers. In rust + turbpack we use u32 and do 32-bit hash calculation for given string, while in js we implicitly used number type as is, in result overflow occurs with default 53-bit float. Originally I tried to adjust hash in turbopack side to preserve js hash as-is, but so far I found it was non trivial to do so as rust there's no out of the box types we can coerce to the js number type. In result, unlike other fixes in turbopack this PR changes how js hash is being generated. I hope this woulndn't be a breaking changes; expect so since this is a metadata specific hash that we do not have written spec for it. Closes WEB-1890 --- .../crates/next-core/src/next_app/metadata/mod.rs | 5 +++-- packages/next/src/shared/lib/hash.ts | 10 ++++++++-- .../app-dir/metadata-dynamic-routes/index.test.ts | 14 +++++++------- test/turbopack-tests-manifest.json | 10 +++++----- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/packages/next-swc/crates/next-core/src/next_app/metadata/mod.rs b/packages/next-swc/crates/next-core/src/next_app/metadata/mod.rs index 7f27edde09c66..429dbbb451645 100644 --- a/packages/next-swc/crates/next-core/src/next_app/metadata/mod.rs +++ b/packages/next-swc/crates/next-core/src/next_app/metadata/mod.rs @@ -258,7 +258,7 @@ fn djb2_hash(str: &str) -> u32 { }) } -// this is here to mirror next.js behaviour. +// this is here to mirror next.js behaviour (`toString(36).slice(0, 6)`) fn format_radix(mut x: u32, radix: u32) -> String { let mut result = vec![]; @@ -273,7 +273,8 @@ fn format_radix(mut x: u32, radix: u32) -> String { } } - result.into_iter().rev().collect() + result.reverse(); + result[..6].iter().collect() } /// If there's special convention like (...) or @ in the page path, diff --git a/packages/next/src/shared/lib/hash.ts b/packages/next/src/shared/lib/hash.ts index fbc1e4371416e..187beafce8cc0 100644 --- a/packages/next/src/shared/lib/hash.ts +++ b/packages/next/src/shared/lib/hash.ts @@ -1,11 +1,17 @@ // http://www.cse.yorku.ca/~oz/hash.html +// More specifically, 32-bit hash via djbxor +// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765) +// This is due to number type differences between rust for turbopack to js number types, +// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching +// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation +// as can gaurantee determinstic output from 32bit hash. export function djb2Hash(str: string) { let hash = 5381 for (let i = 0; i < str.length; i++) { const char = str.charCodeAt(i) - hash = (hash << 5) + hash + char + hash = ((hash << 5) + hash + char) & 0xffffffff } - return Math.abs(hash) + return hash >>> 0 } export function hexHash(str: string) { diff --git a/test/e2e/app-dir/metadata-dynamic-routes/index.test.ts b/test/e2e/app-dir/metadata-dynamic-routes/index.test.ts index 188575f9ae6d0..04bc64abdcb3d 100644 --- a/test/e2e/app-dir/metadata-dynamic-routes/index.test.ts +++ b/test/e2e/app-dir/metadata-dynamic-routes/index.test.ts @@ -8,7 +8,7 @@ const CACHE_HEADERS = { REVALIDATE: 'public, max-age=0, must-revalidate', } -const hashRegex = /\?\w+$/ +const hashRegex = /\?\w+/ createNextDescribe( 'app dir - metadata dynamic routes', @@ -160,12 +160,12 @@ createNextDescribe( // slug is id param from generateImageMetadata expect(iconUrls).toMatchObject([ { - href: '/dynamic/big/icon-48jo90/small', + href: '/dynamic/big/icon-ahg52g/small', sizes: '48x48', type: 'image/png', }, { - href: '/dynamic/big/icon-48jo90/medium', + href: '/dynamic/big/icon-ahg52g/medium', sizes: '72x72', type: 'image/png', }, @@ -183,12 +183,12 @@ createNextDescribe( // slug is index by default expect(appleTouchIconUrls).toEqual([ { - href: '/dynamic/big/apple-icon-48jo90/0', + href: '/dynamic/big/apple-icon-ahg52g/0', sizes: '48x48', type: 'image/png', }, { - href: '/dynamic/big/apple-icon-48jo90/1', + href: '/dynamic/big/apple-icon-ahg52g/1', sizes: '64x64', type: 'image/png', }, @@ -551,8 +551,8 @@ createNextDescribe( // dynamic '/gsp/sitemap/[__metadata_id__]/route': 'app/gsp/sitemap/[__metadata_id__]/route.js', - '/(group)/dynamic/[size]/apple-icon-48jo90/[[...__metadata_id__]]/route': - 'app/(group)/dynamic/[size]/apple-icon-48jo90/[[...__metadata_id__]]/route.js', + '/(group)/dynamic/[size]/apple-icon-ahg52g/[[...__metadata_id__]]/route': + 'app/(group)/dynamic/[size]/apple-icon-ahg52g/[[...__metadata_id__]]/route.js', }) }) diff --git a/test/turbopack-tests-manifest.json b/test/turbopack-tests-manifest.json index fdd0af03840f9..13ef600c892d5 100644 --- a/test/turbopack-tests-manifest.json +++ b/test/turbopack-tests-manifest.json @@ -3314,13 +3314,13 @@ "app dir - metadata dynamic routes social image routes should support generate multi sitemaps with generateSitemaps", "app dir - metadata dynamic routes text routes should handle robots.[ext] dynamic routes", "app dir - metadata dynamic routes text routes should handle sitemap.[ext] dynamic routes", - "app dir - metadata dynamic routes text routes should not throw if client components are imported but not used" + "app dir - metadata dynamic routes text routes should not throw if client components are imported but not used", + "app dir - metadata dynamic routes social image routes should fill params into routes groups url of static images", + "app dir - metadata dynamic routes social image routes should support params as argument in dynamic routes", + "app dir - metadata dynamic routes should generate unique path for image routes under group routes" ], "failed": [ - "app dir - metadata dynamic routes should generate unique path for image routes under group routes", - "app dir - metadata dynamic routes social image routes should fill params into routes groups url of static images", - "app dir - metadata dynamic routes social image routes should handle custom fonts in both edge and nodejs runtime", - "app dir - metadata dynamic routes social image routes should support params as argument in dynamic routes" + "app dir - metadata dynamic routes social image routes should handle custom fonts in both edge and nodejs runtime" ], "pending": [], "flakey": [], From 5eb6607279727fa7991a98cc6d551d9beecb4bb4 Mon Sep 17 00:00:00 2001 From: vercel-release-bot Date: Mon, 30 Oct 2023 23:23:45 +0000 Subject: [PATCH 30/30] v14.0.2-canary.0 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/eslint-config-next/package.json | 4 ++-- packages/eslint-plugin-next/package.json | 2 +- packages/font/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-codemod/package.json | 2 +- packages/next-env/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-storybook/package.json | 2 +- packages/next-polyfill-module/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next-swc/package.json | 2 +- packages/next/package.json | 14 +++++++------- packages/react-dev-overlay/package.json | 2 +- packages/react-refresh-utils/package.json | 2 +- packages/third-parties/package.json | 4 ++-- pnpm-lock.yaml | 16 ++++++++-------- 18 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lerna.json b/lerna.json index be7dc578fde93..ca08a668a9951 100644 --- a/lerna.json +++ b/lerna.json @@ -16,5 +16,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "14.0.1" + "version": "14.0.2-canary.0" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 75867286d50cd..718f658aecd00 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "14.0.1", + "version": "14.0.2-canary.0", "keywords": [ "react", "next", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 00f55800b5320..e767fb68e68a1 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "14.0.1", + "version": "14.0.2-canary.0", "description": "ESLint configuration used by Next.js.", "main": "index.js", "license": "MIT", @@ -10,7 +10,7 @@ }, "homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config", "dependencies": { - "@next/eslint-plugin-next": "14.0.1", + "@next/eslint-plugin-next": "14.0.2-canary.0", "@rushstack/eslint-patch": "^1.3.3", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", "eslint-import-resolver-node": "^0.3.6", diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 023c774b413ad..c18e5c844c254 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "14.0.1", + "version": "14.0.2-canary.0", "description": "ESLint plugin for Next.js.", "main": "dist/index.js", "license": "MIT", diff --git a/packages/font/package.json b/packages/font/package.json index 3e9ac8e46013c..80410bffd746c 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,6 +1,6 @@ { "name": "@next/font", - "version": "14.0.1", + "version": "14.0.2-canary.0", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 155f3e4be62cb..29ace61bdd206 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "14.0.1", + "version": "14.0.2-canary.0", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index 08bfdb577d804..960c2ab0f5693 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "14.0.1", + "version": "14.0.2-canary.0", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index 457799e3d81a0..34a0a764fd0a1 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "14.0.1", + "version": "14.0.2-canary.0", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 6356bfe4ecca2..0720ce55069ff 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "14.0.1", + "version": "14.0.2-canary.0", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index 03f375fc91cc3..330e920d2e5f0 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "14.0.1", + "version": "14.0.2-canary.0", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index 2a7644a0682f7..d23b53b14268b 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "14.0.1", + "version": "14.0.2-canary.0", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 0ffb7ad38a40b..2768d68fbc24d 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "14.0.1", + "version": "14.0.2-canary.0", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index 8d2619f28d438..dd86fcf99233b 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "14.0.1", + "version": "14.0.2-canary.0", "private": true, "scripts": { "clean": "node ../../scripts/rm.mjs native", diff --git a/packages/next/package.json b/packages/next/package.json index fde6d3ac2863b..aca423f59e02e 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "14.0.1", + "version": "14.0.2-canary.0", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -92,7 +92,7 @@ ] }, "dependencies": { - "@next/env": "14.0.1", + "@next/env": "14.0.2-canary.0", "@swc/helpers": "0.5.2", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", @@ -146,11 +146,11 @@ "@mswjs/interceptors": "0.23.0", "@napi-rs/cli": "2.16.2", "@napi-rs/triples": "1.1.0", - "@next/polyfill-module": "14.0.1", - "@next/polyfill-nomodule": "14.0.1", - "@next/react-dev-overlay": "14.0.1", - "@next/react-refresh-utils": "14.0.1", - "@next/swc": "14.0.1", + "@next/polyfill-module": "14.0.2-canary.0", + "@next/polyfill-nomodule": "14.0.2-canary.0", + "@next/react-dev-overlay": "14.0.2-canary.0", + "@next/react-refresh-utils": "14.0.2-canary.0", + "@next/swc": "14.0.2-canary.0", "@opentelemetry/api": "1.4.1", "@playwright/test": "^1.35.1", "@taskr/clear": "1.1.0", diff --git a/packages/react-dev-overlay/package.json b/packages/react-dev-overlay/package.json index bf962922494ae..246067a3ba18c 100644 --- a/packages/react-dev-overlay/package.json +++ b/packages/react-dev-overlay/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-dev-overlay", - "version": "14.0.1", + "version": "14.0.2-canary.0", "description": "A development-only overlay for developing React applications.", "repository": { "url": "vercel/next.js", diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index 707be26b16095..24b3edb31d9ed 100644 --- a/packages/react-refresh-utils/package.json +++ b/packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-refresh-utils", - "version": "14.0.1", + "version": "14.0.2-canary.0", "description": "An experimental package providing utilities for React Refresh.", "repository": { "url": "vercel/next.js", diff --git a/packages/third-parties/package.json b/packages/third-parties/package.json index e3c9d4d0bd080..73187e1c8ba4d 100644 --- a/packages/third-parties/package.json +++ b/packages/third-parties/package.json @@ -1,6 +1,6 @@ { "name": "@next/third-parties", - "version": "14.0.1", + "version": "14.0.2-canary.0", "repository": { "url": "vercel/next.js", "directory": "packages/third-parties" @@ -22,7 +22,7 @@ "third-party-capital": "1.0.20" }, "devDependencies": { - "next": "14.0.1", + "next": "14.0.2-canary.0", "outdent": "0.8.0", "prettier": "2.5.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c1727ac7d7376..8f6476f7f8d9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,7 +735,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 14.0.1 + specifier: 14.0.2-canary.0 version: link:../eslint-plugin-next '@rushstack/eslint-patch': specifier: ^1.3.3 @@ -796,7 +796,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 14.0.1 + specifier: 14.0.2-canary.0 version: link:../next-env '@swc/helpers': specifier: 0.5.2 @@ -920,19 +920,19 @@ importers: specifier: 1.1.0 version: 1.1.0 '@next/polyfill-module': - specifier: 14.0.1 + specifier: 14.0.2-canary.0 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 14.0.1 + specifier: 14.0.2-canary.0 version: link:../next-polyfill-nomodule '@next/react-dev-overlay': - specifier: 14.0.1 + specifier: 14.0.2-canary.0 version: link:../react-dev-overlay '@next/react-refresh-utils': - specifier: 14.0.1 + specifier: 14.0.2-canary.0 version: link:../react-refresh-utils '@next/swc': - specifier: 14.0.1 + specifier: 14.0.2-canary.0 version: link:../next-swc '@opentelemetry/api': specifier: 1.4.1 @@ -1583,7 +1583,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 14.0.1 + specifier: 14.0.2-canary.0 version: link:../next outdent: specifier: 0.8.0