Repository navigation
Fix monorepo packages not detecting root-level README and other files - #2734
Merged
Simek merged 1 commit intoAug 13, 2026
Conversation
For monorepo entries, file checks (hasReadme, hasChangelog, etc.) only looked at the package subdirectory. Fall back to rootFiles so packages whose README lives at the repo root are correctly recognized. Co-authored-by: Cursor <cursoragent@cursor.com>
Simek
approved these changes
Aug 13, 2026
Simek
left a comment
Member
There was a problem hiding this comment.
Hey @hryhoriiK97, thanks for the content on the changes and logic update! 👍
It's a fine workaround for metadata, but this still does not guarantee the presence of those files in the package (since not everyone have a bundle pipeline which puts them in the package). Ideally, in the future we should check the presence of some files like README and LICENSE in the npm package itself, and not in the repo.
Also, those flags are not only used for scoring, I would need to tests if the files correctly load in Markdown tabs, where we render files on the website.
1 task done
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.
Why & how
For monorepo entries, file checks (
hasReadme,hasChangelog, etc.) only looked at the package subdirectory files fetched via the GraphQLfilesfield. This means monorepo packages whose README (or other community files) lives at the repo root were incorrectly marked as not having one.Example:
react-native-enriched-markdownhas itsgithubUrlpointing topackages/react-native-enriched-markdown/, which contains no README. The README lives at the repo root, but the scoring criterion "Has a README file" was not matched — even though the README is clearly present both on GitHub and npm.The fix falls back to
rootFiles(the repo root listing, already fetched for monorepo entries via@include(if: $fetchRoot)) forhasReadme,hasChangelog,hasContributing,hasCC, andhasSecurity. For non-monorepo packages,rootFilesisnull, so the fallback safely returnsfalsewith no behavior change. This is consistent with howpackageManagerdetection already falls back torootFiles.✅ Checklist
react-native-libraries.jsonreact-native-libraries.json