Open larsgw opened 5 years ago
yeesss that would be even more awesome 🤗 🎈 🍰
This would be incredible for our usecase
Friendly bump 🤗 Any indication if or when this will be implemented?
Hello! Sorry for the late answer, I’ve been out of the country.
So, both features are easy to implement:
Now, I have concerns about the space of the dependants index field, specially for packages such as lodash.
Could you please give more insight why you need this feature and why it’s useful for (use-cases)?
Moreover, I don’t have the time to implement it myself but I can provide guidance and review.
No worries, just checking in :)
For our use case:
We're making a catalog for web components. What we would like to do is provide a search based on a dependency of a web components.
How we currently achieve this is: We search for a query, e.g.: 'button'
, and keywords: ['webcomponent', 'webcomponents', 'customelement']
. But sometimes people will specifically only want results for a web component that is made with: Polymer, or LitElement, or Stencil, or Gluon, etc. The way we can achieve that is by filtering on the dependencies, so the query would be:
'button'
['webcomponent', 'webcomponents', 'customelement']
'LitElement'
@thepassle if I specify depends on: polymer, are you expecting for it to work only for direct dependencies or deep as well?
I would say they should be direct dependencies, but maybe @daKmoR can back me on that?
Also, if you could give us some pointers/where to get started, I think we can take a stab at implementing this :)
If it’s direct it’s much easier, otherwise we would have to use some kind of graph which is way more complicated.
yes direct is all we need :)
so any guidance for it would be awesome 🤗
oh almost forgot what would probably be really nice to have would be
Depends on: 'LitElement 2.x'
so be able to specify a major version of the dependency would make this feature even more powerful...
Now, I have concerns about the space of the dependants index field, specially for packages such as lodash.
Would that still be a problem with direct dependents?
Moreover, I don’t have the time to implement it myself but I can provide guidance and review.
I have a somewhat ready setup (without RabbitMQ, not sure if I'll need that). However, I'm not sure how the _view
options work in this case.
@larsgw Any way we can help? Do you have a PR?
No PR yet, I'm looking to change this request first (still sad GitHub doesn't do previews for code in other repositories).
Edit: apparently it's as simple as reduce: false
, not just omitting reduce
. If only I was paying attention to the docs...
I don't know if this is something that can be implemented in npms directly, but since you can't search within the dependent tab, maybe we could add
dependents:<pkg>
anddependencies:<pkg>
filters. Would that be viable?Edit: we as in, "I'm not part of the team but I'll help if I can"