-
Notifications
You must be signed in to change notification settings - Fork 2
feat: bump rspress to v2.0.0-beta.21 #123
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: 50c844f 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 |
WalkthroughThis update migrates all imports from the legacy Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI/Docs/Components
participant rspress/core
participant rspress/theme
participant rspress/runtime
participant rspress/shared
User->>CLI/Docs/Components: Import modules/components
CLI/Docs/Components->>rspress/core: Import core functionality
CLI/Docs/Components->>rspress/theme: Import theme components
CLI/Docs/Components->>rspress/runtime: Import runtime utilities
CLI/Docs/Components->>rspress/shared: Import shared utilities/types
Possibly related PRs
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/cli/export.tsOops! Something went wrong! :( ESLint: 9.31.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/lib/eslint.js' imported from /eslint.config.js src/cli/translate.tsOops! Something went wrong! :( ESLint: 9.31.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/lib/eslint.js' imported from /eslint.config.js src/cli/lint.tsOops! Something went wrong! :( ESLint: 9.31.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/lib/eslint.js' imported from /eslint.config.js
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (61)
✅ Files skipped from review due to trivial changes (25)
🚧 Files skipped from review as they are similar to previous changes (36)
⏰ 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). (9)
✨ 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 the project to use version 2.0.0-beta.21 of the Rspress packages.
Key changes:
- Updated import paths across the codebase from scoped
@rspress/...packages to unscopedrspress/...or shared packages. - Bumped a large set of dependencies in
package.jsonto their latest patch versions, including Rspress-related packages. - Adjusted MDX documentation imports and made a content tweak in one locale file.
Reviewed Changes
Copilot reviewed 58 out of 59 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/git.ts | updated logger import path to new core package |
| src/types.ts | updated serve import path to new core package |
| src/theme.tsx | updated core runtime and theme imports to new runtime and theme packages |
| src/runtime/hooks/useTranslation.ts | updated useLang import path to new runtime package |
| src/runtime/hooks/useSiteOverrides.ts | updated isProduction/withBase imports to new runtime package |
| src/runtime/components/_X.tsx | updated getCustomMDXComponent import path to new theme package |
| src/runtime/components/_ExternalSiteBase.tsx | updated useLang import path to new runtime package |
| src/runtime/components/Toc.ts | updated Toc export path to new theme package |
| src/runtime/components/Tabs.tsx | updated Tabs import path to new theme package |
| src/runtime/components/Tab.ts | updated Tab export path to new theme package |
| src/runtime/components/Steps.ts | updated Steps export path to new theme package |
| src/runtime/components/PackageManagerTabs.ts | updated PackageManagerTabs export path to new theme package |
| src/runtime/components/Overview.tsx | updated Link/renderInlineMarkdown/useSidebarData imports to theme package |
| src/runtime/components/OpenAPIRef.tsx | updated usePageData import path to new runtime package |
| src/runtime/components/OpenAPIPath.tsx | updated usePageData/Badge imports to new runtime and theme packages |
| src/runtime/components/Mermaid.tsx | updated useDark import path to new runtime package |
| src/runtime/components/LinkCard.ts | updated LinkCard export path to new theme package |
| src/runtime/components/K8sPermissionTable.tsx | updated useLang import path to new runtime package |
| src/runtime/components/K8sCrd.tsx | updated Badge/Button imports to new theme package |
| src/runtime/components/JsonViewer.tsx | updated CodeBlockRuntime/Tab/Tabs imports to new theme package |
| src/runtime/components/ExternalSiteLink.tsx | updated NoSSR/useLang/usePageData imports to new runtime package |
| src/runtime/components/Card.ts | updated Card export path to new theme package |
| src/runtime/components/Badge.ts | updated Badge export path to new theme package |
| src/plugins/sitemap/index.ts | updated logger import path to new core package |
| src/plugins/replace/utils.ts | updated logger import path to new core package |
| src/plugins/replace/resolve-release.ts | updated logger import path to new core package |
| src/plugins/replace/resolve-reference.ts | updated isProduction/logger imports to new shared and core packages |
| src/plugins/replace/remark-replace.ts | updated isProduction/logger imports to new shared and core packages |
| src/plugins/replace/rehype-normalize-link.ts | updated isExternalUrl import path to new shared package |
| src/plugins/replace/normalize-img-src.ts | updated isExternalUrl/removeLeadingSlash imports to new shared package |
| src/plugins/replace/index.ts | updated plugin typing and logger imports to new core package |
| src/plugins/permission/index.ts | updated RspressPlugin import path to new core package |
| src/plugins/mermaid/index.ts | updated plugin typing for mermaid plugin |
| src/plugins/global/index.ts | updated addTrailingSlash/RspressPlugin import paths to shared package |
| src/plugins/directives/index.ts | updated plugin typing for directives plugin |
| src/plugins/auto-toc/index.ts | updated RspressPlugin import path to new core package |
| src/plugins/auto-sidebar/walk.ts | updated logger import path to new core package |
| src/plugins/auto-sidebar/utils.ts | updated logger import path to new core package |
| src/plugins/auto-sidebar/index.ts | updated addTrailingSlash/RspressPlugin/UserConfig import paths to shared |
| src/plugins/attributes/index.ts | updated plugin typing for attributes plugin |
| src/plugins/api/index.ts | updated RspressPlugin import path to new core package |
| src/global/VersionsNav/index.tsx | consolidated runtime imports to new runtime package |
| src/global/VersionsNav/NavMenuSingleItem.tsx | updated Tag import path to new theme package |
| src/global/VersionsNav/NavMenuGroup.tsx | updated Tag import path to new theme package |
| src/global/SiteOverrides/index.tsx | updated usePageData import path to new runtime package |
| src/config.ts | updated Config import path to new shared package |
| src/cli/translate.ts | updated logger import path to new core package |
| src/cli/load-config.ts | reorganized plugin imports, updated logger import, disabled buildCache |
| src/cli/lint.ts | updated logger import path to new core package |
| src/cli/index.ts | updated serve import path to new core package |
| src/cli/export.ts | updated removeLeadingSlash, logger, serve imports to shared and core |
| package.json | bumped Rspress-related and various other dependencies |
| fixture-docs/zh/index.mdx | updated useI18n import path in fixture docs |
| fixture-docs/ru/index.mdx | updated useI18n import path in fixture docs |
| fixture-docs/en/index.mdx | updated useI18n import path and changed heading level for Term line |
| eslint.config.js | added dist and lib to ignored paths |
| docs/zh/usage/mdx.mdx | updated SourceCode import path in documentation |
| docs/en/usage/mdx.mdx | updated SourceCode import path in documentation |
Comments suppressed due to low confidence (1)
fixture-docs/en/index.mdx:5
- The heading level for the Term component line was changed to a second-level header, causing inconsistency with other locale files. It should remain a normal paragraph or match the heading structure used in zh/ru. Please remove the '## ' prefix to restore consistency.
## <Term name="company" /> <Term name="product" /> <Term name="productShort" />
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: 5
🔭 Outside diff range comments (1)
src/plugins/auto-sidebar/index.ts (1)
3-8: Missed migration: keep package group consistent (rspress/shared).Other files migrate from scoped packages to the unscoped
rspress/*family.
This import still uses the scoped name and will resolve to a different copy of the code or fail under PnP/yarn-v4.-} from '@rspress/shared' +} from 'rspress/shared'
♻️ Duplicate comments (2)
src/utils/git.ts (1)
5-5: Same concern as insrc/cli/lint.ts.Please give the new path a quick smoke-test; everything else in this file remains unaffected.
src/plugins/replace/utils.ts (1)
7-7: Import path migrated — check consistency across plugin suite.Looks good here; just ensure sibling modules (
remark-replace,resolve-*) were migrated in the same commit to avoid mixed versions.
🧹 Nitpick comments (2)
package.json (1)
117-126: Consistency: keep SWC & typescript-eslint at caret versions
@swc/coreis hard-pinned to1.12.14while the rest use carets. Lock-stepping minor patches helps with security and bug-fix uptake. Consider:- "@swc/core": "1.12.14", + "@swc/core": "^1.12.14",.changeset/perfect-rings-punch.md (1)
1-6: Changeset looks good but scope could be clearerThe message states only the
rspressbump, yet plugins (@rspress/plugin-*,@rspress/shared) were bumped too. A fuller summary aids release notes consumers.
d8c5232 to
50c844f
Compare
Summary by CodeRabbit
Chores
@rspresspackages and related libraries.rspresspackage structure.Documentation
Refactor
Style