Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 错误报告 🐞
name: 🐞 错误报告 Bug Report
description: 报告新 Bug。一般性问题请在 GitHub Discussion 中发布。
title: "[Bug]: "
labels:
Expand All @@ -8,11 +8,10 @@ body:
- type: checkboxes
id: duplication
attributes:
label: 请先搜索是否存在类似提交
label: 请先确认
options:
- label: 我确定这个提交不是重复的
validations:
required: true
- label: 我已搜索并确定这个提交不是重复的
required: true
- type: checkboxes
id: platform
attributes:
Expand Down Expand Up @@ -71,6 +70,8 @@ body:
2. Click on '....'

3. ...
validations:
required: true
- type: textarea
id: system
attributes:
Expand Down
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
blank_issues_enabled: false
contact_links:
- name: 📖文档问题 Docs issue
- name: 📖 文档问题 Docs Issue
url: https://github.com/NervJS/taro-docs/issues
about: 文档相关问题请在这里提交
- name: 📑创建提案 Proposal
- name: 📑 创建提案 Proposal
url: https://github.com/NervJS/taro/discussions/categories/rfc
about: 制定 Taro 下一步的更新计划
- name: 🙋🏻‍♂️发起投票 Vote
- name: 🙋🏻‍♂️ 发起投票 Vote
url: https://github.com/NervJS/taro/discussions/categories/polls
about: 投票决定 Taro 的未来
- name: 🙌🏼社区支持 General Question
- name: 🙌🏼 社区支持 General Question
url: https://github.com/NervJS/taro/discussions/categories/q-a
about: 发布一般性问题
- name: 🏗生态建设 Ecosystem
- name: 🏗 生态建设 Ecosystem
url: https://github.com/NervJS/taro/discussions/categories/%E7%94%9F%E6%80%81
about: 工具库?组件库?快来丰富 Taro 生态
about: 工具库?组件库?快来丰富 Taro 生态
11 changes: 5 additions & 6 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 功能请求 🚀
description: 提出新特性
name: 🚀 功能请求 Feature Request
description: 提出新的功能特性
title: "[Feat]: "
labels:
- triage
Expand All @@ -8,11 +8,10 @@ body:
- type: checkboxes
id: duplication
attributes:
label: 请先搜索是否存在类似提交
label: 请先确认
options:
- label: 我确定这个提交不是重复的
validations:
required: true
- label: 我已搜索并确定这个提交不是重复的
required: true
- type: textarea
id: feature
attributes:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ artifacts

# Node Addons
*.node
chrome
18 changes: 6 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

我们非常欢迎社区的开发者向 Taro 做出贡献。在提交贡献之前,请花一些时间阅读以下内容,保证贡献是符合规范并且能帮助到社区。

## 一、Issue 报告指南

