-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Core: Move react
and react-dom
to peer deps
#12972
Commits on Nov 2, 2020
-
Move
react
andreact-dom
to peer deps`react` and `react-dom` should always be peer dependencies of packages that provide react components to ensure that there's a single instance of those. Plus, all packages depending on a package with `react` as peerDep should also have it as peerDeps (transitive peer dependencies) or as deps. Finally, packages in `examples/*` are "end" packages using Storybook so they must provide `react` and `react-dom` in their deps/devDeps
Configuration menu - View commit details
-
Copy full SHA for eaa9410 - Browse repository at this point
Copy the full SHA eaa9410View commit details -
Use
react
andreact-dom
16.13.1 as 16.14.0 looks to cause trouble…… with examples/official-storybook Example: ERR! SyntaxError: /tmp/storybook/examples/official-storybook/stories/notes/notes.md: pragma and pragmaFrag cannot be set when runtime is automatic.
Configuration menu - View commit details
-
Copy full SHA for 814807d - Browse repository at this point
Copy the full SHA 814807dView commit details -
Add
react
andreact-dom
to Preact and React TS E2E testsThese deps need to be explicitly added as they are peerDeps of SB packages now.
Configuration menu - View commit details
-
Copy full SHA for f3a6f13 - Browse repository at this point
Copy the full SHA f3a6f13View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8ce617 - Browse repository at this point
Copy the full SHA c8ce617View commit details -
Switch
react
andreact-dom
to regular dep in non-react appsI used `16.13.1` as it looks there are, for now, some issue between 16.14.x and `addons-docs`
Configuration menu - View commit details
-
Copy full SHA for b233743 - Browse repository at this point
Copy the full SHA b233743View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c0a4dc - Browse repository at this point
Copy the full SHA 0c0a4dcView commit details -
Apply solution discussed in monthly meeting:
- Set `react` and `react-dom` as peerDeps for all `lib` packages needing them - Set `react` and `react-dom` as peerDeps + optional tag for all `addon` packages needing them - Set `react` and `react-dom` as regular deps for all non react apps - Remove `react` and `react-dom` from root `package.json` - Set a fixed version of `react` in all examples Also: - Use "^16.8.0 || ^17.0.0" version range as some packages need React Hooks
Configuration menu - View commit details
-
Copy full SHA for 89d0ed9 - Browse repository at this point
Copy the full SHA 89d0ed9View commit details -
Remove
react
andreact-dom
from required deps in E2E test configsThey are now regular deps of SB packages for all non-react app so there is no more need to add them explicitly.
Configuration menu - View commit details
-
Copy full SHA for b1a0f4b - Browse repository at this point
Copy the full SHA b1a0f4bView commit details
Commits on Nov 3, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 225b5fd - Browse repository at this point
Copy the full SHA 225b5fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 18013d9 - Browse repository at this point
Copy the full SHA 18013d9View commit details