Skip to content
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
132 changes: 0 additions & 132 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1013,134 +1013,6 @@ jobs:
stepName: 'test-cache-components-prod-${{ matrix.group }}'
secrets: inherit

test-node-streams-cache-components-dev:
name: test node streams cache components dev
needs:
[
'optimize-ci',
'changes',
'build-native',
'build-next',
'fetch-test-timings',
]
if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

strategy:
fail-fast: false
matrix:
group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
uses: ./.github/workflows/build_reusable.yml
with:
afterBuild: |
export __NEXT_USE_NODE_STREAMS=true
export __NEXT_CACHE_COMPONENTS=true
export __NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS=true
export __NEXT_EXPERIMENTAL_APP_NEW_SCROLL_HANDLER=true
export NEXT_EXTERNAL_TESTS_FILTERS="test/cache-components-tests-manifest.json"
export NEXT_TEST_MODE=dev
export IS_TURBOPACK_TEST=1
export TURBOPACK_DEV=1

node run-tests.js \
--timings \
--require-timings \
-g ${{ matrix.group }} \
--type development
testTimingsArtifact: 'test-timings'
stepName: 'test-node-streams-cache-components-dev-${{ matrix.group }}'
secrets: inherit

test-node-streams-cache-components-prod:
name: test node streams cache components prod
needs:
[
'optimize-ci',
'changes',
'build-native',
'build-next',
'fetch-test-timings',
]
if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

strategy:
fail-fast: false
matrix:
group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7]
uses: ./.github/workflows/build_reusable.yml
with:
afterBuild: |
export __NEXT_USE_NODE_STREAMS=true
export __NEXT_CACHE_COMPONENTS=true
export __NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS=true
export __NEXT_EXPERIMENTAL_APP_NEW_SCROLL_HANDLER=true
export NEXT_EXTERNAL_TESTS_FILTERS="test/cache-components-tests-manifest.json"
export NEXT_TEST_MODE=start
export IS_TURBOPACK_TEST=1
export TURBOPACK_BUILD=1

node run-tests.js \
--timings \
--require-timings \
-g ${{ matrix.group }} \
--type production
testTimingsArtifact: 'test-timings'
stepName: 'test-node-streams-cache-components-prod-${{ matrix.group }}'
secrets: inherit

test-node-streams-dev:
name: test node streams dev
needs: ['optimize-ci', 'changes', 'build-native', 'build-next']
if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

strategy:
fail-fast: false
matrix:
group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
uses: ./.github/workflows/build_reusable.yml
with:
afterBuild: |
export __NEXT_USE_NODE_STREAMS=true
export NEXT_EXTERNAL_TESTS_FILTERS="test/cache-components-tests-manifest.json,test/use-node-streams-tests-manifest.json"
export NEXT_TEST_MODE=dev
export IS_TURBOPACK_TEST=1
export TURBOPACK_DEV=1
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true
export RUST_BACKTRACE=1

node run-tests.js \
--timings \
-g ${{ matrix.group }} \
--type development
stepName: 'test-node-streams-dev-${{ matrix.group }}'
secrets: inherit

test-node-streams-prod:
name: test node streams prod
needs: ['optimize-ci', 'changes', 'build-native', 'build-next']
if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

strategy:
fail-fast: false
matrix:
group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7]
uses: ./.github/workflows/build_reusable.yml
with:
afterBuild: |
export __NEXT_USE_NODE_STREAMS=true
export NEXT_EXTERNAL_TESTS_FILTERS="test/cache-components-tests-manifest.json,test/use-node-streams-tests-manifest.json"
export NEXT_TEST_MODE=start
export IS_TURBOPACK_TEST=1
export TURBOPACK_BUILD=1
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true
export RUST_BACKTRACE=1

node run-tests.js \
--timings \
-g ${{ matrix.group }} \
--type production
stepName: 'test-node-streams-prod-${{ matrix.group }}'
secrets: inherit

