From 8e5bd9e5349ace066794267dc242ce6bd1acdfa1 Mon Sep 17 00:00:00 2001 From: hippotastic <6137925+hippotastic@users.noreply.github.com> Date: Wed, 22 Jun 2022 15:11:48 +0200 Subject: [PATCH] Fix react dependencies to improve test reliability (#3673) * Fix local react tests by unifying versions * Add missing dependencies to react tests * Add changeset * Fix lockfile Co-authored-by: Matthew Phillips --- test/fixtures/0-css/package.json | 4 +++- test/fixtures/astro-attrs/package.json | 4 +++- test/fixtures/astro-client-only/package.json | 4 +++- test/fixtures/astro-dynamic/package.json | 4 +++- test/fixtures/astro-partial-html/package.json | 4 +++- test/fixtures/error-react-spectrum/package.json | 4 ++-- test/fixtures/errors/package.json | 4 +++- test/fixtures/slots-react/package.json | 4 +++- test/fixtures/static-build-frameworks/package.json | 4 +++- 9 files changed, 26 insertions(+), 10 deletions(-) diff --git a/test/fixtures/0-css/package.json b/test/fixtures/0-css/package.json index 81a208109817..ad5f5d8259b1 100644 --- a/test/fixtures/0-css/package.json +++ b/test/fixtures/0-css/package.json @@ -6,6 +6,8 @@ "@astrojs/react": "workspace:*", "@astrojs/svelte": "workspace:*", "@astrojs/vue": "workspace:*", - "astro": "workspace:*" + "astro": "workspace:*", + "react": "^18.1.0", + "react-dom": "^18.1.0" } } diff --git a/test/fixtures/astro-attrs/package.json b/test/fixtures/astro-attrs/package.json index bbf4131d9f3f..41146a6fa28f 100644 --- a/test/fixtures/astro-attrs/package.json +++ b/test/fixtures/astro-attrs/package.json @@ -4,6 +4,8 @@ "private": true, "dependencies": { "@astrojs/react": "workspace:*", - "astro": "workspace:*" + "astro": "workspace:*", + "react": "^18.1.0", + "react-dom": "^18.1.0" } } diff --git a/test/fixtures/astro-client-only/package.json b/test/fixtures/astro-client-only/package.json index 96f83eac23f3..dd987f6c252e 100644 --- a/test/fixtures/astro-client-only/package.json +++ b/test/fixtures/astro-client-only/package.json @@ -5,6 +5,8 @@ "dependencies": { "@astrojs/svelte": "workspace:*", "@astrojs/react": "workspace:*", - "astro": "workspace:*" + "astro": "workspace:*", + "react": "^18.1.0", + "react-dom": "^18.1.0" } } diff --git a/test/fixtures/astro-dynamic/package.json b/test/fixtures/astro-dynamic/package.json index 7a675b3efdda..c9c8c194af6c 100644 --- a/test/fixtures/astro-dynamic/package.json +++ b/test/fixtures/astro-dynamic/package.json @@ -5,6 +5,8 @@ "dependencies": { "@astrojs/react": "workspace:*", "@astrojs/svelte": "workspace:*", - "astro": "workspace:*" + "astro": "workspace:*", + "react": "^18.1.0", + "react-dom": "^18.1.0" } } diff --git a/test/fixtures/astro-partial-html/package.json b/test/fixtures/astro-partial-html/package.json index 55dce70b93ea..2f795916cc13 100644 --- a/test/fixtures/astro-partial-html/package.json +++ b/test/fixtures/astro-partial-html/package.json @@ -4,6 +4,8 @@ "private": true, "dependencies": { "@astrojs/react": "workspace:*", - "astro": "workspace:*" + "astro": "workspace:*", + "react": "^18.1.0", + "react-dom": "^18.1.0" } } diff --git a/test/fixtures/error-react-spectrum/package.json b/test/fixtures/error-react-spectrum/package.json index 1265591f7b24..e06316aa975e 100644 --- a/test/fixtures/error-react-spectrum/package.json +++ b/test/fixtures/error-react-spectrum/package.json @@ -6,7 +6,7 @@ "@adobe/react-spectrum": "^3.18.0", "@astrojs/react": "workspace:*", "astro": "workspace:*", - "react": "^17.0.2", - "react-dom": "^17.0.2" + "react": "^18.1.0", + "react-dom": "^18.1.0" } } diff --git a/test/fixtures/errors/package.json b/test/fixtures/errors/package.json index 54d388f1601a..3438ca92a61a 100644 --- a/test/fixtures/errors/package.json +++ b/test/fixtures/errors/package.json @@ -8,6 +8,8 @@ "@astrojs/solid-js": "workspace:*", "@astrojs/svelte": "workspace:*", "@astrojs/vue": "workspace:*", - "astro": "workspace:*" + "astro": "workspace:*", + "react": "^18.1.0", + "react-dom": "^18.1.0" } } diff --git a/test/fixtures/slots-react/package.json b/test/fixtures/slots-react/package.json index 2cba4ab09459..8159a5624f59 100644 --- a/test/fixtures/slots-react/package.json +++ b/test/fixtures/slots-react/package.json @@ -4,6 +4,8 @@ "private": true, "dependencies": { "@astrojs/react": "workspace:*", - "astro": "workspace:*" + "astro": "workspace:*", + "react": "^18.1.0", + "react-dom": "^18.1.0" } } diff --git a/test/fixtures/static-build-frameworks/package.json b/test/fixtures/static-build-frameworks/package.json index d6157074ee67..d270ce205051 100644 --- a/test/fixtures/static-build-frameworks/package.json +++ b/test/fixtures/static-build-frameworks/package.json @@ -5,6 +5,8 @@ "dependencies": { "@astrojs/react": "workspace:*", "@astrojs/preact": "workspace:*", - "astro": "workspace:*" + "astro": "workspace:*", + "react": "^18.1.0", + "react-dom": "^18.1.0" } }