instructure-react / react-tinymce

React TinyMCE component
181 stars 115 forks source link

Removes Peer Dependency on React #7

Closed designfrontier closed 8 years ago

designfrontier commented 8 years ago

With NPM 3 coming out soon the peer dependency is already deprecated and will soon be removed all together. Peer dependencies should be moved to dependencies.

This does that thing^

mzabriskie commented 8 years ago

Is there an official thing from npm detailing how this should be handled? I have had countless discussions, and gone around in circles many times trying to solve where the react dependency belongs. What I currently have is the result of all the debate.

At the same time, as you pointed out, the changes in npm 3 will obviously affect things. Happy to discuss the best solution.

designfrontier commented 8 years ago

Good solid podcast on the NPM 3 stuff http://nodeup.com/eightynine. If you haven't already listened it's a good one.

If I remember the discussion right they recommend moving any peer dependency to dependencies. Since this project requires in react ( var React = require('react'); ) the project requires it and it and should be listed as such. Theoretically this results in the exact same behavior as peer does in the new flatter install for npm 3.