pkgxdev / libpkgx

`import`… but with pkging powers
https://npmjs.com/libpkgx
Apache License 2.0
62 stars 11 forks source link

add usePantry().find() #37

Closed mxcl closed 1 year ago

mxcl commented 1 year ago

Refs #33

mxcl commented 1 year ago

@jhheider does this accomplish what you wanted?

jhheider commented 1 year ago

That's pretty good, except it requires a yaml read, even if the project name is found. A better solution probably checks the names on a pass, then does a pass reading yamls to check for provides/display-names. So you don't have to open up to over 600 files unless necessary.

mxcl commented 1 year ago

The method returns an array, because it should—there might be conflicts.

I could add one that returns the first and then parallelizes a bit, need a use case where it's ok to do that tho.

Even tea/cli now errors if there are multiple results for a provides search