diff --git a/.circleci/cache-version.txt b/.circleci/cache-version.txt index 0f616640a769..07249903be9c 100644 --- a/.circleci/cache-version.txt +++ b/.circleci/cache-version.txt @@ -1,3 +1,3 @@ # Bump this version to force CI to re-create the cache from scratch. -11-07-24-vue-cli-service-removal +11-07-24-react-16-17-removal diff --git a/CHANGELOG.md b/CHANGELOG.md index 71f07af48ac9..ccf4888e233c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,6 @@ - [`@cypress/eslint-plugin-dev`](https://github.com/cypress-io/cypress/blob/develop/npm/eslint-plugin-dev/CHANGELOG.md) - [`@cypress/mount-utils`](https://github.com/cypress-io/cypress/blob/develop/npm/mount-utils/CHANGELOG.md) - [`@cypress/react`](https://github.com/cypress-io/cypress/blob/develop/npm/react/CHANGELOG.md) -- [`@cypress/react18`](https://github.com/cypress-io/cypress/blob/develop/npm/react18/CHANGELOG.md) - [`@cypress/svelte`](https://github.com/cypress-io/cypress/blob/develop/npm/svelte/CHANGELOG.md) - [`@cypress/vite-dev-server`](https://github.com/cypress-io/cypress/blob/develop/npm/vite-dev-server/CHANGELOG.md) - [`@cypress/vue`](https://github.com/cypress-io/cypress/blob/develop/npm/vue/CHANGELOG.md) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 530134c6218f..2077d1367b5c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -186,7 +186,6 @@ Here is a list of the npm packages in this repository: | [grep](./npm/grep) | `@cypress/grep` | Filter tests using substring | | [mount-utils](./npm/mount-utils) | `@cypress/mount-utils` | Common functionality for Vue/React/Angular adapters. | | [react](./npm/react) | `@cypress/react` | Cypress component testing for React. | - | [react18](./npm/react18) | `@cypress/react18` | Cypress component testing for React 18. | | [schematic](./npm/cypress-schematic) | `@cypress/schematic` | Official Angular Schematic and Builder for the Angular CLI.| | [svelte](./npm/svelte) | `@cypress/svelte` | Cypress component testing for Svelte. | | [vite-dev-server](./npm/vite-dev-server) | `@cypress/vite-dev-server` | Vite powered dev server for Component Testing. | diff --git a/cli/.eslintignore b/cli/.eslintignore index 9c171ae7d57e..90471aa76fd3 100644 --- a/cli/.eslintignore +++ b/cli/.eslintignore @@ -11,7 +11,6 @@ package.json # these are all copied from dist'd builds from the individual libs /angular /react -/react18 /vue /svelte /mount-utils \ No newline at end of file diff --git a/cli/package.json b/cli/package.json index 63ae512b0bf7..62377435c439 100644 --- a/cli/package.json +++ b/cli/package.json @@ -71,7 +71,6 @@ "@cypress/grep": "0.0.0-development", "@cypress/mount-utils": "0.0.0-development", "@cypress/react": "0.0.0-development", - "@cypress/react18": "0.0.0-development", "@cypress/sinon-chai": "2.9.1", "@cypress/svelte": "0.0.0-development", "@cypress/vue": "0.0.0-development", @@ -114,7 +113,6 @@ "mount-utils", "vue", "react", - "react18", "angular", "svelte" ], @@ -145,11 +143,6 @@ "import": "./react/dist/cypress-react.esm-bundler.js", "require": "./react/dist/cypress-react.cjs.js" }, - "./react18": { - "types": "./react18/dist/index.d.ts", - "import": "./react18/dist/cypress-react.esm-bundler.js", - "require": "./react18/dist/cypress-react.cjs.js" - }, "./mount-utils": { "types": "./mount-utils/dist/index.d.ts", "require": "./mount-utils/dist/index.js" diff --git a/cli/scripts/post-build.js b/cli/scripts/post-build.js index 4ee23008cf03..e31b9e2cf807 100644 --- a/cli/scripts/post-build.js +++ b/cli/scripts/post-build.js @@ -9,7 +9,6 @@ shell.set('-e') // any error is fatal const npmModulesToCopy = [ 'mount-utils', 'react', - 'react18', 'vue', 'angular', 'svelte', diff --git a/npm/react/package.json b/npm/react/package.json index a0f4d42f429f..bc72a7e8b8d0 100644 --- a/npm/react/package.json +++ b/npm/react/package.json @@ -17,25 +17,26 @@ }, "devDependencies": { "@cypress/mount-utils": "0.0.0-development", - "@types/semver": "7.5.0", - "@vitejs/plugin-react": "4.3.0", - "axios": "0.21.2", + "@types/semver": "7.5.8", + "@vitejs/plugin-react": "4.3.3", + "axios": "1.7.7", "cypress": "0.0.0-development", - "prop-types": "15.7.2", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-router": "6.10.0", - "react-router-dom": "6.10.0", + "prop-types": "15.8.1", + "react": "18.3.1", + "react-dom": "18.3.1", + "react-router": "6.28.0", + "react-router-dom": "6.28.0", "semver": "^7.5.3", "typescript": "~5.4.5", - "vite": "5.2.11", + "vite": "5.4.10", "vite-plugin-require-transform": "1.0.12" }, "peerDependencies": { - "@types/react": "^16.9.16 || ^17.0.0", + "@types/react": "^18", + "@types/react-dom": "^18", "cypress": "*", - "react": "^=16.x || ^=17.x", - "react-dom": "^=16.x || ^=17.x" + "react": "^18", + "react-dom": "^18" }, "files": [ "dist" @@ -90,9 +91,6 @@ "nx": { "targets": { "build": { - "dependsOn": [ - "!@cypress/react18:build" - ], "outputs": [ "{workspaceRoot}/cli/react", "{projectRoot}/dist" diff --git a/npm/react/src/mount.ts b/npm/react/src/mount.ts index d4cb0fa21c93..f1904fac7663 100644 --- a/npm/react/src/mount.ts +++ b/npm/react/src/mount.ts @@ -1,23 +1,23 @@ -import { getContainerEl } from '@cypress/mount-utils' import React from 'react' -import ReactDOM from 'react-dom' -import major from 'semver/functions/major' +import ReactDOM from 'react-dom/client' +import { getContainerEl } from '@cypress/mount-utils' import { makeMountFn, makeUnmountFn, -} from './createMount' +} from './index' import type { MountOptions, InternalMountOptions, -} from './types' + UnmountArgs, +} from './index' -let lastReactDom: typeof ReactDOM +let root: ReactDOM.Root | null const cleanup = () => { - if (lastReactDom) { - const root = getContainerEl() + if (root) { + root.unmount() - lastReactDom.unmountComponentAtNode(root) + root = null return true } @@ -27,10 +27,10 @@ const cleanup = () => { /** * Mounts a React component into the DOM. - * @param jsx {React.ReactNode} The React component to mount. - * @param options {MountOptions} [options={}] options to pass to the mount function. - * @param rerenderKey {string} [rerenderKey] A key to use to force a rerender. - * @see {@link https://on.cypress.io/mounting-react} for more details. + * @param {import('react').JSX.Element} jsx The React component to mount. + * @param {MountOptions} options Options to pass to the mount function. + * @param {string} rerenderKey A key to use to force a rerender. + * * @example * import { mount } from '@cypress/react' * import { Stepper } from './Stepper' @@ -40,24 +40,24 @@ const cleanup = () => { * cy.get('[data-cy=increment]').click() * cy.get('[data-cy=counter]').should('have.text', '1') * } + * + * @see {@link https://on.cypress.io/mounting-react} for more details. + * + * @returns {Cypress.Chainable} The mounted component. */ export function mount (jsx: React.ReactNode, options: MountOptions = {}, rerenderKey?: string) { - if (major(React.version) === 18) { - const message = '[cypress/react]: You are using `cypress/react`, which is designed for React <= 17. Consider changing to `cypress/react18`, which is designed for React 18.' - - console.error(message) - Cypress.log({ name: 'warning', message }) - } - // Remove last mounted component if cy.mount is called more than once in a test + // React by default removes the last component when calling render, but we should remove the root + // to wipe away any state cleanup() - const internalOptions: InternalMountOptions = { reactDom: ReactDOM, - render: (reactComponent: ReturnType, el: HTMLElement, reactDomToUse: typeof ReactDOM) => { - lastReactDom = (reactDomToUse || ReactDOM) + render: (reactComponent: ReturnType, el: HTMLElement) => { + if (!root) { + root = ReactDOM.createRoot(el) + } - return lastReactDom.render(reactComponent, el) + return root.render(reactComponent) }, unmount: internalUnmount, cleanup, @@ -66,20 +66,14 @@ export function mount (jsx: React.ReactNode, options: MountOptions = {}, rerende return makeMountFn('mount', jsx, { ReactDom: ReactDOM, ...options }, rerenderKey, internalOptions) } -/** - * Unmounts the component from the DOM. - * @internal - * @param options - Options for unmounting. - */ function internalUnmount (options = { log: true }) { return makeUnmountFn(options) } - /** * Removed as of Cypress 11.0.0. * @see https://on.cypress.io/migration-11-0-0-component-testing-updates */ -export function unmount (options = { log: true }) { +export function unmount (options: UnmountArgs = { log: true }) { // @ts-expect-error - undocumented API Cypress.utils.throwErrByPath('mount.unmount') } diff --git a/npm/react/src/types.ts b/npm/react/src/types.ts index b13bbcb1246f..e9da14f24548 100644 --- a/npm/react/src/types.ts +++ b/npm/react/src/types.ts @@ -8,7 +8,7 @@ export interface UnmountArgs { export type MountOptions = Partial export interface MountReactComponentOptions { - ReactDom: typeof import('react-dom') + ReactDom: typeof import('react-dom/client') /** * Log the mounting command into Cypress Command Log, * true by default. @@ -22,11 +22,11 @@ export interface MountReactComponentOptions { } export interface InternalMountOptions { - reactDom: typeof import('react-dom') + reactDom: typeof import('react-dom/client') render: ( reactComponent: ReturnType, el: HTMLElement, - reactDomToUse: typeof import('react-dom') + reactDomToUse: typeof import('react-dom/client') ) => void unmount: (options: UnmountArgs) => void cleanup: () => boolean diff --git a/npm/react18/.eslintignore b/npm/react18/.eslintignore deleted file mode 100644 index 79afe972da7d..000000000000 --- a/npm/react18/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -**/dist -**/*.d.ts -**/package-lock.json -**/tsconfig.json -**/cypress/fixtures \ No newline at end of file diff --git a/npm/react18/.releaserc.js b/npm/react18/.releaserc.js deleted file mode 100644 index 17d3bb871472..000000000000 --- a/npm/react18/.releaserc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - ...require('../../.releaserc'), -} diff --git a/npm/react18/CHANGELOG.md b/npm/react18/CHANGELOG.md deleted file mode 100644 index 8afdf6422cc5..000000000000 --- a/npm/react18/CHANGELOG.md +++ /dev/null @@ -1,47 +0,0 @@ -# [@cypress/react18-v2.0.1](https://github.com/cypress-io/cypress/compare/@cypress/react18-v2.0.0...@cypress/react18-v2.0.1) (2024-06-07) - - -### Bug Fixes - -* update cypress to Typescript 5 ([#29568](https://github.com/cypress-io/cypress/issues/29568)) ([f3b6766](https://github.com/cypress-io/cypress/commit/f3b67666a5db0438594339c379cf27e1fd1e4abc)) - -# [@cypress/react18-v2.0.0](https://github.com/cypress-io/cypress/compare/@cypress/react18-v1.1.1...@cypress/react18-v2.0.0) (2022-11-07) - - -### Bug Fixes - -* remove last mounted component upon subsequent mount calls ([#24470](https://github.com/cypress-io/cypress/issues/24470)) ([f39eb1c](https://github.com/cypress-io/cypress/commit/f39eb1c19e0923bda7ae263168fc6448da942d54)) -* remove some CT functions and props ([#24419](https://github.com/cypress-io/cypress/issues/24419)) ([294985f](https://github.com/cypress-io/cypress/commit/294985f8b3e0fa00ed66d25f88c8814603766074)) - - -### BREAKING CHANGES - -* remove last mounted component upon subsequent mount calls of mount - -# [@cypress/react18-v1.1.1](https://github.com/cypress-io/cypress/compare/@cypress/react18-v1.1.0...@cypress/react18-v1.1.1) (2022-10-13) - - -### Bug Fixes - -* cypress/react18 rerender ([#23360](https://github.com/cypress-io/cypress/issues/23360)) ([8b8f20e](https://github.com/cypress-io/cypress/commit/8b8f20eec77d4c0a704aee7f7077dc92dbafb93f)) - -# [@cypress/react18-v1.1.0](https://github.com/cypress-io/cypress/compare/@cypress/react18-v1.0.1...@cypress/react18-v1.1.0) (2022-08-30) - - -### Features - -* adding svelte component testing support ([#23553](https://github.com/cypress-io/cypress/issues/23553)) ([f6eaad4](https://github.com/cypress-io/cypress/commit/f6eaad40e1836fa9db87c60defa5ae6f390c8fd8)) - -# [@cypress/react18-v1.0.1](https://github.com/cypress-io/cypress/compare/@cypress/react18-v1.0.0...@cypress/react18-v1.0.1) (2022-08-15) - - -### Bug Fixes - -* **react18:** unmount component with react18 API ([#23204](https://github.com/cypress-io/cypress/issues/23204)) ([eab950b](https://github.com/cypress-io/cypress/commit/eab950bec013f9caf5836e3fa58670fde25e2684)) - -# @cypress/react18-v1.0.0 (2022-08-11) - - -### Features - -* React 18 support ([#22876](https://github.com/cypress-io/cypress/issues/22876)) ([f0d3a48](https://github.com/cypress-io/cypress/commit/f0d3a4867907bf6e60468510daa883ccc8dcfb63)) diff --git a/npm/react18/README.md b/npm/react18/README.md deleted file mode 100644 index 4f85d8081af8..000000000000 --- a/npm/react18/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# @cypress/react18 - -Mount React 18 components in the open source [Cypress.io](https://www.cypress.io/) test runner - -> **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [React Component Testing Docs](https://docs.cypress.io/guides/component-testing/react/overview) for mounting React components. Installing and importing `mount` from `@cypress/react18` should only be done for advanced use-cases. - -## [Changelog](./CHANGELOG.md) diff --git a/npm/react18/package.json b/npm/react18/package.json deleted file mode 100644 index 5104e75eb943..000000000000 --- a/npm/react18/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "@cypress/react18", - "version": "0.0.0-development", - "description": "Test React components using Cypress", - "main": "dist/cypress-react.cjs.js", - "scripts": { - "build": "rimraf dist && rollup -c rollup.config.mjs", - "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js", - "check-ts": "tsc --noEmit", - "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .", - "watch": "yarn build --watch --watch.exclude ./dist/**/*" - }, - "devDependencies": { - "@cypress/mount-utils": "0.0.0-development", - "@cypress/react": "0.0.0-development", - "@rollup/plugin-commonjs": "^17.1.0", - "@rollup/plugin-node-resolve": "^11.1.1", - "@types/react": "17.0.83", - "@types/react-dom": "17.0.25", - "cypress": "0.0.0-development", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "rollup": "3.7.3", - "rollup-plugin-typescript2": "^0.29.0", - "typescript": "~5.4.5" - }, - "peerDependencies": { - "@types/react": "^18", - "@types/react-dom": "^18", - "cypress": "*", - "react": "^18", - "react-dom": "^18" - }, - "files": [ - "dist" - ], - "types": "dist/index.d.ts", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/cypress-io/cypress.git" - }, - "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/react18/#readme", - "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Freact18&template=1-bug-report.md&title=", - "keywords": [ - "react", - "cypress", - "cypress-io", - "test", - "testing" - ], - "module": "dist/cypress-react.esm-bundler.js", - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - }, - "publishConfig": { - "access": "public" - }, - "nx": { - "targets": { - "build": { - "outputs": [ - "{workspaceRoot}/cli/react18", - "{projectRoot}/dist" - ] - } - } - } -} diff --git a/npm/react18/rollup.config.mjs b/npm/react18/rollup.config.mjs deleted file mode 100644 index db047e2bbd48..000000000000 --- a/npm/react18/rollup.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import rollupConfig from '@cypress/react/rollup.config.mjs' - -export default rollupConfig diff --git a/npm/react18/src/index.ts b/npm/react18/src/index.ts deleted file mode 100644 index 9ab7390dfc87..000000000000 --- a/npm/react18/src/index.ts +++ /dev/null @@ -1,92 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import { getContainerEl } from '@cypress/mount-utils' -import { - makeMountFn, - makeUnmountFn, -} from '@cypress/react' -import type { - MountOptions, - MountReturn, - InternalMountOptions, - UnmountArgs, -} from '@cypress/react' - -let root: ReactDOM.Root | null - -const cleanup = () => { - if (root) { - root.unmount() - - root = null - - return true - } - - return false -} - -/** - * Mounts a React component into the DOM. - * @param {import('react').JSX.Element} jsx The React component to mount. - * @param {MountOptions} options Options to pass to the mount function. - * @param {string} rerenderKey A key to use to force a rerender. - * - * @example - * import { mount } from '@cypress/react' - * import { Stepper } from './Stepper' - * - * it('mounts', () => { - * mount() - * cy.get('[data-cy=increment]').click() - * cy.get('[data-cy=counter]').should('have.text', '1') - * } - * - * @see {@link https://on.cypress.io/mounting-react} for more details. - * - * @returns {Cypress.Chainable} The mounted component. - */ -export function mount (jsx: React.ReactNode, options: MountOptions = {}, rerenderKey?: string) { - // Remove last mounted component if cy.mount is called more than once in a test - // React by default removes the last component when calling render, but we should remove the root - // to wipe away any state - cleanup() - const internalOptions: InternalMountOptions = { - // @ts-expect-error - reactDom: ReactDOM, - render: (reactComponent: ReturnType, el: HTMLElement) => { - if (!root) { - root = ReactDOM.createRoot(el) - } - - return root.render(reactComponent) - }, - unmount: internalUnmount, - cleanup, - } - - // @ts-expect-error - return makeMountFn('mount', jsx, { ReactDom: ReactDOM, ...options }, rerenderKey, internalOptions) -} - -function internalUnmount (options = { log: true }) { - return makeUnmountFn(options) -} -/** - * Removed as of Cypress 11.0.0. - * @see https://on.cypress.io/migration-11-0-0-component-testing-updates - */ -export function unmount (options: UnmountArgs = { log: true }) { - // @ts-expect-error - undocumented API - Cypress.utils.throwErrByPath('mount.unmount') -} - -// Re-export this to help with migrating away from `unmount` -export { - getContainerEl, -} - -export type { - MountOptions, - MountReturn, -} diff --git a/npm/react18/tsconfig.json b/npm/react18/tsconfig.json deleted file mode 100644 index 8e6ae3e4c8a9..000000000000 --- a/npm/react18/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "esnext", - "moduleResolution": "node", - "lib": [ - "es2015", - "dom" - ], - "rootDir": "src", - "outDir": "dist", - "declaration": true, - "strict": true, - "types": [ - "cypress" - ], - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "resolveJsonModule": false - }, - "include": ["src/**/*.ts"] -} diff --git a/npm/vite-dev-server/cypress/e2e/vite-dev-server.cy.ts b/npm/vite-dev-server/cypress/e2e/vite-dev-server.cy.ts index 7c4959580c45..fb11182beacc 100644 --- a/npm/vite-dev-server/cypress/e2e/vite-dev-server.cy.ts +++ b/npm/vite-dev-server/cypress/e2e/vite-dev-server.cy.ts @@ -19,7 +19,7 @@ describe('Config options', () => { await ctx.actions.file.writeFileInProject( 'src/App.cy.jsx', ` import React from 'react' - import { mount } from 'cypress/react18' + import { mount } from 'cypress/react' export const App = () => { return ( diff --git a/npm/vite-plugin-cypress-esm/package.json b/npm/vite-plugin-cypress-esm/package.json index d7b5f214f551..f111d493a2b7 100644 --- a/npm/vite-plugin-cypress-esm/package.json +++ b/npm/vite-plugin-cypress-esm/package.json @@ -19,11 +19,11 @@ "devDependencies": { "@tanstack/react-query": "4.36.1", "@types/picomatch": "2.3.0", - "@vitejs/plugin-react": "4.3.0", - "react": "16.8.6", - "react-dom": "16.8.6", - "react-router": "6.10.0", - "react-router-dom": "6.10.0", + "@vitejs/plugin-react": "4.3.3", + "react": "18.3.1", + "react-dom": "18.3.1", + "react-router": "6.28.0", + "react-router-dom": "6.28.0", "vite": "5.2.11" }, "files": [ diff --git a/npm/vue/package.json b/npm/vue/package.json index e2d3118b4731..c05fd6c921b7 100644 --- a/npm/vue/package.json +++ b/npm/vue/package.json @@ -82,9 +82,6 @@ "nx": { "targets": { "build": { - "dependsOn": [ - "!@cypress/react18:build" - ], "outputs": [ "{workspaceRoot}/cli/vue", "{projectRoot}/dist" diff --git a/npm/webpack-preprocessor/package.json b/npm/webpack-preprocessor/package.json index 61b8978b67b9..0a614f0051c1 100644 --- a/npm/webpack-preprocessor/package.json +++ b/npm/webpack-preprocessor/package.json @@ -70,9 +70,6 @@ "nx": { "targets": { "build": { - "dependsOn": [ - "!@cypress/react18:build" - ], "outputs": [ "{projectRoot}/dist" ] diff --git a/packages/launchpad/cypress/e2e/config-warning.cy.ts b/packages/launchpad/cypress/e2e/config-warning.cy.ts index 6ae9a48de1e9..a006556dc3a6 100644 --- a/packages/launchpad/cypress/e2e/config-warning.cy.ts +++ b/packages/launchpad/cypress/e2e/config-warning.cy.ts @@ -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 ^16.0.0 || ^17.0.0 || ^18.0.0, found 15.6.2.') - .should('contain.text', 'react-dom. Expected ^16.0.0 || ^17.0.0 || ^18.0.0 but dependency was not found.') + .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.') cy.get('.warning-markdown').find('li').should('have.length', 3) }) diff --git a/packages/reporter/cypress/support/component.ts b/packages/reporter/cypress/support/component.ts index 7ffa238e8510..4fe6c1860b90 100644 --- a/packages/reporter/cypress/support/component.ts +++ b/packages/reporter/cypress/support/component.ts @@ -1,4 +1,4 @@ -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' import 'cypress-real-events/support' import { installCustomPercyCommand } from '@packages/frontend-shared/cypress/support/customPercyCommand' diff --git a/packages/scaffold-config/src/dependencies.ts b/packages/scaffold-config/src/dependencies.ts index bcbc6af49bdb..1a866514d967 100644 --- a/packages/scaffold-config/src/dependencies.ts +++ b/packages/scaffold-config/src/dependencies.ts @@ -22,7 +22,7 @@ export const WIZARD_DEPENDENCY_REACT = { package: 'react', installer: 'react', description: 'A JavaScript library for building user interfaces', - minVersion: '^16.0.0 || ^17.0.0 || ^18.0.0', + minVersion: '^18.0.0', } as const export const WIZARD_DEPENDENCY_REACT_DOM = { @@ -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: '^16.0.0 || ^17.0.0 || ^18.0.0', + minVersion: '^18.0.0', } as const export const WIZARD_DEPENDENCY_TYPESCRIPT = { diff --git a/packages/scaffold-config/src/frameworks.ts b/packages/scaffold-config/src/frameworks.ts index 9c909d4ace9b..cf914d1c6903 100644 --- a/packages/scaffold-config/src/frameworks.ts +++ b/packages/scaffold-config/src/frameworks.ts @@ -101,16 +101,6 @@ export function getBundler (bundler: WizardBundler['type']): WizardBundler { const mountModule = (mountModule: T) => (projectPath: string) => Promise.resolve(mountModule) -const reactMountModule = async (projectPath: string) => { - const reactPkg = await isDependencyInstalled(dependencies.WIZARD_DEPENDENCY_REACT, projectPath) - - if (!reactPkg.detectedVersion || !semver.valid(reactPkg.detectedVersion)) { - return 'cypress/react' - } - - return semver.major(reactPkg.detectedVersion) === 18 ? 'cypress/react18' : 'cypress/react' -} - export const SUPPORT_STATUSES: Readonly = ['alpha', 'beta', 'full', 'community'] as const export const CT_FRAMEWORKS: Cypress.ComponentFrameworkDefinition[] = [ @@ -130,7 +120,7 @@ export const CT_FRAMEWORKS: Cypress.ComponentFrameworkDefinition[] = [ }, codeGenFramework: 'react', glob: '*.{js,jsx,tsx}', - mountModule: reactMountModule, + mountModule: mountModule('cypress/react'), supportStatus: 'full', /** * Next.js uses style-loader to inject CSS and requires this element to exist in the HTML. @@ -176,7 +166,7 @@ export const CT_FRAMEWORKS: Cypress.ComponentFrameworkDefinition[] = [ }, codeGenFramework: 'react', glob: '*.{js,jsx,tsx}', - mountModule: reactMountModule, + mountModule: mountModule('cypress/react'), supportStatus: 'full', componentIndexHtml: componentIndexHtmlGenerator(), }, diff --git a/packages/scaffold-config/test/unit/supportFile.spec.ts b/packages/scaffold-config/test/unit/supportFile.spec.ts index 745d76791a3c..ac0e12d6bec1 100644 --- a/packages/scaffold-config/test/unit/supportFile.spec.ts +++ b/packages/scaffold-config/test/unit/supportFile.spec.ts @@ -4,11 +4,12 @@ import { expect } from 'chai' describe('supportFileComponent', () => { context('react', () => { - for (const mountModule of ['cypress/react', 'cypress/react18'] as const) { - it(`handles ${mountModule} and JS`, () => { - const actual = supportFileComponent('js', mountModule) + const mountModule = 'cypress/react' - expect(actual).to.eq(dedent` + it(`handles ${mountModule} and JS`, () => { + const actual = supportFileComponent('js', mountModule) + + expect(actual).to.eq(dedent` // *********************************************************** // This example support/component.js is processed and // loaded automatically before your test files. @@ -37,12 +38,12 @@ describe('supportFileComponent', () => { // Example use: // cy.mount() `) - }) + }) - it(`handles ${mountModule} and TS`, () => { - const actual = supportFileComponent('ts', mountModule) + it(`handles ${mountModule} and TS`, () => { + const actual = supportFileComponent('ts', mountModule) - expect(actual).to.eq(dedent` + expect(actual).to.eq(dedent` // *********************************************************** // This example support/component.ts is processed and // loaded automatically before your test files. @@ -83,8 +84,7 @@ describe('supportFileComponent', () => { // Example use: // cy.mount() `) - }) - } + }) }) context('vue', () => { diff --git a/system-tests/__snapshots__/component_testing_spec.ts.js b/system-tests/__snapshots__/component_testing_spec.ts.js index bc6660da8df6..be3919eb4483 100644 --- a/system-tests/__snapshots__/component_testing_spec.ts.js +++ b/system-tests/__snapshots__/component_testing_spec.ts.js @@ -7,17 +7,17 @@ exports['React major versions with Webpack executes all of the tests for React v ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 1.2.3 │ │ Browser: FooBrowser 88 │ - │ Specs: 5 found (App.cy.jsx, Unmount.cy.jsx, UsingLegacyMount.cy.jsx, Rerendering.cy.jsx, │ - │ mount.cy.jsx) │ - │ Searched: src/App.cy.jsx, src/Unmount.cy.jsx, src/UsingLegacyMount.cy.jsx, src/Rerendering.c │ - │ y.jsx, src/mount.cy.jsx │ + │ Specs: 4 found (App.cy.jsx, Unmount.cy.jsx, Rerendering.cy.jsx, mount.cy.jsx) │ + │ Searched: src/App.cy.jsx, src/Unmount.cy.jsx, src/Rerendering.cy.jsx, src/mount.cy.jsx │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ──────────────────────────────────────────────────────────────────────────────────────────────────── - Running: App.cy.jsx (1 of 5) - 53 modules + Running: App.cy.jsx (1 of 4) +10 assets +65 modules +webpack 5.96.1 compiled successfully in 887 ms ✓ renders hello world @@ -43,7 +43,7 @@ exports['React major versions with Webpack executes all of the tests for React v ──────────────────────────────────────────────────────────────────────────────────────────────────── - Running: Unmount.cy.jsx (2 of 5) + Running: Unmount.cy.jsx (2 of 4) Comp with componentWillUnmount @@ -74,393 +74,7 @@ exports['React major versions with Webpack executes all of the tests for React v ──────────────────────────────────────────────────────────────────────────────────────────────────── - Running: UsingLegacyMount.cy.jsx (3 of 5) - - - using legacy mount - ✓ issues a warning encouraging user to update - - - 1 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 1 │ - │ Passing: 1 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: UsingLegacyMount.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: Rerendering.cy.jsx (4 of 5) - - - re-render - ✓ maintains component state across re-renders - - - 1 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 1 │ - │ Passing: 1 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: Rerendering.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: mount.cy.jsx (5 of 5) - - - mount - ✓ does not error when rendering primitives - teardown - ✓ should mount - ✓ should remove previous mounted component - - - 3 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 3 │ - │ Passing: 3 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: mount.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -==================================================================================================== - - (Run Finished) - - - Spec Tests Passing Failing Pending Skipped - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ ✔ App.cy.jsx XX:XX 2 2 - - - │ - ├────────────────────────────────────────────────────────────────────────────────────────────────┤ - │ ✔ Unmount.cy.jsx XX:XX 3 3 - - - │ - ├────────────────────────────────────────────────────────────────────────────────────────────────┤ - │ ✔ UsingLegacyMount.cy.jsx XX:XX 1 1 - - - │ - ├────────────────────────────────────────────────────────────────────────────────────────────────┤ - │ ✔ Rerendering.cy.jsx XX:XX 1 1 - - - │ - ├────────────────────────────────────────────────────────────────────────────────────────────────┤ - │ ✔ mount.cy.jsx XX:XX 3 3 - - - │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - ✔ All specs passed! XX:XX 10 10 - - - - - -` - -exports['React major versions with Webpack executes all of the tests for React v17 with Webpack 1'] = ` - -==================================================================================================== - - (Run Starting) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Cypress: 1.2.3 │ - │ Browser: FooBrowser 88 │ - │ Specs: 5 found (App.cy.jsx, Unmount.cy.jsx, UsingLegacyMount.cy.jsx, Rerendering.cy.jsx, │ - │ mount.cy.jsx) │ - │ Searched: src/App.cy.jsx, src/Unmount.cy.jsx, src/UsingLegacyMount.cy.jsx, src/Rerendering.c │ - │ y.jsx, src/mount.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: App.cy.jsx (1 of 5) - 50 modules - - - ✓ renders hello world - ✓ renders background - - 2 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 2 │ - │ Passing: 2 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: App.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: Unmount.cy.jsx (2 of 5) - - - Comp with componentWillUnmount - ✓ calls the prop - - mount cleanup - ✓ mount 1 - ✓ mount 2 - - - 3 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 3 │ - │ Passing: 3 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: Unmount.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: UsingLegacyMount.cy.jsx (3 of 5) - - - using legacy mount - ✓ does not warning or log - - - 1 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 1 │ - │ Passing: 1 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: UsingLegacyMount.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: Rerendering.cy.jsx (4 of 5) - - - re-render - ✓ maintains component state across re-renders - - - 1 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 1 │ - │ Passing: 1 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: Rerendering.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: mount.cy.jsx (5 of 5) - - - mount - ✓ does not error when rendering primitives - teardown - ✓ should mount - ✓ should remove previous mounted component - - - 3 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 3 │ - │ Passing: 3 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: mount.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -==================================================================================================== - - (Run Finished) - - - Spec Tests Passing Failing Pending Skipped - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ ✔ App.cy.jsx XX:XX 2 2 - - - │ - ├────────────────────────────────────────────────────────────────────────────────────────────────┤ - │ ✔ Unmount.cy.jsx XX:XX 3 3 - - - │ - ├────────────────────────────────────────────────────────────────────────────────────────────────┤ - │ ✔ UsingLegacyMount.cy.jsx XX:XX 1 1 - - - │ - ├────────────────────────────────────────────────────────────────────────────────────────────────┤ - │ ✔ Rerendering.cy.jsx XX:XX 1 1 - - - │ - ├────────────────────────────────────────────────────────────────────────────────────────────────┤ - │ ✔ mount.cy.jsx XX:XX 3 3 - - - │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - ✔ All specs passed! XX:XX 10 10 - - - - - -` - -exports['React major versions with Vite executes all of the tests for React v17 with Vite 1'] = ` - -==================================================================================================== - - (Run Starting) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Cypress: 1.2.3 │ - │ Browser: FooBrowser 88 │ - │ Specs: 5 found (App.cy.jsx, Unmount.cy.jsx, UsingLegacyMount.cy.jsx, Rerendering.cy.jsx, │ - │ mount.cy.jsx) │ - │ Searched: src/App.cy.jsx, src/Unmount.cy.jsx, src/UsingLegacyMount.cy.jsx, src/Rerendering.c │ - │ y.jsx, src/mount.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: App.cy.jsx (1 of 5) - - - ✓ renders hello world - ✓ renders background - - 2 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 2 │ - │ Passing: 2 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: App.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: Unmount.cy.jsx (2 of 5) - - - Comp with componentWillUnmount - ✓ calls the prop - - mount cleanup - ✓ mount 1 - ✓ mount 2 - - - 3 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 3 │ - │ Passing: 3 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: Unmount.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: UsingLegacyMount.cy.jsx (3 of 5) - - - using legacy mount - ✓ does not warning or log - - - 1 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 1 │ - │ Passing: 1 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: UsingLegacyMount.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: Rerendering.cy.jsx (4 of 5) + Running: Rerendering.cy.jsx (3 of 4) re-render @@ -487,7 +101,7 @@ exports['React major versions with Vite executes all of the tests for React v17 ──────────────────────────────────────────────────────────────────────────────────────────────────── - Running: mount.cy.jsx (5 of 5) + Running: mount.cy.jsx (4 of 4) mount @@ -526,13 +140,11 @@ exports['React major versions with Vite executes all of the tests for React v17 ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ Unmount.cy.jsx XX:XX 3 3 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ - │ ✔ UsingLegacyMount.cy.jsx XX:XX 1 1 - - - │ - ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ Rerendering.cy.jsx XX:XX 1 1 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ mount.cy.jsx XX:XX 3 3 - - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ - ✔ All specs passed! XX:XX 10 10 - - - + ✔ All specs passed! XX:XX 9 9 - - - ` @@ -546,16 +158,14 @@ exports['React major versions with Vite executes all of the tests for React v18 ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 1.2.3 │ │ Browser: FooBrowser 88 │ - │ Specs: 5 found (App.cy.jsx, Unmount.cy.jsx, UsingLegacyMount.cy.jsx, Rerendering.cy.jsx, │ - │ mount.cy.jsx) │ - │ Searched: src/App.cy.jsx, src/Unmount.cy.jsx, src/UsingLegacyMount.cy.jsx, src/Rerendering.c │ - │ y.jsx, src/mount.cy.jsx │ + │ Specs: 4 found (App.cy.jsx, Unmount.cy.jsx, Rerendering.cy.jsx, mount.cy.jsx) │ + │ Searched: src/App.cy.jsx, src/Unmount.cy.jsx, src/Rerendering.cy.jsx, src/mount.cy.jsx │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ──────────────────────────────────────────────────────────────────────────────────────────────────── - Running: App.cy.jsx (1 of 5) + Running: App.cy.jsx (1 of 4) ✓ renders hello world @@ -581,7 +191,7 @@ exports['React major versions with Vite executes all of the tests for React v18 ──────────────────────────────────────────────────────────────────────────────────────────────────── - Running: Unmount.cy.jsx (2 of 5) + Running: Unmount.cy.jsx (2 of 4) Comp with componentWillUnmount @@ -612,34 +222,7 @@ exports['React major versions with Vite executes all of the tests for React v18 ──────────────────────────────────────────────────────────────────────────────────────────────────── - Running: UsingLegacyMount.cy.jsx (3 of 5) - - - using legacy mount - ✓ issues a warning encouraging user to update - - - 1 passing - - - (Results) - - ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 1 │ - │ Passing: 1 │ - │ Failing: 0 │ - │ Pending: 0 │ - │ Skipped: 0 │ - │ Screenshots: 0 │ - │ Video: false │ - │ Duration: X seconds │ - │ Spec Ran: UsingLegacyMount.cy.jsx │ - └────────────────────────────────────────────────────────────────────────────────────────────────┘ - - -──────────────────────────────────────────────────────────────────────────────────────────────────── - - Running: Rerendering.cy.jsx (4 of 5) + Running: Rerendering.cy.jsx (3 of 4) re-render @@ -666,7 +249,7 @@ exports['React major versions with Vite executes all of the tests for React v18 ──────────────────────────────────────────────────────────────────────────────────────────────────── - Running: mount.cy.jsx (5 of 5) + Running: mount.cy.jsx (4 of 4) mount @@ -705,13 +288,11 @@ exports['React major versions with Vite executes all of the tests for React v18 ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ Unmount.cy.jsx XX:XX 3 3 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ - │ ✔ UsingLegacyMount.cy.jsx XX:XX 1 1 - - - │ - ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ Rerendering.cy.jsx XX:XX 1 1 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ mount.cy.jsx XX:XX 3 3 - - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ - ✔ All specs passed! XX:XX 10 10 - - - + ✔ All specs passed! XX:XX 9 9 - - - ` diff --git a/system-tests/project-fixtures/react/cypress/support/component.js b/system-tests/project-fixtures/react/cypress/support/component.js index 96736d7047cb..fd025808277a 100644 --- a/system-tests/project-fixtures/react/cypress/support/component.js +++ b/system-tests/project-fixtures/react/cypress/support/component.js @@ -1,4 +1,4 @@ -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' import './backgroundColor.css' diff --git a/system-tests/project-fixtures/runner-specs/cypress/support/component.js b/system-tests/project-fixtures/runner-specs/cypress/support/component.js index 70284198ed61..86674a7a022b 100644 --- a/system-tests/project-fixtures/runner-specs/cypress/support/component.js +++ b/system-tests/project-fixtures/runner-specs/cypress/support/component.js @@ -1,3 +1,3 @@ -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' Cypress.Commands.add('mount', mount) diff --git a/system-tests/projects/cypress-in-cypress/src/NewComponent.spec.jsx b/system-tests/projects/cypress-in-cypress/src/NewComponent.spec.jsx index fe8ee97c541a..a202ae027161 100644 --- a/system-tests/projects/cypress-in-cypress/src/NewComponent.spec.jsx +++ b/system-tests/projects/cypress-in-cypress/src/NewComponent.spec.jsx @@ -1,5 +1,5 @@ import React from 'react' -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' describe('NewComponent', () => { it('renders the new component', () => { diff --git a/system-tests/projects/cypress-in-cypress/src/TestComponent.spec.jsx b/system-tests/projects/cypress-in-cypress/src/TestComponent.spec.jsx index 214c74d911cf..0324c25cf485 100644 --- a/system-tests/projects/cypress-in-cypress/src/TestComponent.spec.jsx +++ b/system-tests/projects/cypress-in-cypress/src/TestComponent.spec.jsx @@ -1,5 +1,5 @@ import React from 'react' -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' describe('TestComponent', () => { it('renders the test component', () => { diff --git a/system-tests/projects/experimental-JIT/vite/cypress/support/component.js b/system-tests/projects/experimental-JIT/vite/cypress/support/component.js index 70284198ed61..86674a7a022b 100644 --- a/system-tests/projects/experimental-JIT/vite/cypress/support/component.js +++ b/system-tests/projects/experimental-JIT/vite/cypress/support/component.js @@ -1,3 +1,3 @@ -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' Cypress.Commands.add('mount', mount) diff --git a/system-tests/projects/experimental-JIT/webpack/cypress/support/component.js b/system-tests/projects/experimental-JIT/webpack/cypress/support/component.js index 70284198ed61..86674a7a022b 100644 --- a/system-tests/projects/experimental-JIT/webpack/cypress/support/component.js +++ b/system-tests/projects/experimental-JIT/webpack/cypress/support/component.js @@ -1,3 +1,3 @@ -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' Cypress.Commands.add('mount', mount) diff --git a/system-tests/projects/next-14-tsconfig-tailwind/cypress/support/component.ts b/system-tests/projects/next-14-tsconfig-tailwind/cypress/support/component.ts index 44bd3a01d77e..81d0e5e698cb 100644 --- a/system-tests/projects/next-14-tsconfig-tailwind/cypress/support/component.ts +++ b/system-tests/projects/next-14-tsconfig-tailwind/cypress/support/component.ts @@ -1,6 +1,6 @@ import 'tailwindcss/tailwind.css' -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' declare global { namespace Cypress { diff --git a/system-tests/projects/nextjs-configured/components/button.cy.jsx b/system-tests/projects/nextjs-configured/components/button.cy.jsx index 02e1ca0a1a77..7078df6ba3b8 100644 --- a/system-tests/projects/nextjs-configured/components/button.cy.jsx +++ b/system-tests/projects/nextjs-configured/components/button.cy.jsx @@ -1,5 +1,5 @@ import React from 'react' -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' import { Button } from './button' it('works', () => { diff --git a/system-tests/projects/nextjs-unconfigured/components/button.cy.jsx b/system-tests/projects/nextjs-unconfigured/components/button.cy.jsx index 02e1ca0a1a77..7078df6ba3b8 100644 --- a/system-tests/projects/nextjs-unconfigured/components/button.cy.jsx +++ b/system-tests/projects/nextjs-unconfigured/components/button.cy.jsx @@ -1,5 +1,5 @@ import React from 'react' -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' import { Button } from './button' it('works', () => { diff --git a/system-tests/projects/no-specs/cypress/support/component.js b/system-tests/projects/no-specs/cypress/support/component.js index b70bd8c84f3a..be20eaa89ea2 100644 --- a/system-tests/projects/no-specs/cypress/support/component.js +++ b/system-tests/projects/no-specs/cypress/support/component.js @@ -19,7 +19,7 @@ import './commands' // Alternatively you can use CommonJS syntax: // require('./commands') -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' Cypress.Commands.add('mount', mount) diff --git a/system-tests/projects/protocol/cypress/support/component.ts b/system-tests/projects/protocol/cypress/support/component.ts index 52b74e5f5862..b3c30eabe612 100644 --- a/system-tests/projects/protocol/cypress/support/component.ts +++ b/system-tests/projects/protocol/cypress/support/component.ts @@ -1,4 +1,4 @@ -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' // Augment the Cypress namespace to include type definitions for // your custom command. diff --git a/system-tests/projects/react-vite-ts-configured/src/App.cy.tsx b/system-tests/projects/react-vite-ts-configured/src/App.cy.tsx index 08fe40cbe427..4b2373579092 100644 --- a/system-tests/projects/react-vite-ts-configured/src/App.cy.tsx +++ b/system-tests/projects/react-vite-ts-configured/src/App.cy.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' import App from './App.tsx' it('works', () => { diff --git a/system-tests/projects/react18/cypress/support/component.js b/system-tests/projects/react18/cypress/support/component.js index 96736d7047cb..fd025808277a 100644 --- a/system-tests/projects/react18/cypress/support/component.js +++ b/system-tests/projects/react18/cypress/support/component.js @@ -1,4 +1,4 @@ -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' import './backgroundColor.css' diff --git a/system-tests/projects/react18/src/UsingLegacyMount.cy.jsx b/system-tests/projects/react18/src/UsingLegacyMount.cy.jsx deleted file mode 100644 index 3bb5e5147cbc..000000000000 --- a/system-tests/projects/react18/src/UsingLegacyMount.cy.jsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react' -import { mount } from 'cypress/react' - -function App () { - return

