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: Add Yarn 2 compatibility #9667

Merged
merged 5 commits into from
Feb 4, 2020
Merged

Core: Add Yarn 2 compatibility #9667

merged 5 commits into from
Feb 4, 2020

Commits on Feb 4, 2020

  1. feat(core): create a function to resolve path of a file/dir in storyb…

    …ook cache directory
    
    `find-cache-dir` is not used anymore because it returns `undefined` when there is no `node_modules` folder at project root, as in projects managed with Yarn 2.
    gaetanmaisse committed Feb 4, 2020
    Configuration menu
    Copy the full SHA
    8b4fe4f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b46444e View commit details
    Browse the repository at this point in the history
  3. feat(core): move webpack default output from storybook/core own pac…

    …kage folder to SB cache folder
    
    Using Yarn 2 packages are read only, and more globally it's better to not alter the package with its own execution, so the output is moved outside the packages.
    gaetanmaisse committed Feb 4, 2020
    Configuration menu
    Copy the full SHA
    8af8666 View commit details
    Browse the repository at this point in the history
  4. feat(core): update webpack config to handle Yarn PnP mode out of the box

    Add PnpWebpackPlugin in manager and preview webpack configurations
    gaetanmaisse committed Feb 4, 2020
    Configuration menu
    Copy the full SHA
    782bf45 View commit details
    Browse the repository at this point in the history
  5. chore: add missing or fix implicit transitive peerDependencies

    Yarn 2 introduce an error for this during `yarn install`: YN0002 - MISSING_PEER_DEPENDENCY
    
    For details see https://dev.to/arcanis/implicit-transitive-peer-dependencies-ed0
    
    TL;DR: If you write a package that depends on Foo, and if Foo has a peer dependency, then you must provide it in either of the dependencies or peerDependencies fields. You won't "implicitly inherit" the peer dependencies declared in Foo.
    gaetanmaisse committed Feb 4, 2020
    Configuration menu
    Copy the full SHA
    a978bd2 View commit details
    Browse the repository at this point in the history