Skip to content

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Aug 29, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Dead-link checks now ignore root-relative links that point to existing files in the public folder, reducing false positives.
  • Documentation

    • Added a link to data.sql in the English docs fixture.
  • Refactor

    • Switched internal site/base sourcing and virtual module typings to use unified site data.
  • Chores

    • Bumped dev typings and several package dependencies.
    • Adjusted ESLint unresolved-import ignore list.

Copilot AI review requested due to automatic review settings August 29, 2025 08:26
@changeset-bot
Copy link

changeset-bot bot commented Aug 29, 2025

🦋 Changeset detected

Latest commit: ecb3ce1

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 Aug 29, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Caution

Review failed

The pull request is closed.

Walkthrough

Replaces usages of virtual-runtime-config with virtual-site-data (lint ignore, TypeScript shim, and VersionsNav), adds dead-link exclusion for files present in public/, bumps several dependencies and typings, and inserts a new link into fixture docs.

Changes

Cohort / File(s) Summary
Virtual site data migration
eslint.config.js, packages/doom/shim.d.ts, packages/doom/src/global/VersionsNav/index.tsx
Swaps ignored module in ESLint from virtual-runtime-configvirtual-site-data; updates shim to declare virtual-site-data exporting default SiteData; VersionsNav now imports default siteData and uses siteData.base instead of base.
Dead-link public asset exclusion
packages/doom/src/cli/load-config.ts
Adds node:fs sync import, computes publicPath, and skips dead-link checks for absolute links whose target files exist under public/; minor path literal normalization.
Dependency bumps
package.json, packages/doom/package.json, .changeset/shiny-readers-carry.md
Updates React typings (@types/react, @types/react-dom) and bumps several package versions in packages/doom and records a changeset for @alauda/doom / rspress beta bump.
Docs fixture update
fixture-docs/en/link.md
Adds a blank line and a new Markdown link [data.sql](/data.sql) after the existing Chinese link.
Type-safety / theme adjustments
packages/doom/src/theme.tsx
Removes optional chaining and non-null assertions in several sidebar/locale access expressions (assumes locales and sidebar are present).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant CLI as getCommonConfig (CLI)
  participant FS_sync as node:fs (sync)
  participant MD as Markdown Dead-Link Checker
  participant PUB as public/ Directory

  CLI->>FS_sync: resolve(root, 'public') → publicPath
  Note right of CLI: compute publicPath for asset checks

  loop For each markdown link
    CLI->>MD: Evaluate link
    alt link starts with "/"
      CLI->>PUB: existsSync(publicPath + pathname) 
      alt file exists
        MD-->>CLI: Skip dead-link report
      else file missing
        MD-->>CLI: Proceed with dead-link validation
      end
    else other links
      MD-->>CLI: Proceed with existing checks
    end
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

dependencies

Poem

A hop, a nibble, code refreshed today,
I swapped the burrow where the base would stay.
I check the public paths with careful paws,
Bumped tiny types and fixed some laws.
A link, a cheer — the rabbit hops away. 🥕


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between da95cce and ecb3ce1.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (9)
  • .changeset/shiny-readers-carry.md (1 hunks)
  • eslint.config.js (1 hunks)
  • fixture-docs/en/link.md (1 hunks)
  • package.json (1 hunks)
  • packages/doom/package.json (1 hunks)
  • packages/doom/shim.d.ts (1 hunks)
  • packages/doom/src/cli/load-config.ts (4 hunks)
  • packages/doom/src/global/VersionsNav/index.tsx (4 hunks)
  • packages/doom/src/theme.tsx (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/deps

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.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit 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:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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 updates the rspress framework from version 2.0.0-beta.28 to 2.0.0-beta.29, adapting the codebase to breaking changes in the new version. The main change involves updating import references from 'virtual-runtime-config' to 'virtual-site-data' and adding new markdown link checking functionality.

  • Updated rspress packages to v2.0.0-beta.29
  • Replaced 'virtual-runtime-config' imports with 'virtual-site-data'
  • Added dead link checking configuration for markdown files

Reviewed Changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/doom/src/global/VersionsNav/index.tsx Updated import and usage from virtual-runtime-config to virtual-site-data
packages/doom/src/cli/load-config.ts Added dead link checking configuration and minor code cleanup
packages/doom/package.json Updated rspress packages and React type dependencies to latest versions
package.json Updated React type definitions to latest versions
fixture-docs/en/link.md Added test link for dead link checking functionality
eslint.config.js Updated ESLint configuration to recognize new virtual module name

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 29, 2025

Open in StackBlitz

yarn add https://pkg.pr.new/@alauda/doom@166.tgz
yarn add https://pkg.pr.new/@alauda/doom-export@166.tgz

commit: ecb3ce1

Signed-off-by: JounQin <admin@1stg.me>
@JounQin JounQin merged commit 7c18c84 into main Aug 29, 2025
13 checks passed
@JounQin JounQin deleted the chore/deps branch August 29, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants