bcherny / json-schema-to-typescript

Compile JSON Schema to TypeScript type declarations
https://bcherny.github.io/json-schema-to-typescript-browser/
MIT License
2.91k stars 390 forks source link

Removing `glob` dependency #623

Open benmccann opened 3 weeks ago

benmccann commented 3 weeks ago

glob is responsible for 26 out of 37 dependencies for this library: https://npmgraph.js.org/?q=json-schema-to-typescript. I'd love to see if we can find a way to reduce that.

A few options I can think of:

43081j commented 3 weeks ago

it is worth noting that choosing your dependencies purely based on number of downloads isn't the best idea (re the closed PR)

fdir is much faster than existing glob libraries, even when combined with picomatch (to provide glob functionality). tinyglobby does not have as many downloads but is built on top of fdir, which is a well established library.

this repo would benefit from the performance improvement, and from reduction in install size

splitting the package seems like a larger effort that should be discussed/worked on at some other later point