Merge branch 'master' into develop

This commit is contained in:
Zachary Williams
2022-01-10 16:02:22 +00:00
2 changed files with 12 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
# [@cypress/react-v5.12.0](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.11.0...@cypress/react-v5.12.0) (2021-12-21)
### Features
* support create-react-app v5 ([#19434](https://github.com/cypress-io/cypress/issues/19434)) ([415a7b1](https://github.com/cypress-io/cypress/commit/415a7b149aaac37ae605dc1a11007bad29187dc5))
# [@cypress/react-v5.11.0](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.10.3...@cypress/react-v5.11.0) (2021-12-16)

View File

@@ -10,9 +10,11 @@ export function checkSWC (
)
})
if (hasSWCLoader && cypressConfig.nodeVersion !== 'system') {
throw new Error(`Cypress requires "nodeVersion" to be set to "system" in order to run Next.js with SWC optimizations.
Please add "nodeVersion": "system" to your Cypress configuration and try again.`)
// "resolvedNodePath" is only set when using the user's Node.js, which is required to compile Next.js with SWC optimizations
// If it is not set, they have either explicitly set "nodeVersion" to "bundled" or are are using Cypress < 9.0.0 where it was set to "bundled" by default
if (hasSWCLoader && !cypressConfig.resolvedNodePath) {
throw new Error(`Cannot compile Next.js application with configured Node.js.
If you are on Cypress version >= \`9.0.0\`, remove the "nodeVersion" property from your Cypress config. Otherwise, please add "nodeVersion": "system" to your Cypress config and try again.`)
}
return false