diff --git a/crates/next-api/src/additional_roots.rs b/crates/next-api/src/additional_roots.rs index 06c0656027bf..fc3117dfc6ff 100644 --- a/crates/next-api/src/additional_roots.rs +++ b/crates/next-api/src/additional_roots.rs @@ -13,8 +13,7 @@ use turbo_tasks::{ FxIndexMap, NonLocalValue, OperationValue, OperationVc, ReadRef, ResolvedVc, Vc, }; use turbo_tasks_fs::{ - DiskFileSystem, DiskFileSystemMap, DiskWatcherConfig, DiskWatcherRecursiveMode, FileSystemPath, - canonicalize_to_rcstr, + DiskFileSystem, DiskFileSystemMap, DiskWatcherConfig, FileSystemPath, canonicalize_to_rcstr, }; use turbopack_core::issue::{Issue, IssueSeverity, IssueStage, PlainIssue, StyledString}; @@ -194,12 +193,7 @@ pub(crate) async fn create_additional_root_file_systems( RcStr::from(format!("@{}", additional_root.key)), canonical_root, Vec::new(), - DiskWatcherConfig { - // we assume that most files in an additional root won't be read, so a recursive - // watcher may be more expensive than we'd like, always use a non-recursive watcher. - recursive_mode: Some(DiskWatcherRecursiveMode::NonRecursive), - ..watcher_config - }, + watcher_config, map, ); roots_by_name.insert( diff --git a/lerna.json b/lerna.json index f5e7253055bc..b9a6ed83e1a0 100644 --- a/lerna.json +++ b/lerna.json @@ -11,5 +11,5 @@ ] } }, - "version": "16.4.0-canary.51" + "version": "16.4.0-canary.52" } \ No newline at end of file diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 22ec92e582c8..df6ebc6469c7 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.51", + "version": "16.4.0-canary.52", "keywords": [ "react", "next", diff --git a/packages/devlow-bench/package.json b/packages/devlow-bench/package.json index 3436a2c603e0..345c2dad39f5 100644 --- a/packages/devlow-bench/package.json +++ b/packages/devlow-bench/package.json @@ -1,6 +1,6 @@ { "name": "@vercel/devlow-bench", - "version": "16.4.0-canary.51", + "version": "16.4.0-canary.52", "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 455f7039143f..fd3d5592080b 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.51", + "version": "16.4.0-canary.52", "description": "ESLint configuration used by Next.js.", "license": "MIT", "repository": { @@ -12,7 +12,7 @@ "dist" ], "dependencies": { - "@next/eslint-plugin-next": "16.4.0-canary.51", + "@next/eslint-plugin-next": "16.4.0-canary.52", "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 7352c1605505..80f364891475 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.51", + "version": "16.4.0-canary.52", "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 1974c3decc08..9b4f7c515298 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.51", + "version": "16.4.0-canary.52", "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 dd8b1ba70466..676c72c04734 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.51", + "version": "16.4.0-canary.52", "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 9946587bcea2..bc40b1adcd51 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.51", + "version": "16.4.0-canary.52", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index a188208753c4..c3e3f32e18fa 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.51", + "version": "16.4.0-canary.52", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index 33fe8739b1d0..e590f865361f 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.51", + "version": "16.4.0-canary.52", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index d4fb955cc67b..6023e5111e89 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.51", + "version": "16.4.0-canary.52", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-playwright/package.json b/packages/next-playwright/package.json index 4b0e55b4a1a5..8182caac634f 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.51", + "version": "16.4.0-canary.52", "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 7167d1b0338c..bfd0e0d78c40 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.51", + "version": "16.4.0-canary.52", "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 add58c6f3a1e..4c1df3e013d3 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.51", + "version": "16.4.0-canary.52", "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 4cf4b06ba2a0..c8485e0d773b 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.51", + "version": "16.4.0-canary.52", "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 5e21122b4ec2..b7de53fc0bc2 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.51", + "version": "16.4.0-canary.52", "keywords": [ "react", "next", diff --git a/packages/next-rspack/package.json b/packages/next-rspack/package.json index 261b6d5cb0f6..b6372f2086ef 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.51", + "version": "16.4.0-canary.52", "repository": { "url": "vercel/next.js", "directory": "packages/next-rspack" diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index 4fdf0cf8f98c..83fffebb24a5 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.51", + "version": "16.4.0-canary.52", "private": true, "files": [ "native/" diff --git a/packages/next/package.json b/packages/next/package.json index d63446d1a65c..8314414acd02 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "16.4.0-canary.51", + "version": "16.4.0-canary.52", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -100,7 +100,7 @@ ] }, "dependencies": { - "@next/env": "16.4.0-canary.51", + "@next/env": "16.4.0-canary.52", "@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.5", "@napi-rs/triples": "1.2.0", - "@next/font": "16.4.0-canary.51", - "@next/polyfill-module": "16.4.0-canary.51", - "@next/polyfill-nomodule": "16.4.0-canary.51", - "@next/react-refresh-utils": "16.4.0-canary.51", - "@next/swc": "16.4.0-canary.51", + "@next/font": "16.4.0-canary.52", + "@next/polyfill-module": "16.4.0-canary.52", + "@next/polyfill-nomodule": "16.4.0-canary.52", + "@next/react-refresh-utils": "16.4.0-canary.52", + "@next/swc": "16.4.0-canary.52", "@opentelemetry/api": "1.6.0", "@playwright/test": "1.61.0", "@rspack/core": "1.6.7", diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json index 5bd53a60030d..53851f7f858a 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.51", + "version": "16.4.0-canary.52", "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 76dafeba1da9..905755d308ab 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.51", + "version": "16.4.0-canary.52", "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.51", + "next": "16.4.0-canary.52", "outdent": "0.8.0", "prettier": "2.5.1", "typescript": "6.0.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 45676f401e6e..b4eabab6f062 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1030,7 +1030,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 16.4.0-canary.51 + specifier: 16.4.0-canary.52 version: link:../eslint-plugin-next eslint: specifier: '>=9.0.0' @@ -1113,7 +1113,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 16.4.0-canary.51 + specifier: 16.4.0-canary.52 version: link:../next-env '@swc/helpers': specifier: 0.5.23 @@ -1234,19 +1234,19 @@ importers: specifier: 1.2.0 version: 1.2.0 '@next/font': - specifier: 16.4.0-canary.51 + specifier: 16.4.0-canary.52 version: link:../font '@next/polyfill-module': - specifier: 16.4.0-canary.51 + specifier: 16.4.0-canary.52 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 16.4.0-canary.51 + specifier: 16.4.0-canary.52 version: link:../next-polyfill-nomodule '@next/react-refresh-utils': - specifier: 16.4.0-canary.51 + specifier: 16.4.0-canary.52 version: link:../react-refresh-utils '@next/swc': - specifier: 16.4.0-canary.51 + specifier: 16.4.0-canary.52 version: link:../next-swc '@opentelemetry/api': specifier: 1.6.0 @@ -1989,7 +1989,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 16.4.0-canary.51 + specifier: 16.4.0-canary.52 version: link:../next outdent: specifier: 0.8.0 diff --git a/test/e2e/500-page/500-page-build.test.ts b/test/e2e/500-page/500-page-build.test.ts index 95c2a92d0d01..838df2d67094 100644 --- a/test/e2e/500-page/500-page-build.test.ts +++ b/test/e2e/500-page/500-page-build.test.ts @@ -1,15 +1,17 @@ -import { isNextDev, nextTestSetup } from 'e2e-utils' +import { nextTestSetup } from 'e2e-utils' // This test exercises `next build` outputs and `next start` behaviour, so it // is meaningless in dev mode where the dev server bypasses production build // artifacts (e.g. statically prerendered 500.html from getStaticProps). -;(isNextDev ? describe.skip : describe)('500 Page build validation', () => { - const { next, skipped } = nextTestSetup({ +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely expects a local build failure instead of a successful deployment. +// @force-gate !deploy +// @force-gate !dev +describe('500 Page build validation', () => { + const { next } = nextTestSetup({ files: __dirname, skipStart: true, - skipDeployment: true, }) - if (skipped) return const gip500Err = /`pages\/500` can not have getInitialProps\/getServerSideProps/ diff --git a/test/e2e/app-dir-export/test/dynamic-missing-gsp.test.ts b/test/e2e/app-dir-export/test/dynamic-missing-gsp.test.ts index dab9aa946387..db623e94c8de 100644 --- a/test/e2e/app-dir-export/test/dynamic-missing-gsp.test.ts +++ b/test/e2e/app-dir-export/test/dynamic-missing-gsp.test.ts @@ -1,6 +1,8 @@ import { isNextDev } from 'e2e-utils' import { runTests } from './utils' +// These cases patch fixture files and manually run local builds. +// @force-gate !deploy describe('app dir - with output export - dynamic missing gsp', () => { describe('should error when dynamic route is missing generateStaticParams', () => { runTests({ diff --git a/test/e2e/app-dir-export/test/dynamicapiroute.test.ts b/test/e2e/app-dir-export/test/dynamicapiroute.test.ts index 3b4107ea14d5..ad509837d0f1 100644 --- a/test/e2e/app-dir-export/test/dynamicapiroute.test.ts +++ b/test/e2e/app-dir-export/test/dynamicapiroute.test.ts @@ -1,5 +1,7 @@ import { runTests } from './utils' +// These cases patch fixture files and manually run local builds. +// @force-gate !deploy describe('app dir - with output export - dynamic api route', () => { describe.each([ { diff --git a/test/e2e/app-dir-export/test/dynamicpage.test.ts b/test/e2e/app-dir-export/test/dynamicpage.test.ts index ae53c3b536b2..6c3ff3ad5d6f 100644 --- a/test/e2e/app-dir-export/test/dynamicpage.test.ts +++ b/test/e2e/app-dir-export/test/dynamicpage.test.ts @@ -1,5 +1,7 @@ import { runTests } from './utils' +// These cases patch fixture files and manually run local builds. +// @force-gate !deploy describe('app dir - with output export - dynamic api route', () => { describe.each([ { dynamicPage: 'undefined' }, diff --git a/test/e2e/app-dir-export/test/trailing-slash.test.ts b/test/e2e/app-dir-export/test/trailing-slash.test.ts index 716fa9e3cc47..dc737a71fb60 100644 --- a/test/e2e/app-dir-export/test/trailing-slash.test.ts +++ b/test/e2e/app-dir-export/test/trailing-slash.test.ts @@ -1,5 +1,7 @@ import { runTests } from './utils' +// These cases patch fixture files and manually run local builds. +// @force-gate !deploy describe('app dir - with output export - trailing slash', () => { describe.each([{ trailingSlash: false }, { trailingSlash: true }])( "should work in prod with trailingSlash '$trailingSlash'", diff --git a/test/e2e/app-dir-export/test/utils.ts b/test/e2e/app-dir-export/test/utils.ts index 5415573f5098..fc89aacf86d2 100644 --- a/test/e2e/app-dir-export/test/utils.ts +++ b/test/e2e/app-dir-export/test/utils.ts @@ -227,15 +227,11 @@ export function runTests({ | 'set wrong param' expectedErrMsg?: string | RegExp }) { - let { next, skipped, isNextDev } = nextTestSetup({ + let { next, isNextDev } = nextTestSetup({ files: join(__dirname, '..'), - skipDeployment: true, skipStart: true, disableAutoSkewProtection: true, }) - if (skipped) { - return - } beforeAll(async () => { if (trailingSlash !== undefined) { diff --git a/test/e2e/app-dir/actions/app-action-export.test.ts b/test/e2e/app-dir/actions/app-action-export.test.ts index 66288756848c..4aa78e0a531e 100644 --- a/test/e2e/app-dir/actions/app-action-export.test.ts +++ b/test/e2e/app-dir/actions/app-action-export.test.ts @@ -1,16 +1,17 @@ import { nextTestSetup } from 'e2e-utils' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely asserts local CLI or runtime output that deploy tests do not expose. +// @force-gate !deploy describe('app-dir action handling - next export', () => { - const { next, isNextStart, skipped } = nextTestSetup({ + const { next, isNextStart } = nextTestSetup({ files: __dirname, skipStart: true, - skipDeployment: true, dependencies: { nanoid: '4.0.1', 'server-only': 'latest', }, }) - if (skipped) return if (!isNextStart) { it('skip test for development mode', () => {}) diff --git a/test/e2e/app-dir/app-compilation/index.test.ts b/test/e2e/app-dir/app-compilation/index.test.ts index a0eef396de5a..524dee09ad34 100644 --- a/test/e2e/app-dir/app-compilation/index.test.ts +++ b/test/e2e/app-dir/app-compilation/index.test.ts @@ -1,14 +1,17 @@ import { nextTestSetup } from 'e2e-utils' import { waitForNoRedbox, retry } from 'next-test-utils' +// Deploy mode exclusion: This suite only defines assertions for local dev or start modes. +// This is skipped when deployed because there are no assertions outside of next start/next dev +// @force-gate !deploy describe('app dir', () => { - const { next, isNextDev, isNextStart, skipped } = nextTestSetup({ + const { next, isNextDev, isNextStart, isNextDeploy } = nextTestSetup({ files: __dirname, - // This is skipped when deployed because there are no assertions outside of next start/next dev - skipDeployment: true, }) - if (skipped) return + if (isNextDeploy) { + it('is excluded from deploy testing by @force-gate', () => {}) + } if (isNextStart) { describe('Loading', () => { diff --git a/test/e2e/app-dir/app-config-crossorigin/index.test.ts b/test/e2e/app-dir/app-config-crossorigin/index.test.ts index 79f7acf6e931..2bf3ece0e998 100644 --- a/test/e2e/app-dir/app-config-crossorigin/index.test.ts +++ b/test/e2e/app-dir/app-config-crossorigin/index.test.ts @@ -34,10 +34,11 @@ if (!isNextStart) { }) } else { describe('app dir - unset crossOrigin config', () => { + // Deploy mode exclusion: This branch only runs in next start mode. + // @force-gate !deploy describe('default output', () => { const { next } = nextTestSetup({ files: path.join(__dirname, 'default'), - skipDeployment: true, }) function expectCrossOriginAttributesToBeOmitted( @@ -61,6 +62,9 @@ if (!isNextStart) { }) if (process.env.__NEXT_CACHE_COMPONENTS !== 'true') { + // Deploy mode exclusion: This test builds and starts the exported app + // through a local custom server. + // @force-gate !deploy describe('output: export', () => { const { next } = nextTestSetup({ files: path.join(__dirname, 'default'), @@ -68,7 +72,6 @@ if (!isNextStart) { NEXT_TEST_OUTPUT_EXPORT: '1', }, skipStart: true, - skipDeployment: true, startCommand: 'node server.mjs', serverReadyPattern: /- Local:/, }) diff --git a/test/e2e/app-dir/bun-externals/bun-externals.test.ts b/test/e2e/app-dir/bun-externals/bun-externals.test.ts index 0243f53a5d26..c38f6aabb7d4 100644 --- a/test/e2e/app-dir/bun-externals/bun-externals.test.ts +++ b/test/e2e/app-dir/bun-externals/bun-externals.test.ts @@ -1,15 +1,13 @@ import { nextTestSetup } from 'e2e-utils' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely inspects local build artifacts that deploy tests do not expose. +// @force-gate !deploy describe('app-dir - bun externals', () => { - const { next, isNextDev, isTurbopack, skipped } = nextTestSetup({ + const { next, isNextDev, isTurbopack } = nextTestSetup({ files: __dirname, - skipDeployment: true, }) - if (skipped) { - return - } - it('should handle bun builtins as external modules', async () => { const $ = await next.render$('/') diff --git a/test/e2e/app-dir/non-root-project-monorepo/non-root-project-monorepo.test.ts b/test/e2e/app-dir/non-root-project-monorepo/non-root-project-monorepo.test.ts index c3b0f4cf9e91..297d4bd25cf4 100644 --- a/test/e2e/app-dir/non-root-project-monorepo/non-root-project-monorepo.test.ts +++ b/test/e2e/app-dir/non-root-project-monorepo/non-root-project-monorepo.test.ts @@ -7,8 +7,11 @@ import { } from 'next-test-utils' import * as path from 'path' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely controls the local Next.js build or server lifecycle. +// @force-gate !deploy describe('non-root-project-monorepo', () => { - const { next, skipped, isTurbopack, isNextDev, isRspack } = nextTestSetup({ + const { next, isTurbopack, isNextDev, isRspack } = nextTestSetup({ files: { apps: new FileRef(path.resolve(__dirname, 'apps')), packages: new FileRef(path.resolve(__dirname, 'packages')), @@ -24,13 +27,8 @@ describe('non-root-project-monorepo', () => { buildCommand: 'pnpm build', startCommand: (global as any).isNextDev ? 'pnpm dev' : 'pnpm start', installCommand: 'pnpm i', - skipDeployment: true, }) - if (skipped) { - return - } - describe('server relative import', () => { it('should resolve a `/`-rooted import from the project directory, not the workspace root', async () => { // `/content/where` exists both in apps/web (the project directory) and at diff --git a/test/e2e/app-dir/nx-handling/nx-handling.test.ts b/test/e2e/app-dir/nx-handling/nx-handling.test.ts index e94cbc8cc3fd..0da9911ce54f 100644 --- a/test/e2e/app-dir/nx-handling/nx-handling.test.ts +++ b/test/e2e/app-dir/nx-handling/nx-handling.test.ts @@ -1,8 +1,10 @@ import { nextTestSetup, isNextDev } from 'e2e-utils' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely controls the local Next.js build or server lifecycle. +// @force-gate !deploy describe('nx-handling', () => { const { next } = nextTestSetup({ - skipDeployment: true, files: __dirname, buildCommand: 'pnpm run build', startCommand: isNextDev ? 'pnpm run dev' : 'pnpm run start', diff --git a/test/e2e/app-dir/proxy-missing-export/proxy-missing-export.test.ts b/test/e2e/app-dir/proxy-missing-export/proxy-missing-export.test.ts index eee780a13f1e..d683a82999ed 100644 --- a/test/e2e/app-dir/proxy-missing-export/proxy-missing-export.test.ts +++ b/test/e2e/app-dir/proxy-missing-export/proxy-missing-export.test.ts @@ -15,17 +15,15 @@ To fix it: Learn more: https://nextjs.org/docs/messages/middleware-to-proxy` +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely asserts local CLI or runtime output that deploy tests do not expose. +// @force-gate !deploy describe('proxy-missing-export', () => { - const { next, isNextDev, skipped } = nextTestSetup({ + const { next, isNextDev } = nextTestSetup({ files: __dirname, - skipDeployment: true, skipStart: true, }) - if (skipped) { - return - } - it('should error when proxy file has invalid export named middleware', async () => { await writeFile( join(next.testDir, 'proxy.ts'), diff --git a/test/e2e/app-dir/rsc-webpack-loader/rsc-webpack-loader.test.ts b/test/e2e/app-dir/rsc-webpack-loader/rsc-webpack-loader.test.ts index 6573be9c5267..9d64f719c918 100644 --- a/test/e2e/app-dir/rsc-webpack-loader/rsc-webpack-loader.test.ts +++ b/test/e2e/app-dir/rsc-webpack-loader/rsc-webpack-loader.test.ts @@ -1,6 +1,8 @@ import { nextTestSetup } from 'e2e-utils' // Skip as Turbopack doesn't support the `!=!` Webpack syntax +// TODO(deploy-test-completion): Remove this suite from the deploy manifest. +// It was excluded as a known deploy failure without a documented root cause. ;(process.env.IS_TURBOPACK_TEST ? describe.skip : describe)( 'app dir - rsc webpack loader', () => { diff --git a/test/e2e/app-dir/self-importing-package/self-importing-package.test.ts b/test/e2e/app-dir/self-importing-package/self-importing-package.test.ts index fedfec117665..765a7f41a999 100644 --- a/test/e2e/app-dir/self-importing-package/self-importing-package.test.ts +++ b/test/e2e/app-dir/self-importing-package/self-importing-package.test.ts @@ -1,12 +1,13 @@ import { nextTestSetup } from 'e2e-utils' import path from 'path' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// This test is skipped when deployed because the local tarball appears corrupted +// It also doesn't seem particularly useful to test when deployed +// @force-gate !deploy describe('self-importing-package', () => { const { next } = nextTestSetup({ files: __dirname, - // This test is skipped when deployed because the local tarball appears corrupted - // It also doesn't seem particularly useful to test when deployed - skipDeployment: true, dependencies: { 'internal-pkg': `file:${path.join(__dirname, 'internal-pkg.tar')}`, }, diff --git a/test/e2e/app-dir/server-components-externals/index.test.ts b/test/e2e/app-dir/server-components-externals/index.test.ts index ab6e6cf6b075..2b6208ce90b6 100644 --- a/test/e2e/app-dir/server-components-externals/index.test.ts +++ b/test/e2e/app-dir/server-components-externals/index.test.ts @@ -1,15 +1,14 @@ import path from 'path' import { nextTestSetup } from 'e2e-utils' +// Deploy mode exclusion: This suite manually changes the local `node_modules` tree. +// This test is skipped when deployed because it relies on manually patched `node_modules` +// @force-gate !deploy describe('app-dir - server components externals', () => { - const { next, isTurbopack, skipped } = nextTestSetup({ - // This test is skipped when deployed because it relies on manually patched `node_modules` - skipDeployment: true, + const { next, isTurbopack } = nextTestSetup({ files: __dirname, }) - if (skipped) return - it('should have externals for those in config.serverExternalPackages', async () => { const $ = await next.render$('/') diff --git a/test/e2e/app-dir/sub-shell-generation-middleware/app/[first]/~/overview/grid/page.tsx b/test/e2e/app-dir/sub-shell-generation-middleware/app/[first]/~/overview/grid/page.tsx index 4b318bf85520..ee3ae9582df1 100644 --- a/test/e2e/app-dir/sub-shell-generation-middleware/app/[first]/~/overview/grid/page.tsx +++ b/test/e2e/app-dir/sub-shell-generation-middleware/app/[first]/~/overview/grid/page.tsx @@ -1,7 +1,7 @@ async function getMetadata() { 'use cache' return { - title: `Grid Page ${Math.random()}`, + title: `Grid Page ${Math.random().toFixed(16)}`, } } diff --git a/test/e2e/app-dir/typed-routes-validator/typed-routes-validator.test.ts b/test/e2e/app-dir/typed-routes-validator/typed-routes-validator.test.ts index baf07d2e6283..09533b7b47eb 100644 --- a/test/e2e/app-dir/typed-routes-validator/typed-routes-validator.test.ts +++ b/test/e2e/app-dir/typed-routes-validator/typed-routes-validator.test.ts @@ -5,17 +5,15 @@ import { getDistDir, retry } from 'next-test-utils' const strictRouteTypes = process.env.__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES === 'true' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely expects a local build failure instead of a successful deployment. +// @force-gate !deploy describe('typed-routes-validator', () => { - const { next, isNextDev, isNextStart, skipped } = nextTestSetup({ + const { next, isNextDev, isNextStart } = nextTestSetup({ files: __dirname, - skipDeployment: true, skipStart: true, }) - if (skipped) { - return - } - it('should generate route validation correctly', async () => { if (isNextDev) { await next.start() diff --git a/test/e2e/app-dir/typed-routes/typed-links.test.ts b/test/e2e/app-dir/typed-routes/typed-links.test.ts index 229c8febe727..460e75ff555d 100644 --- a/test/e2e/app-dir/typed-routes/typed-links.test.ts +++ b/test/e2e/app-dir/typed-routes/typed-links.test.ts @@ -1,16 +1,14 @@ import { nextTestSetup } from 'e2e-utils' import { retry } from 'next-test-utils' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely expects a local build failure instead of a successful deployment. +// @force-gate !deploy describe('typed-links', () => { - const { next, isNextStart, skipped } = nextTestSetup({ + const { next, isNextStart } = nextTestSetup({ files: __dirname, - skipDeployment: true, }) - if (skipped) { - return - } - it('should generate types for next/link', async () => { await retry(async () => { const dts = await next.readFile(`${next.distDir}/types/link.d.ts`) diff --git a/test/e2e/app-dir/typed-routes/typed-routes.test.ts b/test/e2e/app-dir/typed-routes/typed-routes.test.ts index def58edbe07d..d0de13a247e4 100644 --- a/test/e2e/app-dir/typed-routes/typed-routes.test.ts +++ b/test/e2e/app-dir/typed-routes/typed-routes.test.ts @@ -12,16 +12,14 @@ type RewriteRoutes = "/api-legacy/[version]/[[...endpoint]]" | "/docs-old/[...pa type Routes = AppRoutes | PageRoutes | LayoutRoutes | RedirectRoutes | RewriteRoutes | AppRouteHandlerRoutes ` +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely asserts local CLI or runtime output that deploy tests do not expose. +// @force-gate !deploy describe('typed-routes', () => { - const { next, isNextDev, isNextStart, skipped } = nextTestSetup({ + const { next, isNextDev, isNextStart } = nextTestSetup({ files: __dirname, - skipDeployment: true, }) - if (skipped) { - return - } - it('should generate route types correctly', async () => { // Route type generation happens after the "Ready" log fires; give it time. await retry(async () => { diff --git a/test/e2e/app-dir/typegen-bundler-env/typegen-bundler-env.test.ts b/test/e2e/app-dir/typegen-bundler-env/typegen-bundler-env.test.ts index 69abe382a0b2..fce850394b8d 100644 --- a/test/e2e/app-dir/typegen-bundler-env/typegen-bundler-env.test.ts +++ b/test/e2e/app-dir/typegen-bundler-env/typegen-bundler-env.test.ts @@ -11,17 +11,15 @@ const baseEnv = { // cssChunking: "graph", is Turbopack-only, so we use this as to verify whether // typegen is selecting the right bundler +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely controls the local Next.js build or server lifecycle. +// @force-gate !deploy describe('typegen bundler env', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: __dirname, - skipDeployment: true, skipStart: true, }) - if (skipped) { - return - } - it('defaults to Turbopack, accepting Turbopack-only config', async () => { const { code } = await runNextCommand(['typegen', next.testDir], { stderr: true, diff --git a/test/e2e/app-dir/typegen-error-diagnostic/typegen-error-diagnostic.test.ts b/test/e2e/app-dir/typegen-error-diagnostic/typegen-error-diagnostic.test.ts index 2cf1123f95e8..52347b4bfea0 100644 --- a/test/e2e/app-dir/typegen-error-diagnostic/typegen-error-diagnostic.test.ts +++ b/test/e2e/app-dir/typegen-error-diagnostic/typegen-error-diagnostic.test.ts @@ -1,18 +1,16 @@ import { nextTestSetup } from 'e2e-utils' import { runNextCommand } from 'next-test-utils' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely controls the local Next.js build or server lifecycle. +// @force-gate !deploy describe('typegen error diagnostic', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: __dirname, - skipDeployment: true, // We drive `next typegen` manually; no server needed. skipStart: true, }) - if (skipped) { - return - } - it('fails loudly with an actionable message when route types cannot be generated', async () => { // `next typegen` runs with NODE_ENV=production, which makes the fixture's // next.config.js throw on the missing SOME_REQUIRED_TOKEN (the same shape as diff --git a/test/e2e/build-indicator/test/index.test.ts b/test/e2e/build-indicator/test/index.test.ts index 5f7233c14bf8..e598c5404cf6 100644 --- a/test/e2e/build-indicator/test/index.test.ts +++ b/test/e2e/build-indicator/test/index.test.ts @@ -22,6 +22,7 @@ const installCheckVisible = (browser) => { describe('Build Activity Indicator', () => { // Use describe.skip so that this suite does not fail with "no tests" during deploy tests. + // Deploy mode exclusion: This nested suite intentionally fails a local build and asserts its CLI diagnostics. ;(isNextDeploy ? describe.skip : describe)('Invalid position config', () => { const { next } = nextTestSetup({ files: join(__dirname, '..'), diff --git a/test/e2e/cli/cli.test.ts b/test/e2e/cli/cli.test.ts index 7d4893a3b06d..c1b02a5c2cdd 100644 --- a/test/e2e/cli/cli.test.ts +++ b/test/e2e/cli/cli.test.ts @@ -15,12 +15,14 @@ const reactDependencies = { 'react-dom': '19.3.0-canary-fef12a01-20260413', } +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely mutates files in the isolated local fixture after setup. +// @force-gate !deploy describe('CLI Usage', () => { const { next, isNextStart } = nextTestSetup({ files: join(__dirname, 'basic'), skipStart: true, dependencies: reactDependencies, - skipDeployment: true, }) /** diff --git a/test/e2e/dist-dir/dist-dir.test.ts b/test/e2e/dist-dir/dist-dir.test.ts index 20b99a1eb242..61edf0baf556 100644 --- a/test/e2e/dist-dir/dist-dir.test.ts +++ b/test/e2e/dist-dir/dist-dir.test.ts @@ -1,12 +1,13 @@ import { nextTestSetup, isNextDev, isNextStart } from 'e2e-utils' import { BUILD_ID_FILE, BUILD_MANIFEST } from 'next/constants' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely asserts local CLI or runtime output that deploy tests do not expose. +// @force-gate !deploy describe('distDir', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: __dirname, - skipDeployment: true, }) - if (skipped) return it('should render the page', async () => { const html = await next.render('/') @@ -28,11 +29,10 @@ describe('distDir', () => { if (isNextStart) { describe('distDir config validation', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: __dirname, skipStart: true, }) - if (skipped) return it('should throw error with invalid distDir', async () => { const origConfig = await next.readFile('next.config.js') diff --git a/test/e2e/env-config/env-config.test.ts b/test/e2e/env-config/env-config.test.ts index 2d6f076df9c4..4ebc8ac7d73f 100644 --- a/test/e2e/env-config/env-config.test.ts +++ b/test/e2e/env-config/env-config.test.ts @@ -2,16 +2,17 @@ import { nextTestSetup, isNextDev } from 'e2e-utils' import { retry } from 'next-test-utils' import cheerio from 'cheerio' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely asserts local CLI or runtime output that deploy tests do not expose. +// @force-gate !deploy describe('env-config', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: __dirname, env: { PROCESS_ENV_KEY: 'processenvironment', ENV_FILE_PROCESS_ENV: 'env-cli', }, - skipDeployment: true, }) - if (skipped) return const getEnvFromHtml = async (path: string) => { const html = await next.render(path) diff --git a/test/e2e/jsconfig-paths/jsconfig-paths.test.ts b/test/e2e/jsconfig-paths/jsconfig-paths.test.ts index d9ca1e896634..6cbc246ee799 100644 --- a/test/e2e/jsconfig-paths/jsconfig-paths.test.ts +++ b/test/e2e/jsconfig-paths/jsconfig-paths.test.ts @@ -2,13 +2,13 @@ import { nextTestSetup, isNextDev, isNextStart } from 'e2e-utils' import { retry } from 'next-test-utils' import stripAnsi from 'next/dist/compiled/strip-ansi' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely asserts local CLI or runtime output that deploy tests do not expose. +// @force-gate !deploy describe('jsconfig paths', () => { - const { next, isNextDeploy, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: __dirname, - skipDeployment: true, }) - if (skipped) return - if (isNextDeploy) return it('should alias components', async () => { const $ = await next.render$('/basic-alias') @@ -96,13 +96,14 @@ describe('jsconfig paths', () => { } }) +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely asserts local CLI or runtime output that deploy tests do not expose. +// @force-gate !deploy describe('jsconfig paths without baseurl', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: __dirname, skipStart: true, - skipDeployment: true, }) - if (skipped) return let originalJsconfigContent: string diff --git a/test/e2e/next-analyze/next-analyze.test.ts b/test/e2e/next-analyze/next-analyze.test.ts index 9dd10711b2a4..793248464fac 100644 --- a/test/e2e/next-analyze/next-analyze.test.ts +++ b/test/e2e/next-analyze/next-analyze.test.ts @@ -4,6 +4,9 @@ import path from 'node:path' import type { ChildProcess } from 'node:child_process' import { existsSync, readFileSync } from 'node:fs' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely inspects local build artifacts that deploy tests do not expose. +// @force-gate !deploy describe('next analyze', () => { if (!shouldUseTurbopack()) { // Test suites require at least one test @@ -11,18 +14,11 @@ describe('next analyze', () => { return } - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: __dirname, skipStart: true, - skipDeployment: true, }) - if (skipped) { - // Test suites require at least one test - it('is skipped', () => {}) - return - } - it('runs successfully without errors', async () => { let serveProcess: ChildProcess | undefined let stdoutBuffer = '' diff --git a/test/e2e/nullish-config/nullish-config.test.ts b/test/e2e/nullish-config/nullish-config.test.ts index 8d2997193641..00ab320abc8c 100644 --- a/test/e2e/nullish-config/nullish-config.test.ts +++ b/test/e2e/nullish-config/nullish-config.test.ts @@ -1,12 +1,13 @@ import { nextTestSetup, isNextDev } from 'e2e-utils' +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely asserts local CLI or runtime output that deploy tests do not expose. +// @force-gate !deploy describe('Nullish configs in next.config.js', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: __dirname, skipStart: true, - skipDeployment: true, }) - if (skipped) return afterEach(async () => { await next.stop().catch(() => {}) diff --git a/test/e2e/react-compiler/react-compiler.test.ts b/test/e2e/react-compiler/react-compiler.test.ts index 253466f71064..565b0490f87e 100644 --- a/test/e2e/react-compiler/react-compiler.test.ts +++ b/test/e2e/react-compiler/react-compiler.test.ts @@ -16,6 +16,8 @@ function normalizeCodeLocInfo(str) { ) } +// TODO(deploy-test-completion): Remove this suite from the deploy manifest. +// It was excluded as a known deploy failure without a documented root cause. describe.each(['default', 'babelrc', 'rust'] as const)( 'react-compiler %s', (variant) => { diff --git a/test/e2e/relay-graphql-swc-multi-project/relay-graphql-swc-multi-project.test.ts b/test/e2e/relay-graphql-swc-multi-project/relay-graphql-swc-multi-project.test.ts index 76771a1ecf62..7213a7488615 100644 --- a/test/e2e/relay-graphql-swc-multi-project/relay-graphql-swc-multi-project.test.ts +++ b/test/e2e/relay-graphql-swc-multi-project/relay-graphql-swc-multi-project.test.ts @@ -18,6 +18,9 @@ function relayCompilerValidate(next: NextInstance) { } describe('Relay Compiler Transform - Multi Project Config', () => { + // TODO(deploy-test-completion): Re-enable this suite in deploy mode. + // Vercel deployment fails to build/deploy this fixture in CI; skip in deploy mode. + // @force-gate !deploy describe('project-a', () => { const { next } = nextTestSetup({ files: __dirname, @@ -44,8 +47,6 @@ describe('Relay Compiler Transform - Multi Project Config', () => { startCommand: isNextDev ? 'pnpm run dev-project-a' : 'pnpm run start-project-a', - // Vercel deployment fails to build/deploy this fixture in CI; skip in deploy mode. - skipDeployment: true, }) relayCompilerValidate(next) @@ -57,6 +58,9 @@ describe('Relay Compiler Transform - Multi Project Config', () => { }) }) + // TODO(deploy-test-completion): Re-enable this suite in deploy mode. + // Vercel deployment fails to build/deploy this fixture in CI; skip in deploy mode. + // @force-gate !deploy describe('project-b', () => { const { next } = nextTestSetup({ files: __dirname, @@ -78,8 +82,6 @@ describe('Relay Compiler Transform - Multi Project Config', () => { startCommand: isNextDev ? 'pnpm run dev-project-b' : 'pnpm run start-project-b', - // Vercel deployment fails to build/deploy this fixture in CI; skip in deploy mode. - skipDeployment: true, }) relayCompilerValidate(next) diff --git a/test/e2e/swc-warnings/index.test.ts b/test/e2e/swc-warnings/index.test.ts index 6842fefd4bdb..572c85c2e27f 100644 --- a/test/e2e/swc-warnings/index.test.ts +++ b/test/e2e/swc-warnings/index.test.ts @@ -2,6 +2,8 @@ import { nextTestSetup } from 'e2e-utils' import { renderViaHTTP } from 'next-test-utils' // Tests Babel, not needed for Turbopack +// Deploy mode exclusion: This suite asserts warning output from the local +// Next.js CLI, which is not available from a deployed runtime. ;(process.env.IS_TURBOPACK_TEST ? describe.skip : describe)( 'swc warnings by default', () => { diff --git a/test/e2e/transpile-packages/index.test.ts b/test/e2e/transpile-packages/index.test.ts index b8c260b4b32c..7e2c253e5c07 100644 --- a/test/e2e/transpile-packages/index.test.ts +++ b/test/e2e/transpile-packages/index.test.ts @@ -2,6 +2,8 @@ import path from 'path' import { FileRef, nextTestSetup } from 'e2e-utils' describe('transpile packages', () => { + // TODO(deploy-test-completion): Re-enable this suite in deploy mode. + // No deploy-specific incompatibility is documented. if ((global as any).isNextDeploy) { it('should skip for deploy mode for now', () => {}) return diff --git a/test/e2e/tsconfig-module-preserve/index.test.ts b/test/e2e/tsconfig-module-preserve/index.test.ts index 984b484e6a72..c2f0a3cba025 100644 --- a/test/e2e/tsconfig-module-preserve/index.test.ts +++ b/test/e2e/tsconfig-module-preserve/index.test.ts @@ -5,8 +5,11 @@ import stripAnsi from 'strip-ansi' const strictRouteTypes = process.env.__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES === 'true' +// Deploy mode exclusion: This suite reads local build artifacts that deployments do not expose. +// This test is skipped because it relies on `next.readFile` +// @force-gate !deploy describe('tsconfig module: preserve', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: { 'tsconfig.json': JSON.stringify({ compilerOptions: { module: 'preserve' }, @@ -17,15 +20,11 @@ describe('tsconfig module: preserve', () => { } `, }, - // This test is skipped because it relies on `next.readFile` - skipDeployment: true, dependencies: { typescript: '5.4.4', }, }) - if (skipped) return - it('allows you to skip moduleResolution, esModuleInterop and resolveJsonModule when using "module: preserve"', async () => { let output = '' diff --git a/test/e2e/tsconfig-path/index.test.ts b/test/e2e/tsconfig-path/index.test.ts index 2ebd255541cf..78dfb3f274d9 100644 --- a/test/e2e/tsconfig-path/index.test.ts +++ b/test/e2e/tsconfig-path/index.test.ts @@ -1,17 +1,13 @@ import { FileRef, nextTestSetup } from 'e2e-utils' describe('specified tsconfig', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: new FileRef(__dirname), dependencies: { typescript: '5.4.4', }, }) - if (skipped) { - return - } - it('app router: allows a user-specific tsconfig via the next config', async () => { const html = await next.render('/') expect(html).toContain('bar123') diff --git a/test/e2e/turbopack-emit-collect/index.test.ts b/test/e2e/turbopack-emit-collect/index.test.ts index a3454956f795..2b26514c15ed 100644 --- a/test/e2e/turbopack-emit-collect/index.test.ts +++ b/test/e2e/turbopack-emit-collect/index.test.ts @@ -2,16 +2,16 @@ import { nextTestSetup } from 'e2e-utils' // Only implemented in Webpack // Fixture uses force-dynamic which doesn't work with cache components enabled -;(process.env.IS_TURBOPACK_TEST && !process.env.__NEXT_CACHE_COMPONENTS - ? describe - : describe.skip)('turbopack-emit-collect', () => { - const { next, isNextDev, skipped } = nextTestSetup({ +// Deploy mode exclusion: This suite restarts the local server to inspect +// process-global module state. +// @force-gate !deploy +// @force-gate turbopack +// @force-gate !cacheComponents +describe('turbopack-emit-collect', () => { + const { next, isNextDev } = nextTestSetup({ files: __dirname, - skipDeployment: true, }) - if (skipped) return - function formatId(id: string) { return id.slice(id.lastIndexOf('/src/') + 5).replace(' (ecmascript)', '') } diff --git a/test/e2e/twoslash/standalone.test.ts b/test/e2e/twoslash/standalone.test.ts index 5f4ad33a59b1..5a2b7bf233cc 100644 --- a/test/e2e/twoslash/standalone.test.ts +++ b/test/e2e/twoslash/standalone.test.ts @@ -13,7 +13,7 @@ if (!(globalThis as any).isNextStart) { it('should skip for non-next start', () => {}) } else { describe('output: standalone with twoslash', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: __dirname, dependencies: { twoslash: '0.3.4', @@ -23,10 +23,6 @@ if (!(globalThis as any).isNextStart) { skipStart: true, }) - if (skipped) { - return - } - let server: any let appPort: number let tmpFolder: string diff --git a/test/e2e/typescript-custom-tsconfig/test/index.test.ts b/test/e2e/typescript-custom-tsconfig/test/index.test.ts index 944b5b8aab15..0019c9df5c20 100644 --- a/test/e2e/typescript-custom-tsconfig/test/index.test.ts +++ b/test/e2e/typescript-custom-tsconfig/test/index.test.ts @@ -4,17 +4,13 @@ import { join } from 'path' import { nextTestSetup, FileRef } from 'e2e-utils' describe('Custom TypeScript Config', () => { - const { next, skipped } = nextTestSetup({ + const { next } = nextTestSetup({ files: new FileRef(join(__dirname, '..')), dependencies: { typescript: '5.4.4', }, }) - if (skipped) { - return - } - it('app router: allows a user-specific tsconfig via the next config', async () => { const html = await next.render('/') expect(html).toContain('bar123') diff --git a/test/e2e/typescript-workspaces-paths/packages/www/test/index.test.ts b/test/e2e/typescript-workspaces-paths/packages/www/test/index.test.ts index 1ed2bdd0e3bb..e75ebc2cbfd4 100644 --- a/test/e2e/typescript-workspaces-paths/packages/www/test/index.test.ts +++ b/test/e2e/typescript-workspaces-paths/packages/www/test/index.test.ts @@ -4,6 +4,9 @@ import { join } from 'path' import { nextTestSetup, isNextDev } from 'e2e-utils' import { readFileSync, writeFileSync } from 'fs' +// This suite mutates the workspace config and runs custom local build/start +// commands. +// @force-gate !deploy describe('TypeScript Features', () => { describe.each([ { label: '', testBaseUrl: true }, @@ -46,8 +49,7 @@ describe('TypeScript Features', () => { } }) - const { next, skipped } = nextTestSetup({ - skipDeployment: true, + const { next } = nextTestSetup({ dependencies: testBaseUrl ? { typescript: '5.9.3', @@ -58,8 +60,6 @@ describe('TypeScript Features', () => { startCommand: 'pnpm next ' + (isNextDev ? 'dev' : 'start') + ' packages/www', }) - if (skipped) return - it('should alias components', async () => { const $ = await next.render$('/basic-alias') expect($('body').text()).toMatch(/World/) diff --git a/test/e2e/undefined-webpack-config/undefined-webpack-config.test.ts b/test/e2e/undefined-webpack-config/undefined-webpack-config.test.ts index 006156356dd9..a20458ec677d 100644 --- a/test/e2e/undefined-webpack-config/undefined-webpack-config.test.ts +++ b/test/e2e/undefined-webpack-config/undefined-webpack-config.test.ts @@ -5,29 +5,28 @@ const expectedErr = /Webpack config is undefined. You may have forgot to return properly from within the "webpack" method of your next.config.js/ // Webpack-specific test, not needed for Turbopack -;(process.env.IS_TURBOPACK_TEST ? describe.skip : describe)( - 'undefined webpack config error', - () => { - const { next, isNextDev, isNextStart, skipped } = nextTestSetup({ - files: __dirname, - skipStart: true, - skipDeployment: true, +// TODO(deploy-test-completion): Re-enable this suite in deploy mode. +// It likely asserts local CLI or runtime output that deploy tests do not expose. +// @force-gate !deploy +// @force-gate !turbopack +describe('undefined webpack config error', () => { + const { next, isNextDev, isNextStart } = nextTestSetup({ + files: __dirname, + skipStart: true, + }) + ;(isNextStart ? describe : describe.skip)('production mode', () => { + it.skip('should show in production mode', async () => { + const { cliOutput } = await next.build() + expect(cliOutput).toMatch(expectedErr) }) - if (skipped) return - ;(isNextStart ? describe : describe.skip)('production mode', () => { - it.skip('should show in production mode', async () => { - const { cliOutput } = await next.build() - expect(cliOutput).toMatch(expectedErr) + }) + ;(isNextDev ? it : it.skip)( + 'should show error in development mode', + async () => { + await next.start() + await retry(async () => { + expect(next.cliOutput).toMatch(expectedErr) }) - }) - ;(isNextDev ? it : it.skip)( - 'should show error in development mode', - async () => { - await next.start() - await retry(async () => { - expect(next.cliOutput).toMatch(expectedErr) - }) - } - ) - } -) + } + ) +})