Skip to content

[pull] canary from vercel:canary #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/labeler.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{ "type": "user", "pattern": "ijjk" },
{ "type": "user", "pattern": "lazarv" },
{ "type": "user", "pattern": "lubieowoce" },
{ "type": "user", "pattern": "nebrelbug" },
{ "type": "user", "pattern": "bgub" },
{ "type": "user", "pattern": "RobPruzan" },
{ "type": "user", "pattern": "samcx" },
{ "type": "user", "pattern": "sebmarkbage" },
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "15.4.2-canary.3"
"version": "15.4.2-canary.5"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"description": "ESLint configuration used by Next.js.",
"main": "index.js",
"license": "MIT",
Expand All @@ -10,7 +10,7 @@
},
"homepage": "https://nextjs.org/docs/app/api-reference/config/eslint",
"dependencies": {
"@next/eslint-plugin-next": "15.4.2-canary.3",
"@next/eslint-plugin-next": "15.4.2-canary.5",
"@rushstack/eslint-patch": "^1.10.3",
"@typescript-eslint/eslint-plugin": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-internal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@next/eslint-plugin-internal",
"private": true,
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"description": "ESLint plugin for working on Next.js.",
"exports": {
".": "./src/eslint-plugin-internal.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"description": "ESLint plugin for Next.js.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@next/font",
"private": true,
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "15.4.2-canary.3",
"version": "15.4.2-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",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-rspack",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-rspack"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"private": true,
"files": [
"native/"
Expand Down
14 changes: 7 additions & 7 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "15.4.2-canary.3",
"version": "15.4.2-canary.5",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -100,7 +100,7 @@
]
},
"dependencies": {
"@next/env": "15.4.2-canary.3",
"@next/env": "15.4.2-canary.5",
"@swc/helpers": "0.5.15",
"caniuse-lite": "^1.0.30001579",
"postcss": "8.4.31",
Expand Down Expand Up @@ -163,11 +163,11 @@
"@jest/types": "29.5.0",
"@mswjs/interceptors": "0.23.0",
"@napi-rs/triples": "1.2.0",
"@next/font": "15.4.2-canary.3",
"@next/polyfill-module": "15.4.2-canary.3",
"@next/polyfill-nomodule": "15.4.2-canary.3",
"@next/react-refresh-utils": "15.4.2-canary.3",
"@next/swc": "15.4.2-canary.3",
"@next/font": "15.4.2-canary.5",
"@next/polyfill-module": "15.4.2-canary.5",
"@next/polyfill-nomodule": "15.4.2-canary.5",
"@next/react-refresh-utils": "15.4.2-canary.5",
"@next/swc": "15.4.2-canary.5",
"@opentelemetry/api": "1.6.0",
"@playwright/test": "1.51.1",
"@rspack/core": "1.4.5",
Expand Down
34 changes: 4 additions & 30 deletions packages/next/src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3103,44 +3103,18 @@ export default async function build(
}

let prefetchDataRoute: string | undefined
let dynamicRoute = routesManifest.dynamicRoutes.find(
(r) => r.page === route.pathname
)
if (!isAppRouteHandler && isAppPPREnabled) {
prefetchDataRoute = path.posix.join(
`${normalizedRoute}${RSC_PREFETCH_SUFFIX}`
)

// If the dynamic route wasn't found, then we need to create
// it. This ensures that for each fallback shell there's an
// entry in the app routes manifest which enables routing for
// this fallback shell.
if (!dynamicRoute) {
dynamicRoute = pageToRoute(route.pathname)

// This route is not for the internal router, but instead
// for external routers.
dynamicRoute.skipInternalRouting = true

// Push this to the end of the array. The dynamic routes are
// sorted by page later.
routesManifest.dynamicRoutes.push(dynamicRoute)
}
}

if (!isAppRouteHandler && metadata?.segmentPaths) {
// If PPR isn't enabled, then we might not find the dynamic
// route by pathname. If that's the case, we need to find the
// route by page.
const dynamicRoute = routesManifest.dynamicRoutes.find(
(r) => r.page === page
)
if (!dynamicRoute) {
dynamicRoute = routesManifest.dynamicRoutes.find(
(r) => r.page === page
)

// If it can't be found by page, we must throw an error.
if (!dynamicRoute) {
throw new InvariantError('Dynamic route not found')
}
throw new InvariantError('Dynamic route not found')
}

dynamicRoute.prefetchSegmentDataRoutes ??= []
Expand Down
5 changes: 2 additions & 3 deletions packages/next/src/build/templates/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,8 @@ export async function handler(
reactLoadableManifest,

assetPrefix: nextConfig.assetPrefix,
strictNextHead: Boolean(
nextConfig.experimental.strictNextHead
),
strictNextHead:
nextConfig.experimental.strictNextHead ?? true,
previewProps: prerenderManifest.preview,
images: nextConfig.images as any,
nextConfigOutput: nextConfig.output,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
[data-nextjs-toast] {
&[data-hidden='true'] {
display: none;
}
}

.dev-tools-indicator-menu {
-webkit-font-smoothing: antialiased;
display: flex;
flex-direction: column;
align-items: flex-start;
background: var(--color-background-100);
border: 1px solid var(--color-gray-alpha-400);
background-clip: padding-box;
box-shadow: var(--shadow-menu);
border-radius: var(--rounded-xl);
position: absolute;
font-family: var(--font-stack-sans);
z-index: 3;
overflow: hidden;
opacity: 0;
outline: 0;
min-width: 248px;
transition: opacity var(--animate-out-duration-ms)
var(--animate-out-timing-function);

&[data-rendered='true'] {
opacity: 1;
scale: 1;
}
}

.dev-tools-indicator-inner {
padding: 6px;
width: 100%;
}

.dev-tools-indicator-item {
display: flex;
align-items: center;
padding: 8px 6px;
height: var(--size-36);
border-radius: 6px;
text-decoration: none !important;
user-select: none;
white-space: nowrap;

svg {
width: var(--size-16);
height: var(--size-16);
}

&:focus-visible {
outline: 0;
}
}

.dev-tools-indicator-footer {
background: var(--color-background-200);
padding: 6px;
border-top: 1px solid var(--color-gray-400);
width: 100%;
}

.dev-tools-indicator-item[data-selected='true'] {
cursor: pointer;
background-color: var(--color-gray-200);
}

.dev-tools-indicator-label {
font-size: var(--size-14);
line-height: var(--size-20);
color: var(--color-gray-1000);
}

.dev-tools-indicator-value {
font-size: var(--size-14);
line-height: var(--size-20);
color: var(--color-gray-900);
margin-left: auto;
}

.dev-tools-indicator-issue-count {
--color-primary: var(--color-gray-800);
--color-secondary: var(--color-gray-100);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
gap: 8px;
min-width: var(--size-40);
height: var(--size-24);
background: var(--color-background-100);
border: 1px solid var(--color-gray-alpha-400);
background-clip: padding-box;
box-shadow: var(--shadow-small);
padding: 2px;
color: var(--color-gray-1000);
border-radius: 128px;
font-weight: 500;
font-size: var(--size-13);
font-variant-numeric: tabular-nums;

&[data-has-issues='true'] {
--color-primary: var(--color-red-800);
--color-secondary: var(--color-red-100);
}

.dev-tools-indicator-issue-count-indicator {
width: var(--size-8);
height: var(--size-8);
background: var(--color-primary);
box-shadow: 0 0 0 2px var(--color-secondary);
border-radius: 50%;
}
}

.dev-tools-indicator-shortcut {
display: flex;
gap: 4px;

kbd {
width: var(--size-20);
height: var(--size-20);
display: flex;
justify-content: center;
align-items: center;
border-radius: var(--rounded-md);
border: 1px solid var(--color-gray-400);
font-family: var(--font-stack-sans);
background: var(--color-background-100);
color: var(--color-gray-1000);
text-align: center;
font-size: var(--size-12);
line-height: var(--size-16);
}
}

.dev-tools-grabbing {
cursor: grabbing;

> * {
pointer-events: none;
}
}
Loading
Loading