pacote
pacote copied to clipboard
Better config system
opt-check
was a pretty basic option handling mechanism but I'm not feeling great about it: it silently fails if it gets unexpected options (and those options are later requested), it doesn't support types or any sort of verification for options, and it just assumes that everything is gonna want all the options.
But, as it turns out, as we call individual things, they expect other subsets of options. It might be nice to have an opts mechanism where every layer can specify what exactly it wants and needs, so it's easy to see what's using what, and at what level -- specially stuff we're passing to dependencies like cacache
, which have a bunch of their own opts!
Woo! So there's https://npm.im/figgy-pudding now, intended to be an initial spike at fixing this issue. Perhaps convert pacote to use that, and see how it feels?