Skip to content

[pull] canary from vercel:canary#1095

Merged
pull[bot] merged 9 commits into
code:canaryfrom
vercel:canary
Jun 3, 2026
Merged

[pull] canary from vercel:canary#1095
pull[bot] merged 9 commits into
code:canaryfrom
vercel:canary

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Jun 3, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

lukesandberg and others added 9 commits June 2, 2026 12:30
…ckend (#94007)

Methods on the `Backend` trait took a `turbo_tasks: &dyn TurboTasksBackendApi<TurboTasksBackend<B>>,` parameter, but they could trivially just name the literal type.

That is what this does.  

Doing this revealed that the `TurboTasksBackendApi` trait was no longer needed so that is also dropped
### What?

Delay dynamic Node Fizz piping by one React render task after
`onShellReady()`, and keep the dedicated Node-stream CI jobs scoped to
`test/use-node-streams-tests-manifest.json`.

### Why?

The Node adapter started `pipeable.pipe(pt)` inside `onShellReady()`,
before the existing continuation delay could take effect. In App Router
renders backed by RSC, that caused short-lived Suspense boundaries to
flush fallback and reveal markup that the web-stream path avoids by
waiting before its first pull.

The previous test assertion relaxations hid this runtime mismatch. The
original assertions pass once piping starts after the settling window,
so they have been restored.

The workflow correction remains necessary because merging the
cache-components manifest into the ordinary Node-stream jobs filtered
out relevant e2e coverage.

### How?

- Resolve the Node Fizz shell promise from `onShellReady()` without
immediately piping.
- For dynamic renders, wait one React render task and then start piping
into the `PassThrough`.
- Preserve the existing `onAllReady()` behavior for static generation.
- Use the Node-stream manifest alone for ordinary Node-stream dev and
prod CI jobs.

### Verification

- `pnpm --filter=next build`
- `__NEXT_USE_NODE_STREAMS=true
__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true NEXT_TEST_PREFER_OFFLINE=1
pnpm test-dev-turbo
test/e2e/app-dir/ppr-root-param-fallback/ppr-root-param-fallback.test.ts`
- `__NEXT_USE_NODE_STREAMS=true
__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true NEXT_TEST_PREFER_OFFLINE=1
pnpm test-dev-turbo
test/e2e/app-dir/use-server-inserted-html/use-server-inserted-html.test.ts`

<!-- NEXT_JS_LLM_PR -->
### What?

Defaults `experimental.useNodeStreams` to `true` while keeping the
experimental config flag and explicit `false` opt-out available. Removes
redundant dedicated node-stream CI jobs because the ordinary path
exercises Node streams after this change.

Depends on the standalone test compatibility update in #94347, which
intentionally remains outside the Node streams PR stack.

### Why?

Node streams can be exercised through the standard Node.js App Router
test path once they are the default, allowing a smaller rollout before
the larger follow-up that removes the flag and obsolete plumbing.

CI exposed one necessary compatibility fix for this intermediate state:
projects with a `next.config.*` received the new default after raw
experimental-feature processing, leaving the runtime stream selector on
the web implementation while compiled app code selected Node stream
helpers.

### How?

- Set `defaultConfig.experimental.useNodeStreams` to `true`.
- Synchronize `__NEXT_USE_NODE_STREAMS` from the fully resolved config,
including cached and standalone resolved configs, so defaults and
adapter modifications are reflected at runtime.
- Preserve the current public config/schema and explicit `experimental:
{ useNodeStreams: false }` opt-out; edge bundles continue to define the
stream flag as `false`.
- Remove the dedicated node-stream test jobs and now-unused manifest;
the affected streaming assertion compatibility changes are isolated in
#94347.

### Verification

Run before extracting the prerequisite assertion changes into #94347:

- `pnpm --filter=next types`
- `pnpm --filter=next build`
- `IS_WEBPACK_TEST=1 __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true pnpm
test-start-webpack
test/e2e/app-dir/ppr-root-param-fallback/ppr-root-param-fallback.test.ts`
- `IS_TURBOPACK_TEST=1 TURBOPACK_BUILD=1
__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true pnpm test-start-turbo
test/e2e/app-dir/ppr-root-param-fallback/ppr-root-param-fallback.test.ts`
- `IS_WEBPACK_TEST=1 __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true pnpm
test-start-webpack
test/e2e/app-dir/use-server-inserted-html/use-server-inserted-html.test.ts`
- `pnpm test-dev-webpack
test/e2e/app-dir/ppr-root-param-fallback/ppr-root-param-fallback.test.ts
test/e2e/app-dir/use-server-inserted-html/use-server-inserted-html.test.ts`
- `pnpm test-dev-turbo
test/e2e/app-dir/ppr-root-param-fallback/ppr-root-param-fallback.test.ts
test/e2e/app-dir/use-server-inserted-html/use-server-inserted-html.test.ts`
- `pnpm test-start-webpack
test/production/app-dir/use-node-streams-env-precedence/use-node-streams-env-precedence.test.ts`
- `pnpm test-start-webpack test/e2e/app-dir/app/standalone.test.ts`

<!-- NEXT_JS_LLM_PR -->
Make sure that we don't accidentally match too many pages
This already worked:
```js
fs.readFileSync(/*turbopackIgnore: true*/ x)
```
but this didn't:
```js
fs.readdirSync(/*turbopackIgnore: true*/ x)
```
…#94293)

I noticed this section of the documentation in
`turbopack/crates/turbopack-ecmascript/src/analyzer/side_effects.rs`:


https://github.com/vercel/next.js/blob/89562628d27b672352d212ecd8c6941873e83222/turbopack/crates/turbopack-ecmascript/src/analyzer/side_effects.rs#L36

This PR implements this change; as part of a stack of PRs that attempts
to work towards tracking local variable mutations.
### What?

Flips the default `experimental.instantInsights.validationLevel` from
`'manual-warning'` to `'warning'` so Cache Components apps get
instant-navigation validation across all pages by default.

### Why?

`'manual-warning'` only validates pages that explicitly export
`unstable_instant`, so apps see nothing unless they opt in. `'warning'`
is what users have been turning on manually to actually see the feature
(`v0`, `vercel-site`).

### Test coverage

- Unit: `instant-config-normalization.test.ts` pins the framework
default at `'warning'`.
- Integration: new `instant-validation-level-default/` fixture (no
`instantInsights` in config) asserts implicit dev validation fires, and
that build is unaffected.

### Collateral test fixtures

Tests whose intent is unrelated to instant validation
(router-autoscroll, owner-stack, hmr-iframe, next-image,
server-source-maps, etc.) now hit new redboxes/console warnings because
their fixtures incidentally use dynamic data. Each opts out with
`experimental: { instantInsights: { validationLevel: 'manual-warning' }
}` in `next.config`.

### Open question

With no `'off'` / `'info'` tier today, silencing Insights after this
change requires setting `validationLevel: 'manual-warning'`. Is that
acceptable? Should we inform of this anywhere?

<!-- NEXT_JS_LLM_PR -->
@pull pull Bot locked and limited conversation to collaborators Jun 3, 2026
@pull pull Bot added the ⤵️ pull label Jun 3, 2026
@pull pull Bot merged commit c479036 into code:canary Jun 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants