0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

Roll back to React 17 in docs template (#3129)

The docs example template includes Algolia’s Docsearch components to provide a search bar but this doesn’t support React 18 yet, so will error when dependencies are being installed.

See https://discord.com/channels/830184174198718474/965413318678425600
This commit is contained in:
Chris Swithinbank 2022-04-18 16:09:57 +02:00 committed by GitHub
parent 41d503c7b1
commit 9e35758ec3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 11 deletions

View file

@ -0,0 +1,5 @@
---
'@example/docs': patch
---
Fix mismatched React versions

View file

@ -14,8 +14,8 @@
"@docsearch/react": "^3.0.0", "@docsearch/react": "^3.0.0",
"@types/react": "^17.0.44", "@types/react": "^17.0.44",
"preact": "^10.7.1", "preact": "^10.7.1",
"react": "^18.0.0", "react": "^17.0.0",
"react-dom": "^18.0.0" "react-dom": "^17.0.0"
}, },
"devDependencies": { "devDependencies": {
"@astrojs/preact": "^0.1.1", "@astrojs/preact": "^0.1.1",

View file

@ -94,16 +94,16 @@ importers:
'@types/react': ^17.0.44 '@types/react': ^17.0.44
astro: ^1.0.0-beta.12 astro: ^1.0.0-beta.12
preact: ^10.7.1 preact: ^10.7.1
react: ^18.0.0 react: ^17.0.0
react-dom: ^18.0.0 react-dom: ^17.0.0
dependencies: dependencies:
'@algolia/client-search': 4.13.0 '@algolia/client-search': 4.13.0
'@docsearch/css': 3.0.0 '@docsearch/css': 3.0.0
'@docsearch/react': 3.0.0_6ca7f4f00738722475e8daa3551a29ae '@docsearch/react': 3.0.0_5377e26b52c02809078cfcbfa66845b0
'@types/react': 17.0.44 '@types/react': 17.0.44
preact: 10.7.1 preact: 10.7.1
react: 18.0.0 react: 17.0.2
react-dom: 18.0.0_react@18.0.0 react-dom: 17.0.2_react@17.0.2
devDependencies: devDependencies:
'@astrojs/preact': link:../../packages/integrations/preact '@astrojs/preact': link:../../packages/integrations/preact
'@astrojs/react': link:../../packages/integrations/react '@astrojs/react': link:../../packages/integrations/react
@ -3372,7 +3372,7 @@ packages:
resolution: {integrity: sha512-1kkV7tkAsiuEd0shunYRByKJe3xQDG2q7wYg24SOw1nV9/2lwEd4WrUYRJC/ukGTl2/kHeFxsaUvtiOy0y6fFA==} resolution: {integrity: sha512-1kkV7tkAsiuEd0shunYRByKJe3xQDG2q7wYg24SOw1nV9/2lwEd4WrUYRJC/ukGTl2/kHeFxsaUvtiOy0y6fFA==}
dev: false dev: false
/@docsearch/react/3.0.0_6ca7f4f00738722475e8daa3551a29ae: /@docsearch/react/3.0.0_5377e26b52c02809078cfcbfa66845b0:
resolution: {integrity: sha512-yhMacqS6TVQYoBh/o603zszIb5Bl8MIXuOc6Vy617I74pirisDzzcNh0NEaYQt50fVVR3khUbeEhUEWEWipESg==} resolution: {integrity: sha512-yhMacqS6TVQYoBh/o603zszIb5Bl8MIXuOc6Vy617I74pirisDzzcNh0NEaYQt50fVVR3khUbeEhUEWEWipESg==}
peerDependencies: peerDependencies:
'@types/react': '>= 16.8.0 < 18.0.0' '@types/react': '>= 16.8.0 < 18.0.0'
@ -3384,8 +3384,8 @@ packages:
'@docsearch/css': 3.0.0 '@docsearch/css': 3.0.0
'@types/react': 17.0.44 '@types/react': 17.0.44
algoliasearch: 4.13.0 algoliasearch: 4.13.0
react: 18.0.0 react: 17.0.2
react-dom: 18.0.0_react@18.0.0 react-dom: 17.0.2_react@17.0.2
transitivePeerDependencies: transitivePeerDependencies:
- '@algolia/client-search' - '@algolia/client-search'
dev: false dev: false
@ -8175,7 +8175,6 @@ packages:
/object-assign/4.1.1: /object-assign/4.1.1:
resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=} resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: true
/object-hash/2.2.0: /object-hash/2.2.0:
resolution: {integrity: sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==} resolution: {integrity: sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==}
@ -8732,6 +8731,17 @@ packages:
strip-json-comments: 2.0.1 strip-json-comments: 2.0.1
dev: true dev: true
/react-dom/17.0.2_react@17.0.2:
resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==}
peerDependencies:
react: 17.0.2
dependencies:
loose-envify: 1.4.0
object-assign: 4.1.1
react: 17.0.2
scheduler: 0.20.2
dev: false
/react-dom/18.0.0_react@18.0.0: /react-dom/18.0.0_react@18.0.0:
resolution: {integrity: sha512-XqX7uzmFo0pUceWFCt7Gff6IyIMzFUn7QMZrbrQfGxtaxXZIcGQzoNpRLE3fQLnS4XzLLPMZX2T9TRcSrasicw==} resolution: {integrity: sha512-XqX7uzmFo0pUceWFCt7Gff6IyIMzFUn7QMZrbrQfGxtaxXZIcGQzoNpRLE3fQLnS4XzLLPMZX2T9TRcSrasicw==}
peerDependencies: peerDependencies:
@ -8741,6 +8751,14 @@ packages:
react: 18.0.0 react: 18.0.0
scheduler: 0.21.0 scheduler: 0.21.0
/react/17.0.2:
resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==}
engines: {node: '>=0.10.0'}
dependencies:
loose-envify: 1.4.0
object-assign: 4.1.1
dev: false
/react/18.0.0: /react/18.0.0:
resolution: {integrity: sha512-x+VL6wbT4JRVPm7EGxXhZ8w8LTROaxPXOqhlGyVSrv0sB1jkyFGgXxJ8LVoPRLvPR6/CIZGFmfzqUa2NYeMr2A==} resolution: {integrity: sha512-x+VL6wbT4JRVPm7EGxXhZ8w8LTROaxPXOqhlGyVSrv0sB1jkyFGgXxJ8LVoPRLvPR6/CIZGFmfzqUa2NYeMr2A==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
@ -9137,6 +9155,13 @@ packages:
resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==} resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==}
dev: false dev: false
/scheduler/0.20.2:
resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==}
dependencies:
loose-envify: 1.4.0
object-assign: 4.1.1
dev: false
/scheduler/0.21.0: /scheduler/0.21.0:
resolution: {integrity: sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==} resolution: {integrity: sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==}
dependencies: dependencies: