-
Notifications
You must be signed in to change notification settings - Fork 2
chore(deps): bump rspress to v2.0.0-beta.30 #172
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: a17485b 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 |
WalkthroughMoves normalizeSlash implementation into local helpers, updates imports accordingly, bumps several @RsPress packages and @cspell/eslint-plugin, and adds a Changeset entry for a patch release of @alauda/doom. No public API signature changes besides adding a local helper. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor CLI as "CLI (load-config.ts)"
participant Shared as "shared/index.js"
participant Helpers as "helpers.ts"
CLI->>Shared: previously imported normalizeSlash()
note right of Shared#lightgreen: old flow
CLI->>Helpers: now imports normalizeSlash() from ../shared/index.js
Helpers->>Helpers: normalizeSlash(url) composed of\nnormalizePosixPath → addLeadingSlash → removeTrailingSlash
CLI->>Helpers: calls normalizeSlash(url)
Helpers->>CLI: returns normalized path
note right of Helpers#lightblue: implementation moved/localized
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 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 updates RSPress-related dependencies from version 2.0.0-beta.29 to 2.0.0-beta.30 and includes a minor patch update to the @cspell/eslint-plugin.
- Updates all RSPress packages to version 2.0.0-beta.30
- Updates @cspell/eslint-plugin from ^9.2.0 to ^9.2.1
- Adds a changeset to document the RSPress version bump
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/doom/package.json | Updates RSPress dependencies to beta.30 and cspell eslint plugin to 9.2.1 |
| .changeset/busy-walls-enter.md | Documents the RSPress dependency update for changelog generation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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: 0
🧹 Nitpick comments (2)
.changeset/busy-walls-enter.md (1)
5-5: Expand the changeset note to reflect all dep bumps.Also mention the @cspell/eslint-plugin range update to keep release notes accurate.
Apply this diff:
-chore(deps): bump rspress to v2.0.0-beta.30 +chore(deps): bump rspress to v2.0.0-beta.30 and @cspell/eslint-plugin to ^9.2.1packages/doom/package.json (1)
44-44: Consider simplifying the dual-range if 8.x is no longer needed.If you no longer need to support ESLint 8 in this package, drop the 8.x branch to reduce resolver variance.
-"@cspell/eslint-plugin": "^8.19.4 || ^9.2.1", +"@cspell/eslint-plugin": "^9.2.1",
📜 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 (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (2)
.changeset/busy-walls-enter.md(1 hunks)packages/doom/package.json(2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 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:
packages/doom/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:
packages/doom/package.json
📚 Learning: 2025-05-26T08:59:41.491Z
Learnt from: JounQin
PR: alauda/doom#30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T08:59:41.491Z
Learning: In rspress/core v2.0.0-beta.7, the '/theme' export is available in the package exports field as `"./theme": { "default": "./theme.ts" }`, so imports like `import { Badge, Button } from 'rspress/core/theme'` are valid even if ESLint shows resolution errors.
Applied to files:
packages/doom/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
.changeset/busy-walls-enter.md (1)
2-2: Patch bump scope is appropriate.Changes are dependency-only; patch release on @alauda/doom makes sense.
packages/doom/package.json (1)
53-57: All @RsPress dependencies updated to 2.0.0-beta.30; no stragglers detected.
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
📜 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 selected for processing (2)
packages/doom/src/cli/load-config.ts(1 hunks)packages/doom/src/shared/helpers.ts(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 18 on ubuntu-latest
- 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 20 on ubuntu-latest
🔇 Additional comments (2)
packages/doom/src/cli/load-config.ts (1)
47-51: normalizeSlash re-export and import cleanup verified
packages/doom/src/shared/index.tsusesexport * from './helpers.js', which includesnormalizeSlash, and there are no remaining imports ofnormalizeSlashfrom@rspress/shared.packages/doom/src/shared/helpers.ts (1)
2-6: Import split looks right.Importing the primitives locally to compose
normalizeSlashis clean and keeps deps minimal.
| export const normalizeSlash = (url: string) => | ||
| removeTrailingSlash(addLeadingSlash(normalizePosixPath(url))) | ||
|
|
||
| export const withoutBase = (path: string, base: string) => | ||
| addLeadingSlash(path).replace(normalizeSlash(base), '') | ||
|
|
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.
🛠️ Refactor suggestion
Harden normalizeSlash and anchor withoutBase to avoid false matches.
- Root path edge case: current impl can turn "/" into "", depending on
removeTrailingSlashsemantics. - withoutBase may strip matches in the middle of the path (e.g., "/docs" removed from "/foo/docs") instead of only from the start.
Apply:
-export const normalizeSlash = (url: string) =>
- removeTrailingSlash(addLeadingSlash(normalizePosixPath(url)))
+export const normalizeSlash = (url: string) => {
+ const p = addLeadingSlash(normalizePosixPath(url))
+ // Keep "/" intact; only trim trailing slash when length > 1
+ return p.length > 1 ? removeTrailingSlash(p) : p
+}
-export const withoutBase = (path: string, base: string) =>
- addLeadingSlash(path).replace(normalizeSlash(base), '')
+export const withoutBase = (path: string, base: string) => {
+ const p = addLeadingSlash(path)
+ const b = normalizeSlash(base)
+ return p.startsWith(b) ? p.slice(b.length) : p
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export const normalizeSlash = (url: string) => | |
| removeTrailingSlash(addLeadingSlash(normalizePosixPath(url))) | |
| export const withoutBase = (path: string, base: string) => | |
| addLeadingSlash(path).replace(normalizeSlash(base), '') | |
| export const normalizeSlash = (url: string) => { | |
| const p = addLeadingSlash(normalizePosixPath(url)) | |
| // Keep "/" intact; only trim trailing slash when length > 1 | |
| return p.length > 1 ? removeTrailingSlash(p) : p | |
| } | |
| export const withoutBase = (path: string, base: string) => { | |
| const p = addLeadingSlash(path) | |
| const b = normalizeSlash(base) | |
| return p.startsWith(b) ? p.slice(b.length) : p | |
| } |
🤖 Prompt for AI Agents
In packages/doom/src/shared/helpers.ts around lines 49 to 54, normalizeSlash can
collapse the root "/" to an empty string and withoutBase can remove the base
anywhere in the path; update normalizeSlash to always return "/" for the root
path after normalization (i.e., treat empty result as "/") and ensure
withoutBase only strips the normalized base when it appears at the start of the
path (anchor the match) by normalizing both inputs, ensuring leading slashes,
and using a startsWith check or a anchored replacement (not a global replace) so
occurrences in the middle of the path are not removed.
Summary by CodeRabbit