Skip to content

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Sep 2, 2025

Summary by CodeRabbit

  • Chores
    • Prepared a patch release for the package.
    • Updated dependencies: rspress suite to v2.0.0-beta.30 and @cspell/eslint-plugin to ^9.2.1.
    • Internal maintenance only; no user-facing behavior or public API changes.
    • Ensures compatibility with the latest rspress beta and general dependency stability.

Copilot AI review requested due to automatic review settings September 2, 2025 09:41
@changeset-bot
Copy link

changeset-bot bot commented Sep 2, 2025

🦋 Changeset detected

Latest commit: a17485b

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 Sep 2, 2025

Walkthrough

Moves 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

Cohort / File(s) Summary
Release metadata
\.changeset/busy-walls-enter.md
Adds a Changeset indicating a patch release for @alauda/doom and documents the @rspress dependency upgrade.
Dependency bumps
packages/doom/package.json
Updates @rspress/* packages from 2.0.0-beta.29 to 2.0.0-beta.30 and adjusts @cspell/eslint-plugin range to `^8.19.4
Helper implementation change
packages/doom/src/shared/helpers.ts
Removes external normalizeSlash import and adds a local normalizeSlash(url: string): string composed from normalizePosixPath, addLeadingSlash, and removeTrailingSlash; withoutBase now uses the local function.
Import adjustment
packages/doom/src/cli/load-config.ts
Changes import source: normalizeSlash is no longer imported from @rspress/shared and is instead imported from local ../shared/index.js.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

dependencies

Poem

I nibble imports, smooth and quick,
Tuck normalize into my trick.
Bumped some deps, a tiny hop—
The build stays steady, never stops.
Carrots, changes, small and slick 🥕

✨ 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 or @coderabbit 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 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.

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: 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.1
packages/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.

📥 Commits

Reviewing files that changed from the base of the PR and between cce9a6a and a9f296a.

⛔ Files ignored due to path filters (1)
  • yarn.lock is 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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 2, 2025

Open in StackBlitz

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

commit: a17485b

@JounQin JounQin merged commit d23382f into main Sep 2, 2025
15 of 16 checks passed
@JounQin JounQin deleted the chore/deps branch September 2, 2025 09:56
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

📜 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 a9f296a and a17485b.

📒 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.ts uses export * from './helpers.js', which includes normalizeSlash, and there are no remaining imports of normalizeSlash from @rspress/shared.

packages/doom/src/shared/helpers.ts (1)

2-6: Import split looks right.

Importing the primitives locally to compose normalizeSlash is clean and keeps deps minimal.

Comment on lines +49 to 54
export const normalizeSlash = (url: string) =>
removeTrailingSlash(addLeadingSlash(normalizePosixPath(url)))

export const withoutBase = (path: string, base: string) =>
addLeadingSlash(path).replace(normalizeSlash(base), '')

Copy link

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 removeTrailingSlash semantics.
  • 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.

Suggested change
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.

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