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

Removing glob dependency #623

Open
benmccann opened this issue Aug 21, 2024 · 1 comment
Open

Removing glob dependency #623

benmccann opened this issue Aug 21, 2024 · 1 comment

Comments

@benmccann
Copy link
Contributor

benmccann commented Aug 21, 2024

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:

  • Replace it with fdir (1M downloads / wk) and picomatch (50m downloads / wk)
  • I originally proposed replacing it with tinyglobby in Use tinyglobby for globbing #622. See that PR for the full background and additional details regarding this issue
  • Split this package into CLI and core. The CLI could retain the name json-schema-to-typescript and re-export the stuff contained in core, so that users could continue to install just the one package they need and the change could be made in a backwards-compatible fashion. This would also remove other packages like minimist and is-glob from the core dependencies as well
@43081j
Copy link

43081j commented Aug 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants