alexfernandez / package-quality

Measurements of quality for packages, especially for npm
MIT License
312 stars 19 forks source link

Search does not work for scoped packages #54

Closed RamonGebben closed 6 years ago

RamonGebben commented 7 years ago

When I search for any package that is scoped under an org or username I get 404's.

For instance: @storybook/react

alexfernandez commented 6 years ago

Hi, @RamonGebben! Sorry for the delay.

@DiegoTUI is looking into a few issues due to lack of updates. Maybe this is related?

DiegoTUI commented 6 years ago

Hi @RamonGebben I found the reason for this issue here, although I didn't work out a solution yet, maybe you can help. PackageQuality looks into NPM's registry for the requested package before evaluating its quality. Non-scoped packages are straightforward to get via http://registry.npmjs.org/package-name, but scoped packages seem to work a bit different. The problem is, I haven't found a way to query the npm registry for a scoped package. Do you happen to know how to this?

DiegoTUI commented 6 years ago

Hi again!!

I think I found a way!! Apparently you need to escape the / char, but not the @. Like this: https://registry.npmjs.com/@storybook%2freact/

There is an issue open in the npm registry about this: https://github.com/npm/registry/issues/34 I'll fix it ASAP!!

RamonGebben commented 6 years ago

Awesome, Hopefully this will be deployed quickly!

DiegoTUI commented 6 years ago

I think it is solved now. Please check

RamonGebben commented 6 years ago

It works! Thanks for the quick work. Although it looks like the Badges are broken now. Check for instance this copy-pasted from the app:

[![Package Quality](http://npm.packagequality.com/badge/@sensorfactdev/qr-code-scanner.png)](http://packagequality.com/#?package=@sensorfactdev/qr-code-scanner)

Package Quality