-
Notifications
You must be signed in to change notification settings - Fork 2
chore(deps): bump rspress to v2.0.0-beta.28 #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 3848e5d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Note Other AI code review bot(s) detectedCodeRabbit 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 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. ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (7)
WalkthroughReplaces 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
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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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.
commit: |
There was a problem hiding this 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 legacyconfig.domainto avoid silent sitemap regression.The previous in-repo plugin consumed
domain; existing doom configs may still setdomaininstead ofsiteUrl. To keep this a non-breaking change, fall back todomainwhensiteUrlis 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
domainis used, nudging users to migrate tositeUrl.
🧹 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?: booleanis confusing next toconfig.siteUrl: string.The boolean flag enables the sitemap plugin, while
config.siteUrlsupplies 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
getCommonConfigparams: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.
⛔ Files ignored due to path filters (2)
.yarn/releases/yarn-4.9.3.cjsis excluded by!**/.yarn/**yarn.lockis 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.mdpackage.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.ymlpackage.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 presentBoth 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
packageManagerandyarnPath.
70-75: Rspress ecosystem pinned uniformly to 2.0.0-beta.28 — good version lockstep.Adding
@rspress/plugin-sitemapand keeping all@rspress/*on the same beta reduces peer/version skew.
Signed-off-by: JounQin <admin@1stg.me>
Summary by CodeRabbit
New Features
Chores