Skip to content
Discussion options

You must be logged in to vote

Hi there! 👋 Great question—I've wondered this myself! You're absolutely right: yarn.lock files don’t show up in GitHub code search (even with path:yarn.lock), while package-lock.json does. Here’s why it happens and what you can do instead:

Why yarn.lock gets hidden (but package-lock.json doesn’t)
GitHub automatically classifies files to keep search results clean and fast. Since yarn.lock has a custom format (not standard JSON/YAML), GitHub recognizes it as a lock file and excludes it from search—alongside other auto-generated files like dist/ or node_modules/.

Meanwhile, package-lock.json flies under the radar because it has a .json extension, so GitHub treats it like regular code (not a …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tomhoad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Search and Navigation Search, navigate, and understand code on GitHub Question Ask and answer questions about GitHub features and usage
2 participants