Skip to content

Commit dd6e949

Browse files
authored
Merge branch 'develop' into ci/parameterize-persist-artifacts
2 parents de9daa8 + 763d701 commit dd6e949

File tree

60 files changed

+2288
-220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2288
-220
lines changed

.circleci/src/pipeline/@pipeline.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2140,6 +2140,7 @@ jobs:
21402140

21412141
driver-integration-tests-electron:
21422142
<<: *defaults
2143+
resource_class: medium+
21432144
parallelism: 5
21442145
steps:
21452146
- run-driver-integration-tests:

.circleci/src/pipeline/workflows/@main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ linux-x64:
44
- equal: [ develop, << pipeline.git.branch >> ]
55
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
66
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
7-
- equal: [ 'chore/remove_unused_anchors', << pipeline.git.branch >> ]
7+
- equal: [ 'feat/support_next_16', << pipeline.git.branch >> ]
88
- matches:
99
pattern: /^release\/\d+\.\d+\.\d+$/
1010
value: << pipeline.git.branch >>

cli/CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
2-
## 15.6.1
2+
## 15.7.0
33

44
_Released 11/18/2025 (PENDING)_
55

6+
**Performance:**
7+
8+
- Limits the number of matched elements that are tested for visibility when added to a command log entry. Fixes a crash scenario related to rapid successive DOM additions in conjunction with a large number of elements returned from a query. Addressed in [#32937](https://github.com/cypress-io/cypress/pull/32937).
9+
10+
**Features:**
11+
12+
- `Next.js` version 16 is now supported within component testing. Currently, `webpack` is used to bundle Next.js components. Turbopack, the [new default](https://nextjs.org/docs/app/guides/upgrading/version-16#turbopack-by-default) inside Next.js 16, is not yet supported within Cypress. Addresses [#32857](https://github.com/cypress-io/cypress/issues/32857).
13+
614
**Bugfixes:**
715

816
- Fixed an issue where [`cy.wrap()`](https://docs.cypress.io/api/commands/wrap) would cause infinite recursion and freeze the Cypress App when called with objects containing circular references. Fixes [#24715](https://github.com/cypress-io/cypress/issues/24715). Addressed in [#32917](https://github.com/cypress-io/cypress/pull/32917).
917
- Fixed an issue where top changes on test retries could cause attempt numbers to show up more than one time in the reporter and cause attempts to be lost in Test Replay. Addressed in [#32888](https://github.com/cypress-io/cypress/pull/32888).
18+
- Fixed an issue where stack traces that are used to determine a test's invocation details are sometimes incorrect. Addressed in [#32699](https://github.com/cypress-io/cypress/pull/32699)
19+
- Fixed an issue where larger than expected config values were causing issues in certain cases when recording to the Cypress Cloud. Addressed in [#32957](https://github.com/cypress-io/cypress/pull/32957)
20+
1021

1122
**Misc:**
1223

@@ -19,7 +30,7 @@ _Released 11/4/2025_
1930

2031
**Features:**
2132

22-
- Added a 'Self-healed' badge to the Command Log when [`cy.prompt()`](https://docs.cypress.io/api/commands/prompt) steps automatically recover after the element they need is not found in the cache. Addressed in [#32802](https://github.com/cypress-io/cypress/pull/32802).
33+
- Added a 'Self-healed' badge to the Command Log when [`cy.prompt()`](https://docs.cypress.io/api/commands/prompt) steps automatically recover after the element they need is not found in the cache. Addressed in [#32802](https://github.com/cypress-io/cypress/pull/32802).
2334
- [`cy.prompt()`](https://docs.cypress.io/api/commands/prompt) will now show a warning in the `Get code` modal when there are unsaved changes in `Studio` that will be lost if the user saves the generated code. Addressed in [#32741](https://github.com/cypress-io/cypress/pull/32741).
2435

2536
**Bugfixes:**

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
"process": "^0.11.10",
5555
"proxy-from-env": "1.0.0",
5656
"request-progress": "^3.0.0",
57-
"semver": "^7.7.1",
5857
"supports-color": "^8.1.1",
5958
"systeminformation": "5.27.7",
6059
"tmp": "~0.2.4",
@@ -90,6 +89,7 @@
9089
"mock-fs": "5.4.0",
9190
"nock": "13.2.9",
9291
"resolve-pkg": "2.0.0",
92+
"semver": "^7.7.3",
9393
"shelljs": "0.8.5",
9494
"strip-ansi": "6.0.1",
9595
"tsx": "4.20.6",

npm/react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"devDependencies": {
1919
"@cypress/mount-utils": "0.0.0-development",
20-
"@types/semver": "7.5.8",
20+
"@types/semver": "7.7.1",
2121
"@vitejs/plugin-react": "4.6.0",
2222
"axios": "1.8.2",
2323
"cypress": "0.0.0-development",
@@ -26,7 +26,7 @@
2626
"react-dom": "18.3.1",
2727
"react-router": "6.28.0",
2828
"react-router-dom": "6.28.0",
29-
"semver": "^7.7.1",
29+
"semver": "^7.7.3",
3030
"typescript": "~5.4.5",
3131
"vite": "6.3.5",
3232
"vite-plugin-require-transform": "1.0.21"

npm/vite-dev-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"debug": "^4.3.4",
1818
"find-up": "6.3.0",
1919
"node-html-parser": "5.3.3",
20-
"semver": "^7.7.1"
20+
"semver": "^7.7.3"
2121
},
2222
"devDependencies": {
2323
"cross-env": "7.0.3",

npm/webpack-dev-server/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [@cypress/webpack-dev-server-v5.2.0](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v5.1.5...@cypress/webpack-dev-server-v5.2.0) (2025-11-19)
2+
3+
4+
### Features
5+
6+
* support Next.js 16 inside component testing ([#32955](https://github.com/cypress-io/cypress/issues/32955)) ([12f72f2](https://github.com/cypress-io/cypress/commit/12f72f23784f32faead8437579e29cb592fb62d1))
7+
18
# [@cypress/webpack-dev-server-v5.1.5](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v5.1.4...@cypress/webpack-dev-server-v5.1.5) (2025-11-07)
29

310
# [@cypress/webpack-dev-server-v5.1.4](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v5.1.3...@cypress/webpack-dev-server-v5.1.4) (2025-11-04)

npm/webpack-dev-server/cypress/e2e/next.cy.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ for (const project of NEXT_PROJECTS) {
106106
})
107107
}
108108

109-
const NEXT_PROJECTS_TSCONFIG_TAILWIND: ProjectFixtureDir[] = ['next-14-tsconfig-tailwind', 'next-15-tsconfig-tailwind']
109+
const NEXT_PROJECTS_TSCONFIG_TAILWIND: ProjectFixtureDir[] = ['next-14-tsconfig-tailwind', 'next-15-tsconfig-tailwind', 'next-16-tsconfig-tailwind']
110110

111111
for (const project of NEXT_PROJECTS_TSCONFIG_TAILWIND) {
112112
// Since next-tsconfig-tailwind does not use the fixture directory we need to write our own test suite
@@ -143,9 +143,11 @@ for (const project of NEXT_PROJECTS_TSCONFIG_TAILWIND) {
143143
})
144144

145145
cy.waitForSpecToFinish({ failCount: 1 })
146-
if (project !== 'next-15-tsconfig-tailwind') {
147-
// code frames not fully working with next 15
146+
if (project !== 'next-15-tsconfig-tailwind' && project !== 'next-16-tsconfig-tailwind') {
147+
// code frames not fully working with next 15/16
148148
cy.get('.test-err-code-frame').should('be.visible')
149+
} else {
150+
cy.get('.runnable-err-message').should('be.visible')
149151
}
150152

151153
cy.withCtx(async (ctx) => {

npm/webpack-dev-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"fs-extra": "9.1.0",
2222
"html-webpack-plugin-5": "npm:html-webpack-plugin@^5",
2323
"local-pkg": "0.4.1",
24-
"semver": "^7.7.1",
24+
"semver": "^7.7.3",
2525
"speed-measure-webpack-plugin": "1.4.2",
2626
"tslib": "^2.3.1",
2727
"tsx": "^4.20.6",

npm/webpack-dev-server/src/helpers/nextHandler.ts

Lines changed: 31 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Module from 'module'
33
import type { Configuration } from 'webpack'
44
import * as fs from 'fs'
55
import * as path from 'path'
6+
import semver from 'semver'
67
import type { PresetHandlerResult, WebpackDevServerConfig } from '../devServer'
78
import { cypressWebpackPath, getMajorVersion, ModuleClass, SourcedDependency, SourcedWebpack, sourceFramework, sourceHtmlWebpackPlugin, sourceWebpackDevServer } from './sourceRelativeWebpackModules'
89

@@ -74,71 +75,12 @@ function getNextJsPackages (devServerConfig: WebpackDevServerConfig) {
7475

7576
/**
7677
* Types for `getNextJsBaseWebpackConfig` based on version:
77-
* - v11.1.4
78+
* - v14.0.0, v15.0.0, and v16.0.0
7879
[
7980
dir: string,
80-
options: {
81-
buildId: string
82-
config: NextConfigComplete
83-
dev?: boolean
84-
isServer?: boolean
85-
pagesDir: string
86-
target?: string
87-
reactProductionProfiling?: boolean
88-
entrypoints: WebpackEntrypoints
89-
rewrites: CustomRoutes['rewrites']
90-
isDevFallback?: boolean
91-
runWebpackSpan: Span
92-
}
93-
]
94-
95-
* - v12.0.0 = Same as v11.1.4
96-
97-
* - v12.1.6
98-
[
99-
dir: string,
100-
options: {
101-
buildId: string
102-
config: NextConfigComplete
103-
compilerType: 'client' | 'server' | 'edge-server'
104-
dev?: boolean
105-
entrypoints: webpack5.EntryObject
106-
hasReactRoot: boolean
107-
isDevFallback?: boolean
108-
pagesDir: string
109-
reactProductionProfiling?: boolean
110-
rewrites: CustomRoutes['rewrites']
111-
runWebpackSpan: Span
112-
target?: string
113-
}
114-
]
115-
116-
* - v13.0.0
117-
[
118-
dir: string,
119-
options: {
120-
buildId: string
121-
config: NextConfigComplete
122-
compilerType: CompilerNameValues
123-
dev?: boolean
124-
entrypoints: webpack.EntryObject
125-
hasReactRoot: boolean
126-
isDevFallback?: boolean
127-
pagesDir?: string
128-
reactProductionProfiling?: boolean
129-
rewrites: CustomRoutes['rewrites']
130-
runWebpackSpan: Span
131-
target?: string
132-
appDir?: string
133-
middlewareMatchers?: MiddlewareMatcher[]
134-
}
135-
]
136-
137-
* - v13.0.1
138-
[
139-
dir: string,
140-
options: {
81+
options: {
14182
buildId: string
83+
encryptionKey: string
14284
config: NextConfigComplete
14385
compilerType: CompilerNameValues
14486
dev?: boolean
@@ -147,41 +89,27 @@ function getNextJsPackages (devServerConfig: WebpackDevServerConfig) {
14789
pagesDir?: string
14890
reactProductionProfiling?: boolean
14991
rewrites: CustomRoutes['rewrites']
92+
originalRewrites?: CustomRoutes['rewrites']
93+
originalRedirects?: CustomRoutes['redirects']
15094
runWebpackSpan: Span
151-
target?: string
15295
appDir?: string
153-
middlewareMatchers?: MiddlewareMatcher[]
154-
}
155-
]
156-
157-
* - v13.2.1
158-
[
159-
dir: string,
160-
options: {
161-
buildId: string
162-
config: NextConfigComplete
163-
compilerType: CompilerNameValues
164-
dev?: boolean
165-
entrypoints: webpack.EntryObject
166-
isDevFallback?: boolean
167-
pagesDir?: string
168-
reactProductionProfiling?: boolean
169-
rewrites: CustomRoutes['rewrites']
170-
runWebpackSpan: Span
171-
target?: string
172-
appDir?: string
173-
middlewareMatchers?: MiddlewareMatcher[]
174-
noMangling?: boolean
175-
jsConfig: any
176-
resolvedBaseUrl: string | undefined
177-
supportedBrowsers: string[] | undefined
178-
clientRouterFilters?: {
179-
staticFilter: ReturnType<
180-
import('../shared/lib/bloom-filter').BloomFilter['export']
181-
>
182-
dynamicFilter: ReturnType<
183-
import('../shared/lib/bloom-filter').BloomFilter['export']
184-
>
96+
middlewareMatchers?: ProxyMatcher[]
97+
noMangling?: boolean
98+
jsConfig: any
99+
jsConfigPath?: string
100+
resolvedBaseUrl: ResolvedBaseUrl
101+
supportedBrowsers: string[] | undefined
102+
clientRouterFilters?: {
103+
staticFilter: ReturnType<
104+
import('../shared/lib/bloom-filter').BloomFilter['export']
105+
>
106+
dynamicFilter: ReturnType<
107+
import('../shared/lib/bloom-filter').BloomFilter['export']
108+
>
109+
}
110+
fetchCacheKeyPrefix?: string
111+
isCompileMode?: boolean
112+
previewProps: NonNullable<(typeof NextBuildContext)['previewProps']>;
185113
}
186114
}
187115
]
@@ -210,7 +138,7 @@ async function loadWebpackConfig (devServerConfig: WebpackDevServerConfig): Prom
210138
// Client webpack config for Next.js > 12.1.5
211139
compilerType: 'client',
212140
// Required for Next.js > 13
213-
hasReactRoot: reactVersion === 18,
141+
hasReactRoot: Boolean(reactVersion && reactVersion >= 18),
214142
// Required for Next.js > 13.2.0 to respect TS/JS config
215143
jsConfig: jsConfigResult.jsConfig,
216144
// Required for Next.js > 13.2.0 to respect tsconfig.compilerOptions.baseUrl
@@ -338,34 +266,23 @@ function sourceNextWebpack (devServerConfig: WebpackDevServerConfig, framework:
338266
throw e
339267
}
340268

341-
// Next 11 allows the choice of webpack@4 or webpack@5, depending on the "webpack5" property in their next.config.js
342-
// The webpackModule.init" for Next 11 returns a webpack@4 or webpack@4 compiler instance based on this boolean
343-
let webpack5 = true
344269
const importPath = path.join(path.dirname(webpackJsonPath), 'webpack.js')
345270
const webpackModule = require(importPath)
346271

347-
try {
348-
const nextConfig = require(path.resolve(devServerConfig.cypressConfig.projectRoot, 'next.config.js'))
349-
350-
debug('NextWebpack: next.config.js found - %o', nextConfig)
351-
352-
if (nextConfig.webpack5 === false) {
353-
webpack5 = false
354-
}
355-
} catch (e) {
356-
// No next.config.js, assume webpack 5
272+
// If Next.js is 16 and greater, webpack.js runs the required code previously inside init() on require().
273+
// init() no longer exists and has the same affect on import, so we don't/can't invoke it
274+
if (semver.lt(framework.packageJson.version, '16.0.0')) {
275+
// for next 15 and down, we need to initialize the webpack module
276+
webpackModule.init(true)
357277
}
358278

359-
debug('NextWebpack: webpack5 - %s', webpack5)
360-
webpackModule.init(webpack5)
361-
362279
const packageJson = require(webpackJsonPath)
363280

364281
webpack.importPath = importPath
365282
// The package.json of "next/dist/compiled/webpack/package.json" has no version so we supply the version for later use
366-
webpack.packageJson = { ...packageJson, version: webpack5 ? '5' : '4' }
283+
webpack.packageJson = { ...packageJson, version: '5' }
367284
webpack.module = webpackModule.webpack
368-
webpack.majorVersion = getMajorVersion(webpack.packageJson, [4, 5])
285+
webpack.majorVersion = getMajorVersion(webpack.packageJson, [5])
369286

370287
debug('NextWebpack: Successfully loaded NextWebpack - %o', webpack)
371288

0 commit comments

Comments
 (0)