# FR: Catalog: Limit developer frustration about sorting packages

**URL:** <https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431>\
**Category:** Feature Requests\
**Created:** [5 December 2023 12:00 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431 "2023-12-05T12:00:51Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [5 December 2023 12:00 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/1 "2023-12-05T12:00:51Z")

</div>

Hi Team,

I am one of those developers who took over an existing package because the maintainer no longer cares about his package in order to update it, correct it, make improvements, etc.

My biggest frustration (and probably those of other developers) is that my package (being scoped) is not at the top of the list which limits the use of my package. This is also the case for similar names.

Below is a related discussion:

> **[Improving the Node Ecosystem · node-red/designs · Discussion #59](https://github.com/node-red/designs/discussions/59)**
>
> The node-red ecosystem is now 7 years old and in that time over 3000 node packages have been published to the catalog. Over time this has led to a certain amount of ‘cruft’ within the catalog as pa...

If I put myself in the end user's shoes, he doesn't want to go through the whole list before finding a suitable package.

Would it be possible to add a "score" so that the relevance option is more relevant?

I saw that there is an [API](https://github.com/npms-io/npms-api) allowing to retrieve this kind of information but it seems to have not been updated recently.

It is possible to take inspiration from it by creating our own algorithm based on the number of downloads, or others.

What do you think?

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [5 December 2023 12:48 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/2 "2023-12-05T12:48:16Z")

</div>

I changed the category, maybe more appropriate  
This is mainly linked to the generation of the catalog and how it's shown in the editor

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [5 December 2023 13:15 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/3 "2023-12-05T13:15:06Z")

</div>

@knolleary Is it possible to fetch the flows library score? This would avoid using NPM and simplify things 🤔

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [5 December 2023 13:34 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/4 "2023-12-05T13:34:45Z")

</div>

Node-RED can only use information provided by the catalog json - so if we can get some agreement on what sorting options make sense we can look at all the steps needed to make it work in terms of updating the catalog json.

The scorecards are a useful point-in-time measure of a node when it was published. But there are other factors that need to be taken into account - such as download count, open issue count, recent activity etc. There isn't a perfect formula for this. There is also the cost of tracking and maintaining these things - recalculating the scores over time.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [5 December 2023 13:41 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/5 "2023-12-05T13:41:04Z")

</div>

As the catalog is updated every half hour, is it possible to implement an algorithm?  
Have to implement a lot of logic, I'm aware of it but I think it's worth it. I can start working on it, if you're up for it?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [5 December 2023 13:50 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/6 "2023-12-05T13:50:55Z")

</div>

> [@GogoVega](#):
>
> As the catalog is updated every half hour,

> [@knolleary](#):
>
> such as download count, open issue count, recent activity etc

And do remember - scheduled NPM fetches have stopped (a while ago)  
so I'm not sure how affective this will all be unless you re-introduce the scheduled pull from NPM.

Personally, I think some of the original mechanisms need reviewing first?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [5 December 2023 13:55 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/7 "2023-12-05T13:55:03Z")

</div>

The catalog generation is super lightweight pulling information from the flows database. With 4750 nodes in the catalog it would not be suitable to be making n\*4750 additional requests of other services each time the catalog updates.

Before you start implementing anything I think we need to align on what information is needed in order to generate some sort of score and then how that information is gathered on a periodic basis and stored in the flow library database.

This reminds me there appears to be an issue with the existing task that refreshes the download counts - it doesn't look like nodes are getting refreshed properly...

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [5 December 2023 13:59 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/8 "2023-12-05T13:59:25Z")

</div>

No need to check all the modules each time, if the version is identical and the release is less than three months old, skip.

Yeah, we should actually agree on what information is needed

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [5 December 2023 14:20 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/9 "2023-12-05T14:20:35Z")

</div>

- Maintenance

- Quality

- Popularity

What about those in Scorecard?

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [5 December 2023 14:44 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/10 "2023-12-05T14:44:05Z")

</div>

> [@GogoVega](#):
>
> No need to check all the modules each time, if the version is identical and the release is less than three months old, skip.

Could you provide a reasoning for that proposal, please?

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [5 December 2023 14:50 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/11 "2023-12-05T14:50:46Z")

</div>

For three months? This is how [Snyk.io](http://Snyk.io) works

For the reasoning: The catalog updates every half hour, so you don't have to inspect every module every time.

A module must be inspected only if:

- it's a new one (just added to the catalog)
- update (new version of the module)
- tracking (`analysedAt` is more than three months old)

The analysis searches for all informations, adds score value and adds a `analysedAt` value so as not to analyze each element each time the script is launched.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [8 December 2023 11:55 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/12 "2023-12-08T11:55:54Z")

</div>

Hi Team,  
I took a look at the flows library repo and... there's going to be some work 😅.  
The test/exams period is approaching (yes I'm a student) so I don't have time to develop all the logic at the moment 😕.

But it would already be a big step if we can agree on the list and the weighting of each element. Do you have any suggestions/comments?

Additionally:

- Will we add `Popularity`, `Quality` and `Maintenance` to the Scorecard (as progress bar?) ?
- Does all the score parsing logic have to be in `node-red-dev` in order to leave flow library clean?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [6 February 2024 11:56 UTC](https://discourse.nodered.org/t/fr-catalog-limit-developer-frustration-about-sorting-packages/83431/13 "2024-02-06T11:56:39Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