tests-pass:
needs:
[
Expand All @@ -1157,10 +1029,6 @@ jobs:
'test-firefox-safari',
'test-cache-components-dev',
'test-cache-components-prod',
'test-node-streams-cache-components-dev',
'test-node-streams-cache-components-prod',
'test-node-streams-dev',
'test-node-streams-prod',
'test-cargo-unit',
'rust-check',
'rustdoc-check',
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "16.3.0-canary.37"
"version": "16.3.0-canary.38"
}
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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"description": "ESLint configuration used by Next.js.",
"license": "MIT",
"repository": {
Expand All @@ -12,7 +12,7 @@
"dist"
],
"dependencies": {
"@next/eslint-plugin-next": "16.3.0-canary.37",
"@next/eslint-plugin-next": "16.3.0-canary.38",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.32.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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
12 changes: 11 additions & 1 deletion packages/next-env/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@ let cachedLoadedEnvFiles: LoadedEnvFiles = []
let previousLoadedEnvFiles: LoadedEnvFiles = []

export function updateInitialEnv(newEnv: Env) {
Object.assign(initialEnv || {}, newEnv)
if (!initialEnv) {
return
}

for (const [key, value] of Object.entries(newEnv)) {
if (value === undefined) {
delete initialEnv[key]
} else {
initialEnv[key] = value
}
}
}

type Log = {
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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/playwright",
"version": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-playwright"
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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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-routing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/routing",
"version": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"keywords": [
"react",
"next",
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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"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": "16.3.0-canary.37",
"version": "16.3.0-canary.38",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -101,7 +101,7 @@
]
},
"dependencies": {
"@next/env": "16.3.0-canary.37",
"@next/env": "16.3.0-canary.38",
"@swc/helpers": "0.5.15",
"baseline-browser-mapping": "^2.9.19",
"caniuse-lite": "^1.0.30001579",
Expand Down Expand Up @@ -165,11 +165,11 @@
"@modelcontextprotocol/sdk": "1.18.1",
"@mswjs/interceptors": "0.23.0",
"@napi-rs/triples": "1.2.0",
"@next/font": "16.3.0-canary.37",
"@next/polyfill-module": "16.3.0-canary.37",
"@next/polyfill-nomodule": "16.3.0-canary.37",
"@next/react-refresh-utils": "16.3.0-canary.37",
"@next/swc": "16.3.0-canary.37",
"@next/font": "16.3.0-canary.38",
"@next/polyfill-module": "16.3.0-canary.38",
"@next/polyfill-nomodule": "16.3.0-canary.38",
"@next/react-refresh-utils": "16.3.0-canary.38",
"@next/swc": "16.3.0-canary.38",
"@opentelemetry/api": "1.6.0",
"@playwright/test": "1.58.2",
"@rspack/core": "1.6.7",
Expand Down
8 changes: 5 additions & 3 deletions packages/next/src/server/app-render/stream-ops.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,6 @@ export async function renderToNodeFizzStream(
onHeaders: streamOptions?.onHeaders,
onShellReady() {
streamOptions?.onShellReady?.()
if (!deferPipe) {
pipeable.pipe(pt)
}
shellReady.resolve()
},
onShellError(error: unknown) {
Expand All @@ -636,6 +633,11 @@ export async function renderToNodeFizzStream(

await shellReady.promise

if (!deferPipe) {
await waitAtLeastOneReactRenderTask()
pipeable.pipe(pt)
}

return {
stream: pt,
allReady: allReady.promise,
Expand Down
9 changes: 5 additions & 4 deletions packages/next/src/server/config-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export type NextConfigComplete = Required<Omit<NextConfig, 'configFile'>> & {
prefetchInlining?: PrefetchInliningConfig
// Normalized by config.ts: defaulted to 90% of staticPageGenerationTimeout
useCacheTimeout: number
// Normalized by config.ts `finalizeConfig`: defaulted to `'manual-warning'`
// Normalized by config.ts `finalizeConfig`: defaulted to `'warning'`
instantInsights: { validationLevel: ValidationLevel }
}
// The root directory of the distDir. In development mode, this is the parent directory of `distDir`
Expand Down Expand Up @@ -1080,10 +1080,10 @@ export interface ExperimentalConfig {
/**
* Controls the validation behavior of Instant Insights
*
* - `'warning'`: Validates all navigations for Instant UI in development
* - `'manual-warning'`: Validates navigations for Instant UI in development when configured with `unstable_instant` in Pages and Layouts
* - `'warning'` (default): Validates all navigations for Instant UI in development
* - `'manual-warning'`: Validates navigations for Instant UI in development only when configured with `unstable_instant` in Pages and Layouts
* - `'experimental-error'`: Validates all navigations for Instant in development and build. Use with caution.
* - `'experimental-manual-error'`: Validates navigations for Instant UI in developement and build when configured with `unstable_instant` in Pages and Layouts. Use with caution.
* - `'experimental-manual-error'`: Validates navigations for Instant UI in development and build when configured with `unstable_instant` in Pages and Layouts. Use with caution.
*/
validationLevel?: ValidationLevel
}
Expand Down Expand Up @@ -2040,6 +2040,7 @@ export const defaultConfig = Object.freeze({
gestureTransition: false,
inlineCss: false,
useCache: undefined,
useNodeStreams: true,
slowModuleDetection: undefined,
globalNotFound: false,
browserDebugInfoInTerminal: 'warn',
Expand Down
Loading
Loading