-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): bump react to v17.x #275
Conversation
- [x] update to react to v17.x - [x] update react peer deps to v16 or 17 - [x] [update enzyme adapter for react v17][ref1] [ref1]: https://semver.npmjs.com/
should be "17.x" not "7.x"!
Co-authored-by: Gabe <[email protected]>
…syntax-highlighter into chore/deps/bump-react-to-v17.x
@@ -10,6 +10,9 @@ | |||
"url": "https://github.com/readmeio/syntax-highlighter.git" | |||
}, | |||
"homepage": "https://readmeio.github.io/syntax-highlighter/", | |||
"engines": { | |||
"node": "^14 || ^16" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're introducing React 17 support in this we might as well make this a major release and formally deprecate Node 12 support while we're at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds about right to me!
@@ -64,11 +67,6 @@ | |||
"webpack-dev-server": "^4.2.1" | |||
}, | |||
"prettier": "@readme/eslint-config/prettier", | |||
"husky": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks for removing this.
- name: Install React 16 Enzyme adapter | ||
if: matrix.react == '16' | ||
run: | | ||
npm remove @wojtekmaj/enzyme-adapter-react-17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this when we're doing React 16 because NPM might throw issues with it wanting React 17 to be around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are all passing on react 16 and 17 in CI now so merge this whenever you want to @rafegoldberg and I'll tag a new release.
let Adapter; | ||
if (process.env.REACT_VERSION && process.env.REACT_VERSION == '16') { | ||
Adapter = require('enzyme-adapter-react-16'); | ||
} else { | ||
Adapter = require('@wojtekmaj/enzyme-adapter-react-17'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -10,6 +10,9 @@ | |||
"url": "https://github.com/readmeio/syntax-highlighter.git" | |||
}, | |||
"homepage": "https://readmeio.github.io/syntax-highlighter/", | |||
"engines": { | |||
"node": "^14 || ^16" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds about right to me!
🧰 What's being changed?
🧪 Testing
If tests pass when run against both React v16 and 17, this worked!