pacote icon indicating copy to clipboard operation
pacote copied to clipboard

Better config system

Open zkat opened this issue 7 years ago • 1 comments

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!

zkat avatar Feb 03 '17 03:02 zkat

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?

zkat avatar Feb 09 '17 01:02 zkat