diff --git a/.github/workflows/next-maintainer-auto-close.yml b/.github/workflows/next-maintainer-auto-close.yml index be6fc0d2b790..90a95b8abbfe 100644 --- a/.github/workflows/next-maintainer-auto-close.yml +++ b/.github/workflows/next-maintainer-auto-close.yml @@ -1,8 +1,8 @@ name: Next Maintainer Auto Close on: - # schedule: - # - cron: '0 * * * *' + schedule: + - cron: '0 * * * *' workflow_dispatch: permissions: {} diff --git a/lerna.json b/lerna.json index e68c386f5c53..0e8357705838 100644 --- a/lerna.json +++ b/lerna.json @@ -15,5 +15,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "16.4.0-canary.15" + "version": "16.4.0-canary.16" } \ No newline at end of file diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 634c4de0c66f..1dfab75117d0 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "keywords": [ "react", "next", diff --git a/packages/devlow-bench/package.json b/packages/devlow-bench/package.json index 4d53bc8e10a8..7d22f348a757 100644 --- a/packages/devlow-bench/package.json +++ b/packages/devlow-bench/package.json @@ -1,7 +1,7 @@ { "name": "@vercel/devlow-bench", "private": true, - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "description": "Benchmarking tool for the developer workflow", "repository": { "type": "git", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index 98e265c7b1ba..d606f932a789 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "description": "ESLint configuration used by Next.js.", "license": "MIT", "repository": { @@ -12,7 +12,7 @@ "dist" ], "dependencies": { - "@next/eslint-plugin-next": "16.4.0-canary.15", + "@next/eslint-plugin-next": "16.4.0-canary.16", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.32.0", diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index fbb5cf759380..7dbdc0faa745 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,7 +1,7 @@ { "name": "@next/eslint-plugin-internal", "private": true, - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "description": "ESLint plugin for working on Next.js.", "exports": { ".": "./src/eslint-plugin-internal.js" diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 7c76190fad19..8a0dee4b7e1b 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "description": "ESLint plugin for Next.js.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/font/package.json b/packages/font/package.json index 2d5da5c6171d..ca751e76d1c5 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,7 +1,7 @@ { "name": "@next/font", "private": true, - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 512ae7fda01a..576645539a85 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index 9a8ace35cc9e..968475bbf865 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index f7dd349643d8..5a9b4e791e35 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index c6a970f6fed6..75c64333b76a 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-playwright/package.json b/packages/next-playwright/package.json index 04a627cf0998..85f80e6471f4 100644 --- a/packages/next-playwright/package.json +++ b/packages/next-playwright/package.json @@ -1,6 +1,6 @@ { "name": "@next/playwright", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "repository": { "url": "vercel/next.js", "directory": "packages/next-playwright" diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index c5558b82f596..fe6cb52319f8 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index 7699b403c5cf..4a8fb86295ac 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "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", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 6f3bc6d86296..dbe1182ce040 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-routing/package.json b/packages/next-routing/package.json index 6e8bb886d5aa..ae35ea124f21 100644 --- a/packages/next-routing/package.json +++ b/packages/next-routing/package.json @@ -1,6 +1,6 @@ { "name": "@next/routing", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "keywords": [ "react", "next", diff --git a/packages/next-rspack/package.json b/packages/next-rspack/package.json index 3570bdb809c8..ad3571b100ef 100644 --- a/packages/next-rspack/package.json +++ b/packages/next-rspack/package.json @@ -1,6 +1,6 @@ { "name": "next-rspack", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "repository": { "url": "vercel/next.js", "directory": "packages/next-rspack" diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index 9c30528bf0d9..50bee277b85d 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "private": true, "files": [ "native/" diff --git a/packages/next/package.json b/packages/next/package.json index 735cbee4cabf..30cf3a52133d 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -100,7 +100,7 @@ ] }, "dependencies": { - "@next/env": "16.4.0-canary.15", + "@next/env": "16.4.0-canary.16", "@swc/helpers": "0.5.23", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", @@ -164,11 +164,11 @@ "@modelcontextprotocol/sdk": "1.18.1", "@mswjs/interceptors": "0.42.0", "@napi-rs/triples": "1.2.0", - "@next/font": "16.4.0-canary.15", - "@next/polyfill-module": "16.4.0-canary.15", - "@next/polyfill-nomodule": "16.4.0-canary.15", - "@next/react-refresh-utils": "16.4.0-canary.15", - "@next/swc": "16.4.0-canary.15", + "@next/font": "16.4.0-canary.16", + "@next/polyfill-module": "16.4.0-canary.16", + "@next/polyfill-nomodule": "16.4.0-canary.16", + "@next/react-refresh-utils": "16.4.0-canary.16", + "@next/swc": "16.4.0-canary.16", "@opentelemetry/api": "1.6.0", "@playwright/test": "1.61.0", "@rspack/core": "1.6.7", diff --git a/packages/next/src/cli/next-info.ts b/packages/next/src/cli/next-info.ts index b04a51370cfc..b177d038718b 100755 --- a/packages/next/src/cli/next-info.ts +++ b/packages/next/src/cli/next-info.ts @@ -78,12 +78,15 @@ async function getNextConfig() { function getBinaryVersion(binaryName: string) { try { return childProcess - .execFileSync(binaryName, ['--version']) + .execFileSync(binaryName, ['--version'], { stdio: 'pipe' }) .toString() .trim() } catch { try { - return childProcess.execSync(`${binaryName} --version`).toString().trim() + return childProcess + .execSync(`${binaryName} --version`, { stdio: 'pipe' }) + .toString() + .trim() } catch { return 'N/A' } diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index ab55f20025c3..43bed4c0c473 100644 --- a/packages/react-refresh-utils/package.json +++ b/packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { "name": "@next/react-refresh-utils", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "description": "An experimental package providing utilities for React Refresh.", "repository": { "url": "vercel/next.js", diff --git a/packages/third-parties/package.json b/packages/third-parties/package.json index 48bec5a7481f..0cadd9b395ca 100644 --- a/packages/third-parties/package.json +++ b/packages/third-parties/package.json @@ -1,6 +1,6 @@ { "name": "@next/third-parties", - "version": "16.4.0-canary.15", + "version": "16.4.0-canary.16", "repository": { "url": "vercel/next.js", "directory": "packages/third-parties" @@ -26,7 +26,7 @@ "third-party-capital": "1.0.20" }, "devDependencies": { - "next": "16.4.0-canary.15", + "next": "16.4.0-canary.16", "outdent": "0.8.0", "prettier": "2.5.1", "typescript": "6.0.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 438b05478bd3..da67dc7383df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1024,7 +1024,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 16.4.0-canary.15 + specifier: 16.4.0-canary.16 version: link:../eslint-plugin-next eslint: specifier: '>=9.0.0' @@ -1107,7 +1107,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 16.4.0-canary.15 + specifier: 16.4.0-canary.16 version: link:../next-env '@swc/helpers': specifier: 0.5.23 @@ -1228,19 +1228,19 @@ importers: specifier: 1.2.0 version: 1.2.0 '@next/font': - specifier: 16.4.0-canary.15 + specifier: 16.4.0-canary.16 version: link:../font '@next/polyfill-module': - specifier: 16.4.0-canary.15 + specifier: 16.4.0-canary.16 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 16.4.0-canary.15 + specifier: 16.4.0-canary.16 version: link:../next-polyfill-nomodule '@next/react-refresh-utils': - specifier: 16.4.0-canary.15 + specifier: 16.4.0-canary.16 version: link:../react-refresh-utils '@next/swc': - specifier: 16.4.0-canary.15 + specifier: 16.4.0-canary.16 version: link:../next-swc '@opentelemetry/api': specifier: 1.6.0 @@ -1983,7 +1983,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 16.4.0-canary.15 + specifier: 16.4.0-canary.16 version: link:../next outdent: specifier: 0.8.0 diff --git a/test/deploy-tests-manifest.json b/test/deploy-tests-manifest.json index 2b83e66d4be8..8ad3b98aa8b3 100644 --- a/test/deploy-tests-manifest.json +++ b/test/deploy-tests-manifest.json @@ -104,7 +104,6 @@ "test/e2e/app-dir/modularizeimports/modularizeimports.test.ts", "test/e2e/app-dir/third-parties/basic.test.ts", "test/e2e/app-dir/app-static/app-static-custom-handler.test.ts", - "test/e2e/app-dir/options-request/options-request.test.ts", "test/e2e/app-dir/revalidate-dynamic/revalidate-dynamic.test.ts", "test/e2e/app-dir/syntax-highlighter-crash/syntax-highlighter-crash.test.ts", "test/e2e/new-link-behavior/stitches.test.ts", @@ -117,8 +116,7 @@ "test/e2e/postcss-config-cjs/index.test.ts", "test/e2e/socket-io/index.test.ts", "test/e2e/middleware-matcher/index.test.ts", - "test/e2e/next-script/index.test.ts", - "test/production/standalone-mode/**/*" + "test/e2e/next-script/index.test.ts" ] } } diff --git a/test/e2e/cli/cli.test.ts b/test/e2e/cli/cli.test.ts index d5ea1d1d10f0..8f0c40f7207a 100644 --- a/test/e2e/cli/cli.test.ts +++ b/test/e2e/cli/cli.test.ts @@ -4,6 +4,7 @@ import path, { join } from 'path' // @ts-expect-error import pkg from 'next/package' import http from 'http' +import { promises as fs } from 'fs' import stripAnsi from 'strip-ansi' import type { ChildProcess } from 'child_process' @@ -1151,6 +1152,44 @@ Next.js Config: matchInfoOutput(info.stdout) }) + test('should not leak package manager command errors', async () => { + const marker = 'next-info-yarn-command-not-found' + const binDir = await fs.mkdtemp(join(next.testDir, 'next-info-bin-')) + const pathKey = + Object.keys(process.env).find((key) => key.toLowerCase() === 'path') ?? + 'PATH' + const yarnPath = join( + binDir, + process.platform === 'win32' ? 'yarn.cmd' : 'yarn' + ) + + try { + await fs.writeFile( + yarnPath, + process.platform === 'win32' + ? `@echo off\r\necho ${marker} 1>&2\r\nexit /b 1\r\n` + : `#!/bin/sh\necho ${marker} >&2\nexit 1\n` + ) + if (process.platform !== 'win32') { + await fs.chmod(yarnPath, 0o755) + } + + const info = await next.runCommand(['info'], { + env: { + [pathKey]: `${binDir}${path.delimiter}${process.env[pathKey] ?? ''}`, + // Match issue #97932's npm project so the fake Yarn only exercises + // binary version detection, not registry discovery. + npm_config_user_agent: 'npm', + }, + }) + + expect(info.stdout).toContain('Yarn: N/A') + expect(info.stderr).not.toContain(marker) + } finally { + await fs.rm(binDir, { recursive: true, force: true }) + } + }) + test('should print output with next.config.mjs', async () => { let info = { stdout: '', stderr: '' } const originalPkg = await next.readFile('package.json')