facebook / prop-types

Runtime type checking for React props and similar objects
MIT License
4.48k stars 358 forks source link

Add support for Node Corepack #397

Closed wojtekmaj closed 1 year ago

wojtekmaj commented 1 year ago

Node ships with Corepack, a "package manager manager". It works by reading packageManager entry in package.json and downloading required binaries transparently, on-the-fly. Therefore it ensures that all developers using Corepack run the same version of package manager:

This PR does not break the repository for those using Yarn Classic (v1) installed using standalone installer, while adding an easy way to contribute for those who did not install it.

ljharb commented 1 year ago

This seems like something that would only benefit maintainers of prop-types, which is basically just me at this point - and if it were up to me this repo wouldn't be using yarn, it'd be using npm, and not via corepack, so i'm not sure if this is worth adding.

wojtekmaj commented 1 year ago

Well, without this change, you're limiting the number of people that could contribute and gain nothing, but as you wish.