Skip to content

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Aug 25, 2025

Summary by CodeRabbit

  • New Features

    • Added built-in sitemap generation via the official plugin; sitemap.xml is produced when a site URL is configured.
  • Chores

    • Updated dependencies, including rspress to v2.0.0-beta.28 and added @rspress/plugin-sitemap.
    • Upgraded tooling (Yarn to 4.9.3) and several dev/runtime packages for improved stability.
    • Prepared a patch release for @alauda/doom.
    • No public API changes.

Copilot AI review requested due to automatic review settings August 25, 2025 10:17
@changeset-bot
Copy link

changeset-bot bot commented Aug 25, 2025

🦋 Changeset detected

Latest commit: 3848e5d

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 25, 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.

Warning

Rate limit exceeded

@JounQin has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 4 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between da17f24 and 3848e5d.

⛔ Files ignored due to path filters (2)
  • .yarn/releases/yarn-4.9.3.cjs is excluded by !**/.yarn/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (7)
  • .changeset/tasty-waves-reply.md (1 hunks)
  • .yarnrc.yml (1 hunks)
  • package.json (4 hunks)
  • src/cli/load-config.ts (2 hunks)
  • src/plugins/index.ts (0 hunks)
  • src/plugins/sitemap/index.ts (0 hunks)
  • src/runtime/components/OpenAPIPath.tsx (2 hunks)

Walkthrough

Replaces the internal sitemap plugin with @rspress/plugin-sitemap, adjusts CLI configuration to use it, removes related exports and plugin source files, and updates dependencies and tooling (including Yarn and rspress ecosystem versions). Adds a changeset for a patch release and bumps rspress to v2.0.0-beta.28.

Changes

Cohort / File(s) Summary of changes
Release Notes
`.changeset/bright-fireants-shop.md`
Added changeset: patch release for "@alauda/doom"; note to bump rspress to v2.0.0-beta.28.
Tooling & Dependencies
`.yarnrc.yml`, `package.json`
Updated Yarn path 4.9.2 → 4.9.3; version bumps across rspress ecosystem to 2.0.0-beta.28; added `@rspress/plugin-sitemap`; various dev/runtime dependencies updated.
CLI Integration
`src/cli/load-config.ts`
Switched from internal `sitemapPlugin` to `@rspress/plugin-sitemap`’s `pluginSitemap`; conditional activation when `config.siteUrl` is set.
Plugin Exports Cleanup
`src/plugins/index.ts`
Removed re-export of `./sitemap/index.js`.
Sitemap Plugin Removal
`src/plugins/sitemap/index.ts`
Deleted internal sitemap plugin and its exported types/interfaces/functions.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User
  participant CLI as CLI (load-config)
  participant Rspress as Rspress Build
  participant Plugin as @rspress/plugin-sitemap
  participant FS as File System

  User->>CLI: run build with config (siteUrl)
  CLI->>Rspress: getCommonConfig() with pluginSitemap({ siteUrl })
  Rspress->>Plugin: extendPageData (prod)
  Plugin-->>Rspress: collect sitemap entries
  Rspress->>Plugin: afterBuild (prod)
  Plugin->>FS: write sitemap.xml
  FS-->>User: sitemap.xml in output dir
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

dependencies

Poem

Hop hop hooray, a sitemap anew,
I nibbled old code, swapped in something true.
Plugins align, the versions advance,
Yarn steps up softly, a tidy little dance.
In docs’ moonlight, XML glows bright—
Carrot-shaped links mapped through the night. 🥕✨

✨ 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 @coderabbitai in a new review comment at the desired location with your query.
  • 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 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 @coderabbitai help to get the list of available commands.

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

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 upgrades rspress from version 2.0.0-beta.27 to 2.0.0-beta.28 and migrates from a custom sitemap plugin to the official @rspress/plugin-sitemap package.

  • Replaces custom sitemap plugin implementation with official @rspress/plugin-sitemap
  • Updates rspress core and related packages to beta.28
  • Updates yarn package manager version and various other dependencies

Reviewed Changes

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

Show a summary per file
File Description
src/plugins/sitemap/index.ts Removes entire custom sitemap plugin implementation
src/plugins/index.ts Removes export of custom sitemap plugin
src/cli/load-config.ts Replaces custom sitemapPlugin with official pluginSitemap and updates configuration
package.json Updates rspress packages to beta.28, adds @rspress/plugin-sitemap, and updates other dependencies
.yarnrc.yml Updates yarn version to 4.9.3

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 25, 2025

Open in StackBlitz

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

commit: da95cce

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/cli/load-config.ts (1)

291-296: Back-compat: also honor legacy config.domain to avoid silent sitemap regression.

The previous in-repo plugin consumed domain; existing doom configs may still set domain instead of siteUrl. To keep this a non-breaking change, fall back to domain when siteUrl is absent.

Apply this minimal diff:

