Skip to content

Commit 4e3e191

Browse files
committed
Merge branch 'master' into develop
2 parents c0d781d + d274a5b commit 4e3e191

File tree

5 files changed

+45
-0
lines changed

5 files changed

+45
-0
lines changed

npm/cypress-schematic/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [@cypress/schematic-v1.5.3](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.5.2...@cypress/schematic-v1.5.3) (2021-10-29)
2+
3+
4+
### Bug Fixes
5+
6+
* remove outdated registry link ([#18710](https://github.com/cypress-io/cypress/issues/18710)) ([e2a869d](https://github.com/cypress-io/cypress/commit/e2a869d2a984abb6703aec966dd9124ee693b8c1))
7+
18
# [@cypress/schematic-v1.5.2](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.5.1...@cypress/schematic-v1.5.2) (2021-10-29)
29

310

npm/react/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# [@cypress/react-v5.10.2](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.10.1...@cypress/react-v5.10.2) (2021-10-29)
2+
3+
4+
### Bug Fixes
5+
6+
* Next.JS 12 components testing failing with ` TypeError: Cannot read property 'traceChild' of undefined` ([#18648](https://github.com/cypress-io/cypress/issues/18648)) ([cb0cbdf](https://github.com/cypress-io/cypress/commit/cb0cbdf4c35da09a7dedcc4563a242cb4748e994))
7+
* remove outdated registry link ([#18710](https://github.com/cypress-io/cypress/issues/18710)) ([e2a869d](https://github.com/cypress-io/cypress/commit/e2a869d2a984abb6703aec966dd9124ee693b8c1))
8+
* **cypress/react:** disable react-refresh for craco setups ([#18517](https://github.com/cypress-io/cypress/issues/18517)) ([ea10795](https://github.com/cypress-io/cypress/commit/ea1079559473fc672b5e0e188b5b54bf8ebe2f98))
9+
110
# [@cypress/react-v5.10.1](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.10.0...@cypress/react-v5.10.1) (2021-10-04)
211

312

npm/react/plugins/next/checkSWC.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { Configuration } from 'webpack'
2+
3+
export function checkSWC (
4+
webpackConfig: Configuration,
5+
cypressConfig: Cypress.Config,
6+
) {
7+
const hasSWCLoader = webpackConfig.module?.rules.some((rule) => {
8+
return rule.oneOf?.some(
9+
(oneOf) => (oneOf.use as any)?.loader === 'next-swc-loader'
10+
)
11+
})
12+
13+
if (hasSWCLoader && cypressConfig.nodeVersion !== 'system') {
14+
throw new Error(`Cypress requires "nodeVersion" to be set to "system" in order to run Next.js with SWC optimizations.
15+
Please add "nodeVersion": "system" to your Cypress configuration and try again.`)
16+
}
17+
18+
return false
19+
}

npm/react/plugins/next/findNextWebpackConfig.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const debug = require('debug')('@cypress/react')
44
const getNextJsBaseWebpackConfig = require('next/dist/build/webpack-config').default
55
const { findPagesDir } = require('../../dist/next/findPagesDir')
66
const { getRunWebpackSpan } = require('../../dist/next/getRunWebpackSpan')
7+
const { checkSWC } = require('../../dist/next/checkSWC')
78

89
async function getNextWebpackConfig (config) {
910
let loadConfig
@@ -38,6 +39,8 @@ async function getNextWebpackConfig (config) {
3839

3940
debug('resolved next.js webpack config %o', nextWebpackConfig)
4041

42+
checkSWC(nextWebpackConfig, config)
43+
4144
return nextWebpackConfig
4245
}
4346

npm/vue/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [@cypress/vue-v3.0.4](https://github.com/cypress-io/cypress/compare/@cypress/vue-v3.0.3...@cypress/vue-v3.0.4) (2021-10-29)
2+
3+
4+
### Bug Fixes
5+
6+
* remove outdated registry link ([#18710](https://github.com/cypress-io/cypress/issues/18710)) ([e2a869d](https://github.com/cypress-io/cypress/commit/e2a869d2a984abb6703aec966dd9124ee693b8c1))
7+
18
# [@cypress/vue-v3.0.3](https://github.com/cypress-io/cypress/compare/@cypress/vue-v3.0.2...@cypress/vue-v3.0.3) (2021-07-31)
29

310

0 commit comments

Comments
 (0)