diff --git a/npm/react/cypress/component/basic/rerender/effects.cy.jsx b/npm/react/cypress/component/basic/rerender/effects.cy.jsx index 6b804dc0d81e..ff4fd06c9138 100644 --- a/npm/react/cypress/component/basic/rerender/effects.cy.jsx +++ b/npm/react/cypress/component/basic/rerender/effects.cy.jsx @@ -62,7 +62,12 @@ it('should run unmount effect cleanup when unmounting', () => { cy .then(() => ReactDom.unmountComponentAtNode(getContainerEl())) - .then(() => { + .then(async () => { + // does not call useEffect in react 17 unmount synchronously. + // @see https://github.com/facebook/react/issues/20263. + // to keep this test working, we need to flush the microtask queue. + await new Promise((r) => setTimeout(r)) + expect(layoutEffectCleanup).to.have.been.callCount(1) expect(effectCleanup).to.have.been.callCount(1) }) diff --git a/npm/react/package.json b/npm/react/package.json index 02a0dd210699..a0f4d42f429f 100644 --- a/npm/react/package.json +++ b/npm/react/package.json @@ -22,10 +22,10 @@ "axios": "0.21.2", "cypress": "0.0.0-development", "prop-types": "15.7.2", - "react": "16.8.6", - "react-dom": "16.8.6", - "react-router": "6.0.0-alpha.1", - "react-router-dom": "6.0.0-alpha.1", + "react": "17.0.2", + "react-dom": "17.0.2", + "react-router": "6.10.0", + "react-router-dom": "6.10.0", "semver": "^7.5.3", "typescript": "~5.4.5", "vite": "5.2.11", diff --git a/yarn.lock b/yarn.lock index 6f617067d930..d161b9d932db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2548,7 +2548,7 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.18.9", "@babel/runtime@^7.25.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.18.9", "@babel/runtime@^7.25.0", "@babel/runtime@^7.8.4": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.0.tgz#3af9a91c1b739c569d5d80cc917280919c544ecb" integrity sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw== @@ -18230,13 +18230,6 @@ highlight.js@^8.5.0: resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-8.9.1.tgz#b8a9c5493212a9392f0222b649c9611497ebfb88" integrity sha1-uKnFSTISqTkvAiK2SclhFJfr+4g= -history@5.0.0-beta.4: - version "5.0.0-beta.4" - resolved "https://registry.yarnpkg.com/history/-/history-5.0.0-beta.4.tgz#7fd3bb1f6c75d00d9b5112a816766bfc72d1a3cd" - integrity sha512-LMUnKPB5UlEzDF1BO0VxtDsrguGPO7SuQEmB/5OjL1305afR1O8FvX29rbJep4g2SLmKK3YdDA7+8ZDs8P8n8g== - dependencies: - "@babel/runtime" "^7.7.6" - hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -26404,14 +26397,6 @@ react-remove-scroll@^2.3.0: use-callback-ref "^1.2.3" use-sidecar "^1.0.1" -react-router-dom@6.0.0-alpha.1: - version "6.0.0-alpha.1" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.0.0-alpha.1.tgz#10798a64402d3f113ba8e5bed04bf3009b1d28df" - integrity sha512-k53/EN/yOIy+iSuolJc+3uGAUq06AuEhTXDCac2Hk+YBfRD4fD0cQL3Ram79J8ishRQehycjcfn3+S45iNZb9g== - dependencies: - history "5.0.0-beta.4" - prop-types "^15.7.2" - 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" @@ -26420,14 +26405,6 @@ react-router-dom@6.10.0: "@remix-run/router" "1.5.0" react-router "6.10.0" -react-router@6.0.0-alpha.1: - version "6.0.0-alpha.1" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.0.0-alpha.1.tgz#1bc907f221476e5514370bf296defe41c57e70cd" - integrity sha512-OMQHBebegYqFUKvp9ylogY1bnMGy+hSfYMFmY2VKvVgkYVkBIZwFbhBOwe8IP448KFCrIAyPafBidpJyk9Ga9g== - dependencies: - history "5.0.0-beta.4" - prop-types "^15.7.2" - react-router@6.10.0: version "6.10.0" resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.10.0.tgz#230f824fde9dd0270781b5cb497912de32c0a971"