[pull] canary from vercel:canary#1095
Merged
Merged
Conversation
…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 -->
#94239) This has slightly annoyed me for a long time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )