Preact package should not have a hard dependency on prop-types
See original GitHub issueIn https://github.com/developit/preact/commit/069bc8f8a9ea4f514df034d77cadd8160ebb4baa#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R63 a new top-level dependency was added on prop-types@^15.6.2
. This package in turn has three dependencies, one of which has an additional dependency of its own. So as a user I end up with six Other People’s Codes on my machine (preact
, prop-types
, loose-envify
, js-tokens
, object-assign
, react-is
) even though I’m only using/needing/wanting one (preact
).
The prop-types
package itself is only needed by a “debug” sub-package hosted in this same repo, but the simple cleanup at #1460 was problematic and had to be reverted. Can a solution be found for the debug
folder’s usage that still gets us back to a place where preact
itself has no dependencies?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
That’s true in theory, but looking at their git history it seems to only receive a couple commits per year. Even the recent ones were mainly maintenance tasks. So I think it would be safe to add our own
checkPropTypes
.If anyone wants to take a go at this feel free to do so ✌️
I took a swing at a simplified
checkPropTypes
over in #1525, feedback appreciated. It’s not golfed specifically for code size, but I did leave out as much as I felt we could reasonably get away with.