developit/unistore

What's the reason for peerDependencies?

Timer opened this issue ยท 3 comments

Timer commented

Hi! What's the reason for having preact and react listed as peerDependencies in the * range?

This creates some unnecessary noise for users installing the package in their projects.

Would you accept a pull request removing these?

Timer commented

Actually, I just realized that unistore has integrations and requires the peer dependencies for newer features (e.g. Yarn PnP).

Could we use the new RFC and make these optional?

yarnpkg/rfcs#105

{
  "peerDependencies": {
    "preact": "optional:*",
    "react": "optional:*"
  }
}

Yes please. ๐Ÿ™

Timer commented

Looks like I didn't catch the change to the RFC. Please see PR: #142