-
Notifications
You must be signed in to change notification settings - Fork 2
chore: bump rspress to v2.0.0-beta.12 #84
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: e82b65d 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 |
WalkthroughThe changes update several dependencies in Changes
Poem
✨ Finishing Touches
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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
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 project dependencies to their latest patch/minor versions and removes an outdated theme-default patch.
- Remove the v2.0.0-beta.11 patch for
@rspress/theme-default - Bump
@rspress/*packages to v2.0.0-beta.12 and other dependencies (e.g.,openai,typescript-eslint,@types/node,@types/react)
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| patches/@RsPress+theme-default+2.0.0-beta.11.patch | Delete outdated patch for @rspress/theme-default v2.0.0-beta.11 |
| package.json | Bump multiple dependencies to newer versions |
Comments suppressed due to low confidence (1)
patches/@RsPress+theme-default+2.0.0-beta.11.patch:1
- The patch file name still references v2.0.0-beta.11 even though dependencies were bumped to v2.0.0-beta.12. If theme-default still needs adjustment, please add a new patch file named
@rspress+theme-default+2.0.0-beta.12.patch; otherwise, confirm that removing the old patch is sufficient.
-diff --git a/node_modules/@rspress/theme-default/dist/index.d.ts b/node_modules/@rspress/theme-default/dist/index.d.ts
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
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (2)
package.json(4 hunks)patches/@rspress+theme-default+2.0.0-beta.11.patch(0 hunks)
💤 Files with no reviewable changes (1)
- patches/@RsPress+theme-default+2.0.0-beta.11.patch
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: autofix
- GitHub Check: Build and Lint with Node.js 18 on ubuntu-latest
- 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 20 on ubuntu-latest
- GitHub Check: publish
- GitHub Check: Analyze (javascript-typescript)
- 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 22 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
🔇 Additional comments (5)
package.json (5)
61-61: Confirm ESLint React plugin bump compatibility
The@eslint-react/eslint-pluginversion has been updated to^1.51.3. Please verify there are no breaking changes or new rules that require adjustments to your ESLint configuration.
69-71: Validate Rspress beta dependency versioning
@rspress/core,@rspress/plugin-algolia, and@rspress/plugin-llmsare now pinned to2.0.0-beta.12(exact versions). Ensure this aligns with your versioning policy for beta releases and verify any necessary migrations after the removal ofindex.d.tsin@rspress/theme-default.
86-86: Verify OpenAI SDK upgrade
Upgradingopenaifrom^5.1.1to^5.2.0could introduce API changes. Run your integration tests against the OpenAI endpoints and review the changelog for potential breaking changes.
105-105: Upgrade TypeScript-ESLint plugin
Bumpingtypescript-eslintto^8.34.0likely adds lint support for newer TS syntax. Re-runyarn lintand confirm that no rules have been deprecated or require new configurations.
118-118: Align Node.js type definitions with engine constraints
The update to@types/nodeat^22.15.31may expose Node 22 typings. Confirm compatibility with your declared engine range (>=18.17.0 <20 || >=20.1.0) and ensure no unintended Node 22–specific APIs are used.
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
📒 Files selected for processing (3)
src/global/VersionsNav/Down.tsx(1 hunks)src/global/VersionsNav/NavMenuGroup.tsx(6 hunks)src/global/VersionsNav/NavMenuSingleItem.tsx(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- src/global/VersionsNav/Down.tsx
- src/global/VersionsNav/NavMenuSingleItem.tsx
🧰 Additional context used
🪛 ESLint
src/global/VersionsNav/NavMenuGroup.tsx
[error] 9-9: Unable to resolve path to module '@rspress/shared'.
(import-x/no-unresolved)
[error] 10-10: Unable to resolve path to module 'react'.
(import-x/no-unresolved)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: Build and Lint with Node.js 18 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 22 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 24 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 18 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
🔇 Additional comments (2)
src/global/VersionsNav/NavMenuGroup.tsx (2)
91-106: Well-implemented dropdown interaction pattern!The 150ms delay on mouse leave and the mouse enter handler on the dropdown content effectively prevent accidental closure when moving diagonally between the trigger and content. This is a good UX improvement.
Also applies to: 169-169
108-108: Good refactor to use the dedicatedmatchNavbarutility.Using a centralized utility function for navbar matching is more maintainable than inline regex logic.
Signed-off-by: JounQin <admin@1stg.me>
Signed-off-by: JounQin <admin@1stg.me>
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
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
♻️ Duplicate comments (2)
package.json (1)
115-120: Minor type-lib bumps look safe
@swc/core,@types/node, and@types/reactare all patch bumps; no API churn expected. Given the earlier discussion, the React-types mismatch is no longer an issue if you are indeed on React 19.src/global/VersionsNav/NavMenuGroup.tsx (1)
82-101:⚠️ Potential issueAdd cleanup for the timer to prevent memory leaks.
The timer reference should be cleaned up when the component unmounts to prevent potential memory leaks.
Apply this diff to add proper cleanup:
-import { useRef, useState, type ReactNode } from 'react' +import { useEffect, useRef, useState, type ReactNode } from 'react'Then add this cleanup effect after the state declarations:
const [isOpen, setIsOpen] = useState(false) const closeTimerRef = useRef<number>(null) + +useEffect(() => { + return () => { + clearCloseTimer() + } +}, [])
🧹 Nitpick comments (3)
package.json (1)
69-71: Tar-ball URLs may break repeatable installsLocking the three
@rspress/*deps to a commit tar-ball will work, but:
- Those URLs are not cached by the public npm registry – any rebased/force-pushed commit will invalidate them.
- Yarn’s offline-mirror / npm’s
--prefer-offlinecan’t cache them reliably.- Renovate / Dependabot will no longer detect new releases.
Consider switching back to the beta tag (
2.0.0-beta.12) once the fixes you need are published, or use a git+ssh URL that pins the SHA.src/global/VersionsNav/Down.tsx (1)
1-5: Nit: mark asmemoto prevent needless re-rendersThe icon is static – wrapping the export with
memoavoids re-rendering when parents update.-import React, { memo } from 'react' - -export const Down = () => ( +import React, { memo } from 'react' + +export const Down = memo(() => ( <svg width="1em" height="1em" viewBox="0 0 32 32"> <path fill="currentColor" d="M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z" /> </svg> -) +))src/global/VersionsNav/NavMenuSingleItem.tsx (1)
48-50: String-concatenated classNames are getting hard to readManually interpolating long utility strings is error-prone and hurts diff-reviewability. Consider
clsx/classnames:-import clsx from 'clsx' - -<div - className={`rspress-nav-menu-item ${styles.singleItem} ${ - isActive ? `${styles.activeItem} rspress-nav-menu-item-active` : '' - } rp-text-sm rp-font-medium ${compact ? 'rp-mx-0.5' : 'rp-mx-1.5'} rp-px-3 rp-py-2 rp-flex rp-items-center`} -> +import clsx from 'clsx' + +<div + className={clsx( + 'rspress-nav-menu-item', + styles.singleItem, + 'rp-text-sm rp-font-medium rp-px-3 rp-py-2 rp-flex rp-items-center', + compact ? 'rp-mx-0.5' : 'rp-mx-1.5', + isActive && [styles.activeItem, 'rspress-nav-menu-item-active'], + )} +>The intent stays the same while remaining maintainable.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (7)
.changeset/sour-wombats-hunt.md(1 hunks).changeset/tiny-ghosts-sell.md(1 hunks)package.json(4 hunks)patches/@rspress+theme-default+2.0.0-beta.11.patch(0 hunks)src/global/VersionsNav/Down.tsx(1 hunks)src/global/VersionsNav/NavMenuGroup.tsx(6 hunks)src/global/VersionsNav/NavMenuSingleItem.tsx(1 hunks)
💤 Files with no reviewable changes (1)
- patches/@RsPress+theme-default+2.0.0-beta.11.patch
🧰 Additional context used
🪛 ESLint
src/global/VersionsNav/NavMenuGroup.tsx
[error] 9-9: Unable to resolve path to module '@rspress/shared'.
(import-x/no-unresolved)
[error] 10-10: Unable to resolve path to module 'react'.
(import-x/no-unresolved)
🔇 Additional comments (9)
package.json (3)
61-61: Check the minor-version bump for@eslint-react/eslint-pluginThe update is a patch bump only, so it is low-risk. Just make sure the new rules (if any) don’t suddenly surface additional lint errors in CI.
86-86: Verify breaking-change surface foropenai@5.3.x
5.2.0 → 5.3.0introduced stricter TypeScript signatures around streaming payloads. If you referenceStream-specific generics, compilation may fail. Make sure the CI type-check still passes.
105-105:typescript-eslint@8.34.0drops support for TS ≤ 5.4Your
typescriptruntime is^5.8.3, so that’s fine, but double-check that theparserOptions.tsconfigRootDiris still correctly resolved – this version tightened path checks..changeset/tiny-ghosts-sell.md (1)
1-6: LGTM – clear, concise changeset note.changeset/sour-wombats-hunt.md (1)
1-6: LGTM – good to see the regression called out explicitlysrc/global/VersionsNav/NavMenuGroup.tsx (4)
91-106: Well-implemented dropdown interaction with smooth UX!The 150ms delay pattern with mouse enter/leave handlers provides excellent user experience by allowing diagonal mouse movement to the dropdown content. The clear documentation is also appreciated.
Also applies to: 169-169
108-108: Good refactoring to use the centralizedmatchNavbarutility!This improves consistency across the codebase and ensures uniform active link detection logic.
38-39: Excellent CSS class naming standardization!The consistent use of the
rp-prefix throughout the component improves maintainability and prevents potential naming conflicts.Also applies to: 44-44, 51-51, 58-58, 63-63, 123-123, 134-134, 139-139, 149-149, 162-162, 172-172
132-191: Clean refactoring of the component structure!The unified approach with a single container element and consistent event handling greatly improves code maintainability and readability. The separation between the trigger button and dropdown content is well-organized.
Summary by CodeRabbit