Skip to content

Commit 7db3d5f

Browse files
Merge branch 'canary' into docs-ia-forms-guide
2 parents c135084 + e26e9dd commit 7db3d5f

File tree

303 files changed

+2813
-1507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

303 files changed

+2813
-1507
lines changed

.changeset/spotty-hotels-train.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"next": patch
3+
---
4+
5+
[Segment Cache] Fix: Ensure server references can be prerendered

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"jest/no-export": "off",
4949
"jest/no-standalone-expect": [
5050
"error",
51-
{ "additionalTestBlockFunctions": ["retry"] }
51+
{ "additionalTestBlockFunctions": ["retry", "itCI", "itHeaded"] }
5252
]
5353
}
5454
},

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ coverage
3333
# test output
3434
test/**/out/*
3535
test/**/next-env.d.ts
36+
test/**/.next*
3637
.DS_Store
3738
/e2e-tests
3839
test/tmp/**

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ turbopack-trace-utils = { path = "turbopack/crates/turbopack-trace-utils" }
297297
turbopack-wasm = { path = "turbopack/crates/turbopack-wasm" }
298298

299299
# SWC crates
300-
swc_core = { version = "26.0.0", features = [
300+
swc_core = { version = "26.0.1", features = [
301301
"ecma_loader_lru",
302302
"ecma_loader_parking_lot",
303303
] }
@@ -309,7 +309,7 @@ miette = { version = "5.10.0", features = ["fancy"] }
309309
mdxjs = "1.0.1"
310310
modularize_imports = { version = "0.86.0" }
311311
styled_components = { version = "0.114.0" }
312-
styled_jsx = { version = "0.90.0" }
312+
styled_jsx = { version = "0.90.1" }
313313
swc_emotion = { version = "0.90.0" }
314314
swc_relay = { version = "0.60.0" }
315315

crates/next-custom-transforms/src/react_compiler.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ impl Visit for Finder {
3838
if self.found {
3939
return;
4040
}
41+
if matches!(
42+
node,
43+
Expr::JSXMember(..)
44+
| Expr::JSXNamespacedName(..)
45+
| Expr::JSXEmpty(..)
46+
| Expr::JSXElement(..)
47+
| Expr::JSXFragment(..)
48+
) {
49+
self.found = true;
50+
return;
51+
}
52+
4153
node.visit_children_with(self);
4254
}
4355

@@ -54,7 +66,7 @@ impl Visit for Finder {
5466
fn visit_fn_expr(&mut self, node: &FnExpr) {
5567
let old = self.is_interested;
5668

57-
self.is_interested = node.ident.as_ref().is_some_and(|ident| {
69+
self.is_interested |= node.ident.as_ref().is_some_and(|ident| {
5870
ident.sym.starts_with("use") || ident.sym.starts_with(|c: char| c.is_ascii_uppercase())
5971
});
6072

crates/next-custom-transforms/src/transforms/react_server_components.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ impl ReactServerComponentValidator {
640640
invalid_client_imports: vec![Atom::from("server-only"), Atom::from("next/headers")],
641641

642642
invalid_client_lib_apis_mapping: FxHashMap::from_iter([
643-
("next/server", vec!["after"]),
643+
("next/server", vec!["after", "unstable_rootParams"]),
644644
(
645645
"next/cache",
646646
vec![
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// This is a comment.
2+
3+
'use strict'
4+
5+
/**
6+
* This is a comment.
7+
*/
8+
9+
import { unstable_rootParams } from 'next/server'
10+
11+
export default function () {
12+
return null
13+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This is a comment.
2+
'use strict';
3+
/**
4+
* This is a comment.
5+
*/ import { unstable_rootParams } from 'next/server';
6+
export default function() {
7+
return null;
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
x You're importing a component that needs "unstable_rootParams". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/
2+
| building-your-application/rendering/server-components
3+
|
4+
|
5+
,-[input.js:9:1]
6+
8 |
7+
9 | import { unstable_rootParams } from 'next/server'
8+
: ^^^^^^^^^^^^^^^^^^^
9+
`----

0 commit comments

Comments
 (0)