Skip to content

Commit

Permalink
Merge branch 'release/14.0.0' of github.com:cypress-io/cypress into f…
Browse files Browse the repository at this point in the history
…eat/make_JIT_compile_GA
  • Loading branch information
AtofStryker committed Nov 21, 2024
2 parents 4cb7966 + 94d360e commit a6f0dfe
Show file tree
Hide file tree
Showing 12 changed files with 2,901 additions and 12 deletions.
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ _Released 12/3/2024 (PENDING)_
- The `resourceType` option on `cy.intercept` has been deprecated. We anticipate the resource types to change or be completely removed in the future. Our intention is to replace essential functionality dependent on the `resourceType` within Cypress in a future version (like hiding network logs that are not fetch/xhr). Please leave feedback on any essential uses of `resourceType`
in this [GitHub issue](https://github.com/cypress-io/cypress/issues/30447). Addresses [#30433](https://github.com/cypress-io/cypress/issues/30433).

**Features:**

- Cypress Component Testing now supports `React` version 19. Cypress will allow detected use of the React 19 Release Candidate until React 19 is officially released. Addresses [#29470](https://github.com/cypress-io/cypress/issues/29470).

**Bugfixes:**

- Elements with `display: contents` will no longer use box model calculations for visibility, and correctly show as visible when it is visible. Fixed in [#29680](https://github.com/cypress-io/cypress/pull/29680). Fixes [#29605](https://github.com/cypress-io/cypress/issues/29605).
Expand Down
8 changes: 4 additions & 4 deletions npm/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"vite-plugin-require-transform": "1.0.12"
},
"peerDependencies": {
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^18 || ^19",
"@types/react-dom": "^18 || ^19",
"cypress": "*",
"react": "^18",
"react-dom": "^18"
"react": "^18 || ^19",
"react-dom": "^18 || ^19"
},
"files": [
"dist"
Expand Down
3 changes: 1 addition & 2 deletions packages/app/cypress/e2e/runner/ct-framework-errors.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ function loadErrorSpec (options: Options): VerifyFunc {
return createVerify({ fileName: Cypress._.last(filePath.split('/')), hasPreferredIde: false, mode: 'component' })
}

// keeping structure as to easily adapt for future versions of react
const reactVersions = [18] as const
const reactVersions = [18, 19] as const

reactVersions.forEach((reactVersion) => {
describe(`React ${reactVersion}`, {
Expand Down
4 changes: 2 additions & 2 deletions packages/launchpad/cypress/e2e/config-warning.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ describe('component testing dependency warnings', () => {
cy.get('[data-cy="warning-alert"]', { timeout: 12000 }).should('exist')
.should('contain.text', 'Warning: Component Testing Mismatched Dependencies')
.should('contain.text', 'vite. Expected ^4.0.0 || ^5.0.0, found 3.2.11')
.should('contain.text', 'react. Expected ^18.0.0, found 15.6.2.')
.should('contain.text', 'react-dom. Expected ^18.0.0 but dependency was not found.')
.should('contain.text', 'react. Expected ^18.0.0 || ^19.0.0-rc || ^19.0.0, found 15.6.2.')
.should('contain.text', 'react-dom. Expected ^18.0.0 || ^19.0.0-rc || ^19.0.0 but dependency was not found.')

cy.get('.warning-markdown').find('li').should('have.length', 3)
})
Expand Down
4 changes: 2 additions & 2 deletions packages/scaffold-config/src/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const WIZARD_DEPENDENCY_REACT = {
package: 'react',
installer: 'react',
description: 'A JavaScript library for building user interfaces',
minVersion: '^18.0.0',
minVersion: '^18.0.0 || ^19.0.0-rc || ^19.0.0',
} as const

export const WIZARD_DEPENDENCY_REACT_DOM = {
Expand All @@ -31,7 +31,7 @@ export const WIZARD_DEPENDENCY_REACT_DOM = {
package: 'react-dom',
installer: 'react-dom',
description: 'This package serves as the entry point to the DOM and server renderers for React',
minVersion: '^18.0.0',
minVersion: '^18.0.0 || ^19.0.0-rc || ^19.0.0',
} as const

export const WIZARD_DEPENDENCY_TYPESCRIPT = {
Expand Down
296 changes: 296 additions & 0 deletions system-tests/__snapshots__/component_testing_spec.ts.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.sample-bg {
background: rgb(255, 0, 0);
}
5 changes: 5 additions & 0 deletions system-tests/projects/react19/cypress/support/component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { mount } from 'cypress/react'

import './backgroundColor.css'

Cypress.Commands.add('mount', mount)
19 changes: 19 additions & 0 deletions system-tests/projects/react19/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "react19",
"version": "0.0.0-test",
"dependencies": {
"react": "19.0.0-rc.1",
"react-dom": "19.0.0-rc.1"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.3.3",
"babel-loader": "^9.2.1",
"css-loader": "^7.1.2",
"style-loader": "^4.0.0",
"vite": "^5.4.10",
"webpack": "^5.96.1",
"webpack-dev-server": "^5.1.0"
},
"sideEffects": false,
"projectFixtureDirectory": "react"
}
7 changes: 7 additions & 0 deletions system-tests/projects/react19/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
Loading

3 comments on commit a6f0dfe

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a6f0dfe Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.15.2/linux-x64/feat/make_JIT_compile_GA-a6f0dfe4bc7e139fd948c18b2e7a7d8bb2aedf3b/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a6f0dfe Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.15.2/linux-arm64/feat/make_JIT_compile_GA-a6f0dfe4bc7e139fd948c18b2e7a7d8bb2aedf3b/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a6f0dfe Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.15.2/linux-x64/feat/make_JIT_compile_GA-a6f0dfe4bc7e139fd948c18b2e7a7d8bb2aedf3b/cypress.tgz

Please sign in to comment.