请遵循 [`Taro Issue Template`](https://taro-issue-pro.pf.jd.com/) 的指引创建 Bug Report 或 Feature Request 类 Issues。
Comment thread
yoyo837 marked this conversation as resolved.

## 二、Pull Request 贡献指南
## Pull Request 贡献指南
Comment thread
ianzone marked this conversation as resolved.

### 1. 环境准备

> 需要安装 [Node.js 16](https://nodejs.org/en/)(建议安装 `16.20.0` 及以上版本)及 [pnpm 7](https://pnpm.io/zh/installation)
> 需要安装 [Node.js 20](https://nodejs.org/en/)(建议安装 `20.19.2` 及以上版本)及 [pnpm 10](https://pnpm.io/zh/installation)
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

校验 Node.js 版本一致性
已将 Node.js 要求提升为 20.19.2+,请确认仓库中 .nvmrcpackage.jsonengines.node 字段以及 CI workflow(.github/workflows)中的 Node 版本配置已同步更新。


🏁 Script executed:

#!/bin/bash
# 检查 .nvmrc
if [ -f .nvmrc ]; then
  echo ".nvmrc 内容: $(cat .nvmrc)"
else
  echo "未找到 .nvmrc 文件"
fi

# 检查 package.json 中 engines.node
jq '.engines.node // "未设置 engines.node"' package.json

# 检索 GitHub CI 中 node-version 配置
rg -n '"node-version"' .github/workflows || echo "CI workflow 中未找到 node-version 配置"

Length of output: 249


请同步更新 Node.js 版本配置以保持一致性

文档已将 Node.js 要求提升至 20.19.2+,但当前项目中尚未同步以下配置,请补充并确认:

  • 在项目根目录新增或更新 .nvmrc,内容写为:
    20.19.2
    
  • package.json 中添加或更新 engines.node
    "engines": {
      "node": ">=20.19.2"
    }
  • .github/workflows/ 下的 CI workflow 文件中,将 node-versionsetup-nodenode-version 参数更新为 20.19.2 及以上

完成后,请再次验证本地与 CI 均能正确使用 Node.js 20.19.2+。

🤖 Prompt for AI Agents
In CONTRIBUTING.md at line 9, the Node.js version requirement was updated to
20.19.2+, but the project configuration files are not consistent. To fix this,
create or update the .nvmrc file in the project root to contain "20.19.2", add
or update the "engines.node" field in package.json to ">=20.19.2", and update
all node-version settings in the CI workflow files under .github/workflows/ to
"20.19.2" or higher. After these changes, verify that both local and CI
environments use Node.js 20.19.2 or above correctly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ianzone 看下这条AI review

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ianzone 看下这条AI review

把这个合了就符合了 #17727


首先把 Taro 仓库 fork 一份到自己的 Github,然后从个人仓库把项目 clone 到本地,项目默认是 `main` 分支。

Expand All @@ -36,7 +32,7 @@ Taro 由一系列子 npm 包组成,整体项目组织基于 **pnpm workspace**
$ pnpm --filter [package-name] run dev
```

开发过程中,一般会使用 **link** 的方式把需要调试的包软链到一个测试项目中,然后便可进行断点调试。开发者可以根据测试项目的包管理器以及自己的喜好选择使用 [npm link](https://docs.npmjs.com/cli/v7/commands/npm-link) 或 [yarn link](https://yarnpkg.com/cli/link)(推荐)或 [pnpm link](https://pnpm.io/zh/cli/link) 。
开发过程中,一般会使用 **link** 的方式把需要调试的包软链到一个测试项目中,然后便可进行断点调试。开发者可以根据测试项目的包管理器以及自己的喜好选择使用 [npm link](https://docs.npmjs.com/cli/v11/commands/npm-link) 或 [yarn link](https://yarnpkg.com/cli/link)(推荐)或 [pnpm link](https://pnpm.io/zh/cli/link) 。

**使用 `yarn link` 的具体示例如下:**

Expand Down Expand Up @@ -114,7 +110,7 @@ $ npm run clear-all

**注意:**

`@tarojs/webpack5-runner` 使用了 `snapshot`(测试结果快照)。在修改这两个包或其它一些包时,有可能导致这些快照失效,从而通过不了测试。当你修改了这两个包、或 Github CI 提示这些包的测试用例出错时,请运行 `pnpm --filter [package-name] runupdateSnapshot` 更新 snapshot 后重新提交。
`@tarojs/webpack5-runner` 使用了 `snapshot`(测试结果快照)。在修改这两个包或其它一些包时,有可能导致这些快照失效,从而通过不了测试。当你修改了这两个包、或 Github CI 提示这些包的测试用例出错时,请运行 `pnpm --filter [package-name] run updateSnapshot` 更新 snapshot 后重新提交。

### 5. 代码风格

Expand All @@ -128,7 +124,7 @@ $ npm run clear-all

### 7. 提交 Pull Request

> 如果对 PR(Pull Request)不了解,请阅读 [《About Pull Requests》](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
> 如果对 PR(Pull Request)不了解,请阅读 [《关于拉取请求》](https://docs.github.com/zh/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)

完成开发后,推送到自己的 Taro 仓库,就可以准备提交 Pull Request 了。

Expand Down Expand Up @@ -209,12 +205,10 @@ Cargo workspace 会把编译产物输出到根目录的 `target` 文件夹中。

如对 `@taorjs/helper` 进行集成测试时,会把 `target/wasm32-wasip1/release/swc_plugin_xxx.wasm` 文件的软链到 `packages/taro-helper/swc/swc_plugin_xxx.wasm`。

####

## Credits

感谢以下所有给 Taro 贡献过代码的开发者:

[![contributors](https://opencollective.com/taro/contributors.svg?width=890&button=false)](https://github.com/NervJS/taro/graphs/contributors)

同时欢迎各位贡献者加入 [Taro 开发者社区](http://storage.jd.com/taro-jd-com/static/contact_taro_devlop_qr.png)
同时欢迎各位贡献者加入 [Taro 开发者社区](http://storage.jd.com/taro-jd-com/static/contact_taro_devlop_qr.png)
Loading