Skip to content

Commit

Permalink
support react 16.14 (#166)
Browse files Browse the repository at this point in the history
Updates answers-headless-react to the alpha version that
announces react 16.14 support.

Update unit tests to run in react 16 in addition to 17.

I tried to upgrade the lib to use react 18 as as a dev dep,
but we still have a few dependencies that don't allow for 18
like storybook/react.
I opened up an issue for that particular one, since I believe it's the only one.
storybookjs/storybook#18349 (comment)

J=SLAP-2113
TEST=manual,auto

run test-site with react 16, check dev tools to see it is using react-dom 16.14
update unit tests to run in react 16
  • Loading branch information
oshi97 authored Jun 7, 2022
1 parent 9216904 commit 02aa26b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ name: Run Tests
on: [push, pull_request]

jobs:
call_run_tests:
call_run_tests-react-17:
uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1
with:
node_matrix: '["14.x", "16.x"]'
node_matrix: '["14.x", "16.x", "18.x"]'

call_run_tests-react-16:
uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1
with:
build_script: |
npm i -D react@16.14 react-dom@16.14
npm run build
node_matrix: '["14.x", "16.x", "18.x"]'
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
"typescript": "~4.4.3"
},
"peerDependencies": {
"@yext/answers-headless-react": "1.1.1-alpha.123",
"react": "^17 || ^18"
"@yext/answers-headless-react": "1.1.1-alpha.125",
"react": "^16.14 || ^17 || ^18"
},
"jest": {
"bail": 0,
Expand Down
4 changes: 2 additions & 2 deletions test-site/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 02aa26b

Please sign in to comment.