-      siteUrl &&
-        config.siteUrl &&
-        pluginSitemap({
-          siteUrl: config.siteUrl,
-        }),
+      siteUrl &&
+        (config.siteUrl ?? (config as any).domain) &&
+        pluginSitemap({
+          siteUrl: (config.siteUrl ?? (config as any).domain)!,
+        }),

Follow-up (optional): emit a deprecation warning if domain is used, nudging users to migrate to siteUrl.

🧹 Nitpick comments (2)
.changeset/bright-fireants-shop.md (1)

1-6: Consider clarifying the changeset message to mention the sitemap plugin swap.

Optional: add a brief note like “replace internal sitemap plugin with @rspress/plugin-sitemap” so downstream consumers know why the patch matters when reading the changelog.

src/cli/load-config.ts (1)

133-152: Naming nit: siteUrl?: boolean is confusing next to config.siteUrl: string.

The boolean flag enables the sitemap plugin, while config.siteUrl supplies the value. Consider renaming the flag locally (e.g., enableSitemap) for readability. This can be done via parameter/destructuring aliasing without touching external types.

Example (outside this hunk):

  • In the loadConfig options destructuring: siteUrl: enableSitemap,
  • In getCommonConfig params: enableSitemap?: boolean
  • At usage: enableSitemap && (config.siteUrl ?? …) && pluginSitemap({ siteUrl: … })
📜 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 ef7a120 and da17f24.

⛔ Files ignored due to path filters (2)
  • .yarn/releases/yarn-4.9.3.cjs is excluded by !**/.yarn/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (6)
  • .changeset/bright-fireants-shop.md (1 hunks)
  • .yarnrc.yml (1 hunks)
  • package.json (4 hunks)
  • src/cli/load-config.ts (2 hunks)
  • src/plugins/index.ts (0 hunks)
  • src/plugins/sitemap/index.ts (0 hunks)
💤 Files with no reviewable changes (2)
  • src/plugins/index.ts
  • src/plugins/sitemap/index.ts
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-05-26T09:09:21.339Z
Learnt from: JounQin
PR: alauda/doom#30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: The alauda/doom project uses yarn v4 for dependency management, which handles package exports and module resolution correctly, so imports like `rspress/core/theme` work without any ESLint errors.

Applied to files:

  • .changeset/bright-fireants-shop.md
  • package.json
📚 Learning: 2025-06-09T03:10:41.010Z
Learnt from: JounQin
PR: alauda/doom#75
File: src/cli/load-config.ts:4-7
Timestamp: 2025-06-09T03:10:41.010Z
Learning: The alauda/doom project uses yarn v4 as the package manager, not npm. Always reference yarn commands when suggesting package management operations.

Applied to files:

  • .yarnrc.yml
  • package.json
📚 Learning: 2025-06-06T07:08:55.881Z
Learnt from: JounQin
PR: alauda/doom#69
File: package.json:101-101
Timestamp: 2025-06-06T07:08:55.881Z
Learning: When a package has peer dependencies that require TypeScript (like `eslint-react/eslint-plugin`), TypeScript should be moved from devDependencies to dependencies to satisfy the peer dependency requirement.

Applied to files:

  • package.json
📚 Learning: 2025-05-29T16:25:28.086Z
Learnt from: JounQin
PR: alauda/doom#40
File: src/plugins/sitemap/index.ts:7-7
Timestamp: 2025-05-29T16:25:28.086Z
Learning: In rspress/shared v2.0.0-beta.8, the '/logger' export is available in the package exports field, so imports like `import { logger } from 'rspress/shared/logger'` are valid even if ESLint shows resolution errors. This is used throughout the codebase in files like src/cli/translate.ts, src/cli/load-config.ts, src/utils/git.ts, and src/plugins/sitemap/index.ts.

Applied to files:

  • src/cli/load-config.ts
🔇 Additional comments (4)
.yarnrc.yml (1)

10-10: Verified: Yarn 4.9.3 release artifact is present

Both checks passed successfully, confirming the required files are committed:

  • .yarn/releases/yarn-4.9.3.cjs exists
  • .yarn/plugins/plugin-prepare-lifecycle.cjs exists

No further action needed; CI/install will not fail due to missing artifacts.

src/cli/load-config.ts (1)

12-12: Switch to the official @rspress/plugin-sitemap import — LGTM.

Import location aligns with the dependency added in package.json.

package.json (2)

9-9: Yarn updated to 4.9.3 — consistent with .yarnrc.yml.

Good alignment between packageManager and yarnPath.


70-75: Rspress ecosystem pinned uniformly to 2.0.0-beta.28 — good version lockstep.

Adding @rspress/plugin-sitemap and keeping all @rspress/* on the same beta reduces peer/version skew.

Signed-off-by: JounQin <admin@1stg.me>
@JounQin JounQin merged commit 01e8bf8 into main Aug 25, 2025
16 checks passed
@JounQin JounQin deleted the chore/deps branch August 25, 2025 10: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