Skip to content

fix: corepack manager use pnpm failed #2962

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

Closed
wants to merge 15 commits into from

Conversation

Miles-hxy
Copy link
Collaborator

@Miles-hxy Miles-hxy commented Feb 5, 2025

pnpm/pnpm#9029 (comment)
近期corepack使用pnpm类似报错,参考社区的解决方案

Summary by CodeRabbit

  • 新功能

    • 集成文档搜索功能,并优化了页头与导航,提升文档浏览体验。
  • 文档

    • 扩充并更新了贡献、国际化、主题定制、快速上手及升级迁移等指南,使开发文档更加全面易懂。
  • 样式

    • 调整了页面布局、配色和版式风格,提升文档界面的视觉一致性和可读性。
  • 其他

    • 优化了构建与部署流程,增强了网站的性能与稳定性。

Copy link

coderabbitai bot commented Feb 5, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

此 PR 对 CI 工作流、项目构建脚本、样式配置及文档进行了大规模更新。主要修改包括:在各个 CI 工作流中将 pnpm 的安装命令从单条命令调整为多行命令,明确指定版本;调整 package.json 中的脚本命令;更新部分文档内容、格式以及组件属性;重构站点配置和路由;并新增多个 React 版文档组件及 Vite 配置文件,从而优化构建流程和项目结构。

Changes

文件路径 变更摘要
.github/workflows/ci.yml, cypress.yml, realease-tag.yml,
sync-h5.yml, sync-migrate.yml, sync-taro.yml
更新各 CI 工作流中 pnpm 的安装命令:将原来的 corepack enable pnpm 替换为多行命令,分别在 lint/test 作业中激活指定版本([email protected]),build 作业中禁用 corepack 并全局安装最新版本。
.gitignore 新增忽略项 /dist-site,防止该目录被 Git 追踪。
index.html 修改 script 引入路径,由 /src/sites/doc/main.tsx 更新为 /src/sites/sites-react/doc/main.tsx,确保加载新位置的模块。
package.json 新增和更新多条脚本命令(如 "dev:site:taro", "build:demo", "build:taro:demo" 等),调整构建、演示和站点构建流程,优化命名及执行顺序。
src/packages/popup/doc.taro.md
src/packages/uploader/doc.en-US.md
删除 Popup 组件文档中“指定节点挂载”部分,并更新 portal 属性类型;调整 Uploader 组件文档中各属性的描述与代码块格式以增强可读性。
src/sites/assets/styles/highlight.scss
md-style.scss
reset.scss
variables.scss
修改 CSS 规则:highlight.scss 中更新嵌套结构;md-style.scss 新增 .handle-part.contributor 相关类;reset.scss 新增隐藏滚动条规则及调整背景;variables.scss 更新颜色变量、背景图片 URL 及新增变量定义。
src/sites/assets/util/index.ts
src/sites/config/*
修改 getComponentName 函数的逻辑(移除 -taro 字符串),新增完整的站点配置文件(baseConfig.ts、config/index.ts)及调整 EnvConfig 类型,删除无用属性。
src/sites/doc/* 删除旧版文档组件及路由相关文件(如 App.scss、App.tsx、header、nav、router.ts 等),移除旧组件的默认导出,清理冗余代码入口。
src/sites/sites-react/doc/* 新增 React 版文档应用组件(如全新 App.tsx、Header、Nav、Search 等)、新建相应的组件入口和样式文件,并调整路由配置和文档文件,整合文档数据管理(docs.taro.ts、docs.ts)以支持多语言、多平台展示。
vite.config.demo.ts
vite.config.site.ts
新增 Vite 配置文件用于演示项目与站点构建:集成 React 插件、MDX 解析、Remark 插件;更新构建输出路径、文件命名规则,并通过动态引用实现环境特定的 SCSS 导入与路径别名配置。

Sequence Diagram(s)

sequenceDiagram
    participant Job as CI 作业
    participant Corepack as Corepack 工具
    participant NPM as npm
    Job->>Corepack: 启动并启用 Corepack
    alt lint/test 作业
        Corepack->>Job: 执行 "corepack enable" 后准备 [email protected] 激活
    else build 作业
        Corepack->>Job: 禁用 Corepack
        Job->>NPM: 执行 npm install -g pnpm@latest
    end
Loading

Possibly related PRs

Suggested reviewers

  • oasis-cloud

Poem

我是小兔子,跳跃在代码间,🐰
CI 中的命令焕然一新,不再平凡。
脚本更新,文档也齐全,
样式跃动,构建如诗篇。
让项目飞速前行,好运连连!
(⌒‿⌒)❤

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai 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

Documentation and Community

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

@github-actions github-actions bot added the 3.x Target branch 3.x label Feb 5, 2025
@Miles-hxy Miles-hxy closed this Feb 5, 2025
@Miles-hxy Miles-hxy deleted the fix_ci_0205 branch February 5, 2025 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Target branch 3.x size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant