Skip to content

fix: remove invalid frontmatter.title#73

Merged
JounQin merged 2 commits intomainfrom
fix/invalid_title
Jun 6, 2025
Merged

fix: remove invalid frontmatter.title#73
JounQin merged 2 commits intomainfrom
fix/invalid_title

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Jun 6, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation to ensure only valid string titles are included in translated content.
  • Chores
    • Updated several dependencies to their latest versions for improved stability and compatibility.
    • Removed invalid metadata from documentation files.
  • Style
    • Updated CSS class names with consistent prefixes for improved styling consistency.
  • New Features
    • Added inline markdown rendering support for enhanced content display.

@JounQin JounQin self-assigned this Jun 6, 2025
Copilot AI review requested due to automatic review settings June 6, 2025 13:05
@JounQin JounQin added the bug Something isn't working label Jun 6, 2025
@changeset-bot
Copy link

changeset-bot bot commented Jun 6, 2025

🦋 Changeset detected

Latest commit: d0f2d29

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@alauda/doom Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Jun 6, 2025

Walkthrough

This update introduces a changeset for a patch release, upgrades several dependencies in package.json, and enhances type safety in the translation CLI by ensuring only string titles are retained in frontmatter. It also adds a new function declaration to a TypeScript definition, adjusts CSS class names to a prefixed naming convention, and modifies JSX structure for rendering. No changes were made to public APIs or exported entities beyond the added declaration.

Changes

File(s) Change Summary
.changeset/silly-owls-whisper.md Added a changeset for a patch release, noting removal of invalid frontmatter and rspress upgrade.
package.json Updated versions for multiple dependencies to newer releases.
src/cli/translate.ts Added type check to ensure frontmatter.title is a string before including it in output.
patches/@RsPress+theme-default+2.0.0-beta.11.patch Added renderInlineMarkdown function declaration to TypeScript definitions, removed empty export.
src/runtime/components/ExternalSiteLink.tsx Replaced CSS class cursor-pointer with prefixed rp-cursor-pointer.
src/runtime/components/K8sCrd.tsx Updated CSS classes to prefixed versions; changed Button text prop usage to children with onClick.
src/runtime/components/Overview.tsx Prefixed CSS classes; changed JSX to use self-closing tags and spread renderInlineMarkdown props.

Possibly related PRs

Suggested labels

dependencies

Poem

In the warren, code hops anew,
With titles checked and strings in view.
Dependencies leap, a version parade,
While changeset whispers the patch we made.
A rabbit’s nod to tidy lore—
Onward, upgrades, forevermore! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33eb3c0 and d0f2d29.

📒 Files selected for processing (5)
  • .changeset/silly-owls-whisper.md (1 hunks)
  • patches/@rspress+theme-default+2.0.0-beta.11.patch (1 hunks)
  • src/runtime/components/ExternalSiteLink.tsx (1 hunks)
  • src/runtime/components/K8sCrd.tsx (1 hunks)
  • src/runtime/components/Overview.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (5)
  • src/runtime/components/ExternalSiteLink.tsx
  • .changeset/silly-owls-whisper.md
  • src/runtime/components/Overview.tsx
  • src/runtime/components/K8sCrd.tsx
  • patches/@RsPress+theme-default+2.0.0-beta.11.patch
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 18 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 18 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
  • GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures that the frontmatter.title field is only kept if it’s a string and bumps several dependencies to their latest patch or minor versions.

  • Remove any non-string newFrontmatter.title to prevent invalid YAML output
  • Upgrade various dependencies in package.json to patch/minor releases

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/cli/translate.ts Added a runtime check to delete newFrontmatter.title when it’s not a string
package.json Bumped versions for multiple dependencies to patch/minor releases
Comments suppressed due to low confidence (2)

src/cli/translate.ts:414

  • No unit tests currently cover the branch where newFrontmatter.title is removed. Add tests to verify behavior when sourceFrontmatter.i18n.title[target] is undefined or not a string.
if (typeof newFrontmatter.title !== 'string') {

src/cli/translate.ts:414

  • [nitpick] Consider adding a brief comment explaining why non-string titles are removed to improve maintainability and clarity for future contributors.
if (typeof newFrontmatter.title !== 'string') {

@JounQin JounQin force-pushed the fix/invalid_title branch from 33eb3c0 to d0f2d29 Compare June 6, 2025 13:42
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jun 6, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@alauda/doom@73

commit: d0f2d29

@JounQin JounQin merged commit d6202b7 into main Jun 6, 2025
19 of 20 checks passed
@JounQin JounQin deleted the fix/invalid_title branch June 6, 2025 14:07
github-actions bot pushed a commit that referenced this pull request Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants