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

Core: Move react and react-dom to peer deps #12972

Merged
merged 10 commits into from
Nov 3, 2020

Commits on Nov 2, 2020

  1. Move react and react-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
    gaetanmaisse committed Nov 2, 2020
    Configuration menu
    Copy the full SHA
    eaa9410 View commit details
    Browse the repository at this point in the history
  2. Use react and react-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.
    gaetanmaisse committed Nov 2, 2020
    Configuration menu
    Copy the full SHA
    814807d View commit details
    Browse the repository at this point in the history
  3. Add react and react-dom to Preact and React TS E2E tests

    These deps need to be explicitly added as they are peerDeps of SB packages now.
    gaetanmaisse committed Nov 2, 2020
    Configuration menu
    Copy the full SHA
    f3a6f13 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c8ce617 View commit details
    Browse the repository at this point in the history
  5. Switch react and react-dom to regular dep in non-react apps

    I used `16.13.1` as it looks there are, for now, some issue between 16.14.x and `addons-docs`
    gaetanmaisse committed Nov 2, 2020
    Configuration menu
    Copy the full SHA
    b233743 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0c0a4dc View commit details
    Browse the repository at this point in the history
  7. 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
    gaetanmaisse committed Nov 2, 2020
    Configuration menu
    Copy the full SHA
    89d0ed9 View commit details
    Browse the repository at this point in the history
  8. Remove react and react-dom from required deps in E2E test configs

    They are now regular deps of SB packages for all non-react app so there is no more need to add them explicitly.
    gaetanmaisse committed Nov 2, 2020
    Configuration menu
    Copy the full SHA
    b1a0f4b View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2020

  1. Update MDX snapshots

    shilman committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    225b5fd View commit details
    Browse the repository at this point in the history
  2. Update yarn.lock

    shilman committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    18013d9 View commit details
    Browse the repository at this point in the history