packagephobia icon indicating copy to clipboard operation
packagephobia copied to clipboard

Add search results page on PackagePhobia

Open trivikr opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe.

If package name does not exist, PackagePhobia website does not respond.

  • Visit https://packagephobia.com/
  • Search for non-existent package, like @aws-sdk/
  • The website will not respond.

Describe the solution you'd like

If the package for the searched query does not exist, show search results with links to packages.

For example, imagine the query is @aws-sdk/ for package which doesn't exist. The website can route to /search?q=%40aws-sdk%2F just like npmjs.

The search results page can reference to individual packages which share the search query. For example, the page for @aws-sdk/client-s3 is /result?p=@aws-sdk/client-s3

Describe alternatives you've considered

Hosting a different search engine for packagephobia.

Additional context

This is in reference to blog post on reduction of publish size of modular AWS SDK for JavaScript (v3) announced in tweet. I wanted to provide link to list page with search query @aws-sdk/ from the blog post. But such feature doesn't exist.

trivikr avatar Oct 14 '21 14:10 trivikr

Hi @trivikr

Glad you're using Package Phobia!

You can use commas to show multiple packages like this:

https://packagephobia.com/result?p=%40aws-sdk%2Fmd5-js%2C%40aws-sdk%2Ftypes%2C%40aws-sdk%2Fcredential-provider-node

Or upload a package.json with the relevant dependencies

styfle avatar Oct 14 '21 20:10 styfle

You can use commas to show multiple packages like this:

packagephobia.com/result?p=%40aws-sdk%2Fmd5-js%2C%40aws-sdk%2Ftypes%2C%40aws-sdk%2Fcredential-provider-node

That's great!

How about creating a results page which finds package names for the given string and show values for those individual packages?

trivikr avatar Oct 14 '21 20:10 trivikr

Your use case doesn't seem so much like search though.

It sounds more like you want to list all packages in a specific scope, in this case @aws-sdk.

Or are there other use cases for search?

styfle avatar Oct 14 '21 20:10 styfle

Your use case doesn't seem so much like search though.

It sounds more like you want to list all packages in a specific scope, in this case @aws-sdk.

True. The example given in the description is for listing packages under specific scope. However, the feature request is for creating a generic search result page.

A generic search results would be similar to how it in on npmjs website. Example search results on npmjs for keyword "express" https://www.npmjs.com/search?q=express

trivikr avatar Oct 14 '21 21:10 trivikr

Sounds like an interesting feature!

I'm not planning to implement search now since Package Phobia isn't designed for discovery like https://npmjs.com or https://npms.io

But I'll leave this open so others can upvote and we can measure interest in this feature 👍

styfle avatar Oct 14 '21 21:10 styfle

Closing since there have been no upvotes

styfle avatar Jul 11 '23 14:07 styfle