Repository navigation
Conversation
Diff URLs are an unbounded space (every package x version pair) and each uncached one runs libnpmdiff. robots.txt now disallows /*... and allows the latest major and minor bump of a short list of popular packages, selected with the same generateComparisons logic as the catalog page. Package (catalog) pages stay crawlable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xk9y1TZXZcrUoUrCUaLGKp
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Speculative — for discussion.
Why
Diff pages are an unbounded URL space (every package × version pair), and each uncached one runs
libnpmdiff(up to 40–70s CPU for large packages). Catalog pages link to "Suggested Diffs", so crawlers spider the whole graph.What
robots.txtdisallows/*...(every diff URL) for*, and allows a curated list.generateComparisonslogic as the catalog page) for 12 popular, small packages (CRAWLABLE_PACKAGESinsrc/lib/crawlableDiffs.ts) → 24 URLs.cacheLife("days"); build shows/robots.txtas static with 1d revalidate.Allowlines win overDisallow: /*....Generated output at build time:
Open questions
%40-encoded diff URLs still contain...so they're covered by the disallow.lint, typecheck, test-ci (315/315, incl. new
crawlableDiffs.test.ts), build pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xk9y1TZXZcrUoUrCUaLGKp