Skip to content
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

Merged
merged 15 commits into from
Mar 29, 2022
Merged

Conversation

rafegoldberg
Copy link
Contributor

@rafegoldberg rafegoldberg commented Mar 29, 2022

🧰 What's being changed?

🧪 Testing

If tests pass when run against both React v16 and 17, this worked!

- [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/
@rafegoldberg rafegoldberg added the dependencies Pull requests that update a dependency file label Mar 29, 2022
@rafegoldberg rafegoldberg requested review from erunion, a team, Dashron and gratcliff and removed request for a team March 29, 2022 20:15
lib/enzyme.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@erunion erunion marked this pull request as draft March 29, 2022 20:39
@@ -10,6 +10,9 @@
"url": "https://github.com/readmeio/syntax-highlighter.git"
},
"homepage": "https://readmeio.github.io/syntax-highlighter/",
"engines": {
"node": "^14 || ^16"
Copy link
Member

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.

Copy link
Contributor Author

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": {
Copy link
Member

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.

@erunion erunion marked this pull request as ready for review March 29, 2022 20:53
- name: Install React 16 Enzyme adapter
if: matrix.react == '16'
run: |
npm remove @wojtekmaj/enzyme-adapter-react-17
Copy link
Member

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.

@erunion erunion added the enhancement New feature or request label Mar 29, 2022
Copy link
Member

@erunion erunion left a 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.

Comment on lines 5 to 10
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');
}
Copy link
Contributor Author

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"
Copy link
Contributor Author

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!

@rafegoldberg rafegoldberg merged commit eb29710 into main Mar 29, 2022
@rafegoldberg rafegoldberg deleted the chore/deps/bump-react-to-v17.x branch March 29, 2022 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants