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

Breaking SemVer #7

Open
jonom opened this issue Apr 10, 2019 · 1 comment
Open

Breaking SemVer #7

jonom opened this issue Apr 10, 2019 · 1 comment

Comments

@jonom
Copy link

jonom commented Apr 10, 2019

Hello,

I'm helping out on someone's React 15 project, and updating this module from 1.1.0 to 1.1.1 broke the component. A point release should indicate a backwards compatible bug fix change only but that doesn't seem to be the case. Reverting to 1.1.0 fixes the issue.

You may want to check out NPM's SemVer guide and I'm not an NPM expert but I believe that the dependencies section in your package.json file should be a peer dependencies section instead e.g:

  "peerDependencies": {
    "prop-types": "^15.5.10",
    "react": "^16.2.0",
    "react-dom": "^16.2.0"
  }

Probably prop-types could be a dependency, but react and react-dom should be peers.

If I understand correctly, by having React in your dependencies section I get a copy of React 16 installed by your component in addition to my own copy of React (v15). See https://blog.angularindepth.com/npm-peer-dependencies-f843f3ac4e7f

@khanglu
Copy link
Owner

khanglu commented Apr 10, 2019

Yes, you're totally right. Feel free to submit a PR on this if you're keen. Otherwise I'll update it in the next couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants