uber-archive / r-dom

React DOM wrapper
MIT License
263 stars 18 forks source link

Move react to peerDependencies #15

Closed lxe closed 9 years ago

lxe commented 9 years ago

Browserified bundles double-up on react instances, even for semver-comatible things.

cc @ross-

lxe commented 9 years ago

Same as #14

lxe commented 9 years ago

Example of when things will break without peerDeps:

$ npm ls react                                                                                                                                                                 
my-project@1.0.0 /Users/aleksey/devel/my-project
├─┬ r-dom@1.0.0
│ └── react@0.12.2
└── react@0.12.1
Raynos commented 9 years ago

@lxe just use npm dedupe

lxe commented 9 years ago

@Raynos npm dedupe fails for whatever reason :(

npm WARN unavoidable conflict Not de-duplicating
npm WARN unavoidable conflict react { '/Users/aleksey/devel/.../node_modules/r-dom/node_modules/react': '0.12.2',
npm WARN unavoidable conflict   '/Users/aleksey/devel/.../node_modules/react': '0.12.1' }
Raynos commented 9 years ago

@lxe because the https://github.com/uber/r-dom/blob/master/package.json#L37 range is too aggressive.

r-dom should just downgrade the version of react it uses to ^0.12.0

lxe commented 9 years ago

@Raynos I still live in a world of tildes in npm semvers. Thank you.

rtsao commented 9 years ago

Fixed by https://github.com/uber/r-dom/pull/29