Feat/v1.10.0 robots meta#24
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…un/react-head-safe into feat/v1.10.0-robots-meta
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds a Changesrobots prop feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds support for managing a robots meta tag via ReactHeadSafe, extending the library’s CSR head management capabilities and documenting the important limitation that JS-injected noindex is not reliably honored by non-JS crawlers.
Changes:
- Added
robots?: stringtoReactHeadSafePropsand implemented insertion/update/removal ofmeta[name="robots"]. - Added comprehensive unit tests covering create/update/no-duplicates/removal behaviors for the robots tag.
- Updated English/Korean READMEs to document the new prop and its CSR limitations; bumped package version to
1.10.0.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Adds the robots prop to the public TypeScript interface with guidance about CSR limitations. |
| src/ReactHeadSafe.tsx | Writes meta[name="robots"] via existing meta-tag update logic and includes it in effect deps/cleanup. |
| src/test/ReactHeadSafe.test.tsx | Adds test coverage for robots tag lifecycle and deduplication. |
| README.md | Documents the new prop and warns about JS-only noindex behavior. |
| README.ko.md | Mirrors the robots prop documentation and warning in Korean. |
| package.json | Bumps version to 1.10.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by CodeRabbit
New Features
robotsmeta tag to control search engine crawler directives.Documentation
robotsprop details and guidance on reliable search engine exclusion methods, clarifying behavior differences across crawler types.