Skip to content

Support developing with React 16, and as a peer dependency #1468

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

Merged
merged 35 commits into from
Aug 22, 2018
Merged

Support developing with React 16, and as a peer dependency #1468

merged 35 commits into from
Aug 22, 2018

Conversation

futuremint
Copy link
Contributor

@futuremint futuremint commented Jul 20, 2018

Fixes #1282. Note: no code changes to any components were needed for this.

This changes the dev dependency to React 16 as well as the version of ReactDOM, Enzyme, and Test Utils that are being used.

Unit tests and a few older storybook examples have been updated where needed to run with the newer version of React and Enzyme. They also run 50% faster now in the browser (5s vs. 11s in master).

Additional description


CONTRIBUTOR checklist (do not remove)

Please complete for every pull request

  • npm run lint:fix has been run and linting passes.
  • Mocha, Jest (Storyshots), and components/component-docs.json CI tests pass (npm test).
  • Review the appropriate Storybook stories. Open http://localhost:9001/.
  • Review tests are passing in the browser. Open http://localhost:8001/.
  • Update docs where any React version is specifically mentioned.
  • Run npm run local-update within locally cloned site repo to confirm the site will function correctly at the next release.

REVIEWER checklist (do not remove)

  • TravisCI tests pass. This includes linting, Mocha, Jest, Storyshots, and components/component-docs.json tests.
  • Review the appropriate Storybook stories. Open http://localhost:9001/.
  • The Accessibility panel of each Storybook story has 0 violations (aXe). Open http://localhost:9001/.
  • Review tests are passing in the browser. Open http://localhost:8001/.
  • While the contributor's branch is checked out, run npm run local-update within locally cloned site repo to confirm the site will function correctly at the next release.

@futuremint futuremint changed the title DO NOT MERGE: React 16 progess Support developing with React 16, and as a peer dependency Aug 15, 2018
package.json Outdated
@@ -113,8 +113,8 @@
},
"peerDependencies": {
"@salesforce-ux/design-system": "^2.6.0",
"react": ">=15.4.1 <16",
"react-dom": ">=15.4.1 <16"
"react": ">=16",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be this way in the devDependencies, but are you sure we shouldn't include 15 since you only changed test code? We could also bump the minor version, too, just to make sure it's clear to consumers even if it's not a breaking change except npm and introduce npm install warnings. We have communicated to teams that we were going to do this after March, but I'm thinking we need to re-iterate it before releasing. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks for catching this. I mean to put it back to including 15.4.1 and above... I'll get this done this afternoon or tomorrow.

@interactivellama
Copy link
Contributor

We will want to update any docs that mention a version. https://github.com/salesforce/design-system-react#getting-started

@futuremint
Copy link
Contributor Author

Thanks, I forgot about the docs, I'll get those updated too.

@interactivellama interactivellama merged commit 5203d9b into salesforce:master Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make library compatible with React 16
2 participants