It would be useful if the homepage search input became the main entry point for different lookup modes, including PURL-style package references.
Examples:
express
@iarna/toml
pkg:github/expressjs/express
pkg:github/jonschlinkert/is-number
github.com/expressjs/express
https://github.com/expressjs/express
pkg:npm/is-number
blob:3c3f7bfd0b05c602ac26b1915bf960b4aa76ff9a
Expected behavior:
-
plain package names continue to navigate to replacement pages
express → replacement page if exists, if not redirect to purl
@iarna/toml → replacement page if exists, if not redirect to purl
-
pkg:github/... inputs navigate to the GitHub package.json scan flow
-
GitHub repository URLs are normalized to pkg:github/... where possible
-
pkg:npm/... inputs navigate to the npm package scan flow, if supported
-
blob:<sha> inputs navigate to a scan result for uploaded or pasted package.json content
This would make the homepage input the canonical entry point for replacements.fyi, while still keeping lookup modes explicit through prefixes.
The routing model could roughly be:
<package-name> -> module replacement lookup, fallback to scan
pkg:github/... -> GitHub package/repository scan
pkg:npm/... -> npm package scan
blob:<sha> -> uploaded or pasted package.json
I'm open to help implementing this if this direction makes sense.
It would be useful if the homepage search input became the main entry point for different lookup modes, including PURL-style package references.
Examples:
express@iarna/tomlpkg:github/expressjs/expresspkg:github/jonschlinkert/is-numbergithub.com/expressjs/expresshttps://github.com/expressjs/expresspkg:npm/is-numberblob:3c3f7bfd0b05c602ac26b1915bf960b4aa76ff9aExpected behavior:
plain package names continue to navigate to replacement pages
express→ replacement page if exists, if not redirect to purl@iarna/toml→ replacement page if exists, if not redirect to purlpkg:github/...inputs navigate to the GitHubpackage.jsonscan flowGitHub repository URLs are normalized to
pkg:github/...where possiblepkg:npm/...inputs navigate to the npm package scan flow, if supportedblob:<sha>inputs navigate to a scan result for uploaded or pastedpackage.jsoncontentThis would make the homepage input the canonical entry point for
replacements.fyi, while still keeping lookup modes explicit through prefixes.The routing model could roughly be:
<package-name>-> module replacement lookup, fallback to scanpkg:github/...-> GitHub package/repository scanpkg:npm/...-> npm package scanblob:<sha>-> uploaded or pasted package.jsonI'm open to help implementing this if this direction makes sense.