Add search results page on PackagePhobia

This issue has been tracked since 2021-10-14.

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

If package name does not exist, PackagePhobia website does 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 /[email protected]/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.

styfle wrote this answer on 2021-10-14

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

trivikr wrote this answer on 2021-10-14

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?

styfle wrote this answer on 2021-10-14

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?

trivikr wrote this answer on 2021-10-14

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

styfle wrote this answer on 2021-10-14

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 👍

More Details About Repo
Owner Name styfle
Repo Name packagephobia
Full Name styfle/packagephobia
Language TypeScript
Created Date 2018-03-20
Updated Date 2023-03-16
Star Count 1915
Watcher Count 18
Fork Count 49
Issue Count 11

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date