Hello world

-} - -describe('using legacy mount', () => { - it('issues a warning encouraging user to update', () => { - // dont log else we create an endless loop! - const log = cy.spy(Cypress, 'log').log(false) - const err = cy.spy(console, 'error') - - mount().get('h1').contains('Hello world') - .then(() => { - const msg = '[cypress/react]: You are using `cypress/react`, which is designed for React <= 17. Consider changing to `cypress/react18`, which is designed for React 18.' - const warning = log.getCalls().find((call) => call.args[0].name === 'warning') - - expect(warning.lastArg.message).to.eq(msg) - expect(err).to.have.been.calledWith(msg) - }) - }) -}) diff --git a/system-tests/projects/tailwind-vite/src/App.cy.jsx b/system-tests/projects/tailwind-vite/src/App.cy.jsx index 9bfbd96f48a5..c37ea8ba9b9f 100644 --- a/system-tests/projects/tailwind-vite/src/App.cy.jsx +++ b/system-tests/projects/tailwind-vite/src/App.cy.jsx @@ -1,5 +1,5 @@ import React from 'react' -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' export const App = () => { return ( diff --git a/system-tests/projects/vite-simple/cypress/support/component.js b/system-tests/projects/vite-simple/cypress/support/component.js index 70284198ed61..86674a7a022b 100644 --- a/system-tests/projects/vite-simple/cypress/support/component.js +++ b/system-tests/projects/vite-simple/cypress/support/component.js @@ -1,3 +1,3 @@ -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' Cypress.Commands.add('mount', mount) diff --git a/system-tests/projects/webpack-dev-server-relative/src/relative-url.cy.jsx b/system-tests/projects/webpack-dev-server-relative/src/relative-url.cy.jsx index b47c72bea025..1429f4367dd4 100644 --- a/system-tests/projects/webpack-dev-server-relative/src/relative-url.cy.jsx +++ b/system-tests/projects/webpack-dev-server-relative/src/relative-url.cy.jsx @@ -1,5 +1,5 @@ import React from 'react' -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' describe('webpack-dev-server', () => { it('image with relative path should load', () => { diff --git a/system-tests/projects/webpack5_wds4-react/src/App.cy.jsx b/system-tests/projects/webpack5_wds4-react/src/App.cy.jsx index df11cbb62b75..523c026f0797 100644 --- a/system-tests/projects/webpack5_wds4-react/src/App.cy.jsx +++ b/system-tests/projects/webpack5_wds4-react/src/App.cy.jsx @@ -1,6 +1,6 @@ import React from 'react' import { App } from './App' -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' it('renders hello world', () => { mount() diff --git a/system-tests/projects/webpack5_wds5-react/src/App.cy.jsx b/system-tests/projects/webpack5_wds5-react/src/App.cy.jsx index df11cbb62b75..523c026f0797 100644 --- a/system-tests/projects/webpack5_wds5-react/src/App.cy.jsx +++ b/system-tests/projects/webpack5_wds5-react/src/App.cy.jsx @@ -1,6 +1,6 @@ import React from 'react' import { App } from './App' -import { mount } from 'cypress/react18' +import { mount } from 'cypress/react' it('renders hello world', () => { mount() diff --git a/system-tests/test/component_testing_spec.ts b/system-tests/test/component_testing_spec.ts index 82bb5a1e7a0d..9644f3d94968 100644 --- a/system-tests/test/component_testing_spec.ts +++ b/system-tests/test/component_testing_spec.ts @@ -47,7 +47,7 @@ describe(`React major versions with Vite`, function () { return systemTests.exec(this, { project: `react${majorVersion}`, configFile: 'cypress-vite-default.config.ts', - spec: 'src/App.cy.jsx,src/Unmount.cy.jsx,src/UsingLegacyMount.cy.jsx,src/Rerendering.cy.jsx,src/mount.cy.jsx', + spec: 'src/App.cy.jsx,src/Unmount.cy.jsx,src/Rerendering.cy.jsx,src/mount.cy.jsx', testingType: 'component', browser: 'chrome', snapshot: true, @@ -65,7 +65,7 @@ describe(`React major versions with Webpack`, function () { return systemTests.exec(this, { project: `react${majorVersion}`, configFile: 'cypress-webpack.config.ts', - spec: 'src/App.cy.jsx,src/Unmount.cy.jsx,src/UsingLegacyMount.cy.jsx,src/Rerendering.cy.jsx,src/mount.cy.jsx', + spec: 'src/App.cy.jsx,src/Unmount.cy.jsx,src/Rerendering.cy.jsx,src/mount.cy.jsx', testingType: 'component', browser: 'chrome', snapshot: true, diff --git a/yarn.lock b/yarn.lock index 67553298baab..1c8b19731796 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1553,10 +1553,10 @@ dependencies: "@babel/types" "^7.24.7" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.24.6", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.24.8", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.24.8" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" - integrity sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.24.8", "@babel/helper-plugin-utils@^7.25.9", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz#9cbdd63a9443a2c92a725cca7ebca12cc8dd9f46" + integrity sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw== "@babel/helper-remap-async-to-generator@^7.24.7", "@babel/helper-remap-async-to-generator@^7.25.0": version "7.25.0" @@ -2220,19 +2220,19 @@ dependencies: "@babel/plugin-transform-react-jsx" "^7.24.7" -"@babel/plugin-transform-react-jsx-self@^7.24.5": - version "7.24.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.6.tgz#4fa4870d594d6840d724d2006d0f98b19be6f502" - integrity sha512-FfZfHXtQ5jYPQsCRyLpOv2GeLIIJhs8aydpNh39vRDjhD411XcfWDni5i7OjP/Rs8GAtTn7sWFFELJSHqkIxYg== +"@babel/plugin-transform-react-jsx-self@^7.24.7": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.9.tgz#c0b6cae9c1b73967f7f9eb2fca9536ba2fad2858" + integrity sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg== dependencies: - "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-react-jsx-source@^7.24.1": - version "7.24.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.24.6.tgz#4e1503f24ca5fccb1fc7f20c57426899d5ce5c1f" - integrity sha512-BQTBCXmFRreU3oTUXcGKuPOfXAGb1liNY4AvvFKsOBAJ89RKcTsIrSsnMYkj59fNa66OFKnSa4AJZfy5Y4B9WA== +"@babel/plugin-transform-react-jsx-source@^7.24.7": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.9.tgz#4c6b8daa520b5f155b5fb55547d7c9fa91417503" + integrity sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg== dependencies: - "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-plugin-utils" "^7.25.9" "@babel/plugin-transform-react-jsx@^7.0.0", "@babel/plugin-transform-react-jsx@^7.24.7": version "7.25.2" @@ -6230,10 +6230,10 @@ tslib "^2.0.0" warning "^4.0.3" -"@remix-run/router@1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.5.0.tgz#57618e57942a5f0131374a9fdb0167e25a117fdc" - integrity sha512-bkUDCp8o1MvFO+qxkODcbhSqRa6P2GXgrGZVpt0dCXNW2HCSCqYI0ZoAqEOSAjRWmmlKcYgFvN4B4S+zo/f8kg== +"@remix-run/router@1.21.0": + version "1.21.0" + resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.21.0.tgz#c65ae4262bdcfe415dbd4f64ec87676e4a56e2b5" + integrity sha512-xfSkCAchbdG5PnbrKqFWwia4Bi61nH+wm8wLEqfHDyp7Y3dZzgqS2itV8i4gAq9pC2HsTpwyBC6Ds8VHZ96JlA== "@rollup/plugin-commonjs@^17.1.0": version "17.1.0" @@ -8194,13 +8194,6 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== -"@types/react-dom@17.0.25": - version "17.0.25" - resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.25.tgz#e0e5b3571e1069625b3a3da2b279379aa33a0cb5" - integrity sha512-urx7A7UxkZQmThYA4So0NelOVjx3V4rNFVJwp0WZlbIK5eM4rNJDiN3R/E9ix0MBh6kAEojk/9YL+Te6D9zHNA== - dependencies: - "@types/react" "^17" - "@types/react-dom@18.3.1": version "18.3.1" resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.1.tgz#1e4654c08a9cdcfb6594c780ac59b55aad42fe07" @@ -8216,15 +8209,6 @@ "@types/prop-types" "*" csstype "^3.0.2" -"@types/react@17.0.83", "@types/react@^17": - version "17.0.83" - resolved "https://registry.npmjs.org/@types/react/-/react-17.0.83.tgz#b477c56387b74279281149dcf5ba2a1e2216d131" - integrity sha512-l0m4ArKJvmFtR4e8UmKrj1pB4tUgOhJITf+mADyF/p69Ts1YAR/E+G9XEM0mHXKVRa1dQNHseyyDNzeuAXfXQw== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "^0.16" - csstype "^3.0.2" - "@types/react@^16": version "16.14.62" resolved "https://registry.npmjs.org/@types/react/-/react-16.14.62.tgz#449e4e81caaf132d0c2c390644e577702db1dd9e" @@ -8294,12 +8278,7 @@ resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff" integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A== -"@types/semver@7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" - integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== - -"@types/semver@^7.5.0": +"@types/semver@7.5.8", "@types/semver@^7.5.0": version "7.5.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== @@ -8769,14 +8748,14 @@ regenerator-runtime "^0.14.1" systemjs "^6.15.1" -"@vitejs/plugin-react@4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.3.0.tgz#f20ec2369a92d8abaaefa60da8b7157819d20481" - integrity sha512-KcEbMsn4Dpk+LIbHMj7gDPRKaTMStxxWRkRmxsg/jVdFdJCZWt1SchZcf0M4t8lIKdwwMsEyzhrcOXRrDPtOBw== +"@vitejs/plugin-react@4.3.3": + version "4.3.3" + resolved "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.3.tgz#28301ac6d7aaf20b73a418ee5c65b05519b4836c" + integrity sha512-NooDe9GpHGqNns1i8XDERg0Vsg5SSYRhRxxyTGogUdkdNt47jal+fbuYi+Yfq6pzRCKXyoPcWisfxE6RIM3GKA== dependencies: - "@babel/core" "^7.24.5" - "@babel/plugin-transform-react-jsx-self" "^7.24.5" - "@babel/plugin-transform-react-jsx-source" "^7.24.1" + "@babel/core" "^7.25.2" + "@babel/plugin-transform-react-jsx-self" "^7.24.7" + "@babel/plugin-transform-react-jsx-source" "^7.24.7" "@types/babel__core" "^7.20.5" react-refresh "^0.14.2" @@ -10618,7 +10597,7 @@ axios@0.21.2: dependencies: follow-redirects "^1.14.0" -axios@^1.7.4: +axios@1.7.7, axios@^1.7.4: version "1.7.7" resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== @@ -22479,7 +22458,7 @@ mobx@6.13.5: resolved "https://registry.npmjs.org/mobx/-/mobx-6.13.5.tgz#957d9df88c7f8b4baa7c6f8bdcb6d68b432a6ed5" integrity sha512-/HTWzW2s8J1Gqt+WmUj5Y0mddZk+LInejADc79NJadrWla3rHzmRHki/mnEUH1AvOmbNTZ1BRbKxr8DSgfdjMA== -"mocha-7.0.1@npm:mocha@7.0.1": +"mocha-7.0.1@npm:mocha@7.0.1", mocha@7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.0.1.tgz#276186d35a4852f6249808c6dd4a1376cbf6c6ce" integrity sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg== @@ -22596,36 +22575,6 @@ mocha@6.2.2: yargs-parser "13.1.1" yargs-unparser "1.6.0" -mocha@7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.0.1.tgz#276186d35a4852f6249808c6dd4a1376cbf6c6ce" - integrity sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "2.2.0" - minimatch "3.0.4" - mkdirp "0.5.1" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.0" - yargs-parser "13.1.1" - yargs-unparser "1.6.0" - mocha@7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.0.tgz#c784f579ad0904d29229ad6cb1e2514e4db7d249" @@ -25865,7 +25814,7 @@ prop-types@15.7.2: object-assign "^4.1.1" react-is "^16.8.1" -prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@15.8.1, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -26292,25 +26241,6 @@ react-docgen@6.0.4: object-assign "^4.1.1" prop-types "^15.6.0" -react-dom@16.8.6: - version "16.8.6" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f" - integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.13.6" - -react-dom@17.0.2, react-dom@^17.0.2: - version "17.0.2" - resolved "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.2" - react-dom@18.3.1: version "18.3.1" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4" @@ -26380,20 +26310,20 @@ react-remove-scroll@^2.3.0: use-callback-ref "^1.2.3" use-sidecar "^1.0.1" -react-router-dom@6.10.0: - version "6.10.0" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.10.0.tgz#090ddc5c84dc41b583ce08468c4007c84245f61f" - integrity sha512-E5dfxRPuXKJqzwSe/qGcqdwa18QiWC6f3H3cWXM24qj4N0/beCIf/CWTipop2xm7mR0RCS99NnaqPNjHtrAzCg== +react-router-dom@6.28.0: + version "6.28.0" + resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.0.tgz#f73ebb3490e59ac9f299377062ad1d10a9f579e6" + integrity sha512-kQ7Unsl5YdyOltsPGl31zOjLrDv+m2VcIEcIHqYYD3Lp0UppLjrzcfJqDJwXxFw3TH/yvapbnUvPlAj7Kx5nbg== dependencies: - "@remix-run/router" "1.5.0" - react-router "6.10.0" + "@remix-run/router" "1.21.0" + react-router "6.28.0" -react-router@6.10.0: - version "6.10.0" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.10.0.tgz#230f824fde9dd0270781b5cb497912de32c0a971" - integrity sha512-Nrg0BWpQqrC3ZFFkyewrflCud9dio9ME3ojHCF/WLsprJVzkq3q3UeEhMCAW1dobjeGbWgjNn/PVF6m46ANxXQ== +react-router@6.28.0: + version "6.28.0" + resolved "https://registry.npmjs.org/react-router/-/react-router-6.28.0.tgz#29247c86d7ba901d7e5a13aa79a96723c3e59d0d" + integrity sha512-HrYdIFqdrnhDw0PqG/AKjAqEqM7AvxCz0DQ4h2W8k6nqmc5uRBYDag0SBxx9iYz5G8gnuNVLzUe13wl9eAsXXg== dependencies: - "@remix-run/router" "1.5.0" + "@remix-run/router" "1.21.0" react-style-singleton@^2.1.0: version "2.1.1" @@ -26414,24 +26344,6 @@ react-test-renderer@^16.0.0-0: react-is "^16.8.6" scheduler "^0.19.1" -react@16.8.6: - version "16.8.6" - resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe" - integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.13.6" - -react@17.0.2, react@^17.0.2: - version "17.0.2" - resolved "https://registry.npmjs.org/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - react@18.3.1: version "18.3.1" resolved "https://registry.npmjs.org/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" @@ -27554,14 +27466,6 @@ sax@>=0.6.0, sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.13.6: - version "0.13.6" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" - integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler@^0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" @@ -27570,14 +27474,6 @@ scheduler@^0.19.1: loose-envify "^1.1.0" object-assign "^4.1.1" -scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler@^0.23.2: version "0.23.2" resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3" @@ -29239,7 +29135,7 @@ string-template@~0.2.1: resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= -"string-width-cjs@npm:string-width@^4.2.0": +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -29265,15 +29161,6 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -29384,7 +29271,7 @@ stringify-object@^3.0.0, stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -29405,13 +29292,6 @@ strip-ansi@5.2.0, strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -31727,7 +31607,7 @@ vite@5.2.11: optionalDependencies: fsevents "~2.3.3" -vite@^5.0.0: +vite@5.4.10, vite@^5.0.0: version "5.4.10" resolved "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz#d358a7bd8beda6cf0f3b7a450a8c7693a4f80c18" integrity sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ== @@ -32401,7 +32281,7 @@ workerpool@6.2.0: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -32444,15 +32324,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"