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

prop-types package does not declare react as a dep or peer dep. #9371

Closed
ljharb opened this issue Apr 8, 2017 · 5 comments
Closed

prop-types package does not declare react as a dep or peer dep. #9371

ljharb opened this issue Apr 8, 2017 · 5 comments
Assignees

Comments

@ljharb
Copy link
Contributor

ljharb commented Apr 8, 2017

Per https://unpkg.com/[email protected]/index.js, react is a dependency of prop-types.

However, http://npmcdn.com/prop-types/package.json does not list it as either a dependency or a peerDependency. That makes it both an implicit dependency, and one whose version compatibility is unchecked.

Could you add react as a peer dependency, ideally over the entire range of React versions that prop-types works with? I'm particularly interested in if it works on 0.13 and 0.14, I'd want the React peer dep to be ^0.13 || ^0.14 || ^15, for example.

(@acdlite @kentcdodds)

@sebmarkbage
Copy link
Collaborator

We should just inline isValidElement so we don't have to.

@ljharb
Copy link
Contributor Author

ljharb commented Apr 8, 2017

That would be SO much better,

The only remaining reason airbnb-prop-types depends on React is isValidElement :-)

@acdlite
Copy link
Collaborator

acdlite commented Apr 8, 2017

Done!

@acdlite
Copy link
Collaborator

acdlite commented Apr 8, 2017

Btw prop-types lives here now: https://github.com/reactjs/prop-types

@acdlite acdlite closed this as completed Apr 8, 2017
@ljharb
Copy link
Contributor Author

ljharb commented Apr 8, 2017

omg separate repo, yay‼ you may want to update the repo field on https://www.npmjs.com/package/prop-types; it still points to this one.

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

3 participants