Skip to content

Commit f01cfa6

Browse files
authored
Merge branch 'NervJS:main' into next
2 parents 7052619 + 1f097d5 commit f01cfa6

File tree

843 files changed

+77062
-32896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

843 files changed

+77062
-32896
lines changed

.cargo/config.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rustflags = ["-C", "target-feature=+crt-static"]
1818

1919
[alias]
2020
# Alias to build actual SWC plugin binary for the specified target.
21-
build-wasi = "build --target wasm32-wasi"
21+
build-wasi = "build --target wasm32-wasip1"
2222
build-wasm32 = "build --target wasm32-unknown-unknown"
23-
build-swc-plugins = "build-wasi --release -p swc_plugin_compile_mode -p swc_plugin_define_config"
24-
test-swc-plugins = "test -p swc_plugin_compile_mode -p swc_plugin_define_config"
23+
build-swc-plugins = "build-wasi --release -p swc_plugin_compile_mode -p swc_plugin_define_config -p swc_plugin_compile_mode_pre_process"
24+
test-swc-plugins = "test -p swc_plugin_compile_mode -p swc_plugin_define_config -p swc_plugin_compile_mode_pre_process"

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,9 @@ packages/taro-plugin-vue-devtools/src/backend
3737

3838
packages/taro-helper/swc
3939
crates
40+
41+
tests/__tests__/bundled
42+
43+
harmony_project
44+
node_modules
45+
oh_modules

.eslintrc.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ module.exports = {
55
'import',
66
'jest',
77
'react',
8-
'simple-import-sort'
8+
'simple-import-sort',
9+
'taro',
910
],
1011
extends: [
1112
'eslint:recommended',
1213
'standard',
1314
'plugin:@typescript-eslint/recommended',
1415
'plugin:react/jsx-runtime',
15-
'plugin:react/recommended',
16+
'plugin:react/recommended'
1617
],
1718
rules: {
1819
'@typescript-eslint/ban-ts-comment': 0,
@@ -32,9 +33,11 @@ module.exports = {
3233
'@typescript-eslint/no-use-before-define': [1, { functions: false, classes: false }],
3334
'@typescript-eslint/no-var-requires': 0,
3435
camelcase: 0,
35-
'eol-last': 2,
3636
'comma-dangle': 0,
3737
'comma-spacing': 2,
38+
complexity: [2, 50],
39+
'eol-last': 2,
40+
'max-depth': [2, 10],
3841
'no-console': [2, { allow: ['warn', 'error'] }],
3942
'no-empty': 1,
4043
'no-multi-spaces': 2,
@@ -87,6 +90,7 @@ module.exports = {
8790
'simple-import-sort/exports': 2,
8891
'space-before-function-paren': 0,
8992
'standard/no-callback-literal': 0,
93+
'taro/max-ternary-depth': [2, 3],
9094
},
9195
env: {
9296
'jest/globals': true,
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: 🐞 错误报告 Bug Report
2+
description: 报告新 Bug。一般性问题请在 GitHub Discussion 中发布。
3+
title: "[Bug]: "
4+
labels:
5+
- triage
6+
- bug
7+
body:
8+
- type: checkboxes
9+
id: duplication
10+
attributes:
11+
label: 请先确认
12+
options:
13+
- label: 我已搜索并确定这个提交不是重复的
14+
required: true
15+
- type: checkboxes
16+
id: platform
17+
attributes:
18+
label: 相关平台
19+
options:
20+
- label: 所有小程序
21+
- label: 微信小程序
22+
- label: 支付宝小程序
23+
- label: 百度小程序
24+
- label: 字节跳动小程序
25+
- label: QQ 轻应用
26+
- label: 京东小程序
27+
- label: 快应用平台(QuickApp)
28+
- label: Web 平台(H5)
29+
- label: 移动端(React-Native)
30+
- label: 鸿蒙(harmony)
31+
- type: input
32+
id: library
33+
attributes:
34+
label: 小程序基础库版本
35+
description: 你可以在小程序开发者工具的「详情」中找到小程序基础库版本。
36+
validations:
37+
required: true
38+
- type: dropdown
39+
id: framework
40+
attributes:
41+
label: 使用框架
42+
options:
43+
- React
44+
- Preact
45+
- Vue 3
46+
- Vue 2
47+
validations:
48+
required: true
49+
- type: textarea
50+
id: description
51+
attributes:
52+
label: 问题描述
53+
validations:
54+
required: true
55+
- type: input
56+
id: repro-link
57+
attributes:
58+
label: 复现链接
59+
description: 请提供一个 GitHub 或其它代码托管平台仓库的链接。
60+
validations:
61+
required: true
62+
- type: textarea
63+
id: repro-steps
64+
attributes:
65+
label: 复现步骤
66+
description: 请提供复现问题的步骤。
67+
placeholder: >-
68+
1. Go to above link
69+
70+
2. Click on '....'
71+
72+
3. ...
73+
validations:
74+
required: true
75+
- type: textarea
76+
id: system
77+
attributes:
78+
label: 环境信息
79+
description: 运行 `npx taro info` 并将输出粘贴在下面。
80+
render: bash
81+
validations:
82+
required: true
83+
- type: checkboxes
84+
id: contribute
85+
attributes:
86+
label: 贡献代码
87+
options:
88+
- label: 我愿意修复这个错误

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: 新建一个新的 Issue
4-
url: https://taro-issue-pro.pf.jd.com
5-
about: 请点击 「Open」 按钮打开新链接创建 Issue
3+
- name: 📖 文档问题 Docs Issue
4+
url: https://github.com/NervJS/taro-docs/issues
5+
about: 文档相关问题请在这里提交
6+
- name: 📑 创建提案 Proposal
7+
url: https://github.com/NervJS/taro/discussions/categories/rfc
8+
about: 制定 Taro 下一步的更新计划
9+
- name: 🙋🏻‍♂️ 发起投票 Vote
10+
url: https://github.com/NervJS/taro/discussions/categories/polls
11+
about: 投票决定 Taro 的未来
12+
- name: 🙌🏼 社区支持 General Question
13+
url: https://github.com/NervJS/taro/discussions/categories/q-a
14+
about: 发布一般性问题
15+
- name: 🏗 生态建设 Ecosystem
16+
url: https://github.com/NervJS/taro/discussions/categories/%E7%94%9F%E6%80%81
17+
about: 工具库?组件库?快来丰富 Taro 生态
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 🚀 功能请求 Feature Request
2+
description: 提出新的功能特性
3+
title: "[Feat]: "
4+
labels:
5+
- triage
6+
- feat
7+
body:
8+
- type: checkboxes
9+
id: duplication
10+
attributes:
11+
label: 请先确认
12+
options:
13+
- label: 我已搜索并确定这个提交不是重复的
14+
required: true
15+
- type: textarea
16+
id: feature
17+
attributes:
18+
label: 功能描述
19+
description: 这个功能增加了什么特性?解决了什么问题?
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: design
24+
attributes:
25+
label: 功能设计
26+
description: 这个功能如何使用?(API / CLI ...)
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: details
31+
attributes:
32+
label: 实现细节
33+
description: 这个功能该如何实现?(具体的实现思路)
34+
- type: checkboxes
35+
id: contribute
36+
attributes:
37+
label: 贡献代码
38+
options:
39+
- label: 我愿意实现这个功能

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
<!--
2-
请务必阅读贡献者指南:
3-
https://github.com/NervJS/taro/blob/master/CONTRIBUTING.md
2+
请务必阅读贡献者指南:https://github.com/NervJS/taro/blob/master/CONTRIBUTING.md
3+
Update "[ ]" to "[x]" to check a box
44
-->
5+
**这个 PR 做了什么?** (简要描述所做更改)
56

6-
<!-- PULL REQUEST TEMPLATE -->
7-
<!-- (Update "[ ]" to "[x]" to check a box) -->
87

9-
**这个 PR 做了什么?** (简要描述所做更改)
8+
**这个 PR 是什么类型?** (至少选择一个)
109

10+
- [ ] 错误修复 (Bugfix) issue: fix #
11+
- [ ] 新功能 (Feature)
12+
- [ ] 代码重构 (Refactor)
13+
- [ ] TypeScript 类型定义修改 (Types)
14+
- [ ] 文档修改 (Docs)
15+
- [ ] 代码风格更新 (Code style update)
16+
- [ ] 构建优化 (Chore)
17+
- [ ] 其他,请描述 (Other, please describe):
1118

12-
13-
**这个 PR 是什么类型?** (至少选择一个)
14-
15-
- [ ] 错误修复(Bugfix) issue: fix #
16-
- [ ] 新功能(Feature)
17-
- [ ] 代码重构(Refactor)
18-
- [ ] TypeScript 类型定义修改(Typings)
19-
- [ ] 文档修改(Docs)
20-
- [ ] 代码风格更新(Code style update)
21-
- [ ] 其他,请描述(Other, please describe):
22-
23-
**这个 PR 涉及以下平台:**
19+
**这个 PR 涉及以下平台:**
2420

2521
- [ ] 所有小程序
2622
- [ ] 微信小程序

.github/workflows/auto-review.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515
- name : GITHUB CONTEXT
16-
env:
17-
GITHUB_CONTEXT: ${{ toJson(github) }}
18-
run: echo "$GITHUB_CONTEXT"
16+
env:
17+
GITHUB_CONTEXT: ${{ toJson(github) }}
18+
run: echo "$GITHUB_CONTEXT"
1919
- name: Get commit message
2020
run: |
2121
COMMIT_MESSAGE=$(git log --format=%B -n 1)

.github/workflows/build-rust-binding.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,27 @@ jobs:
1616
matrix:
1717
node-version: [18.x]
1818
settings:
19-
- host: macos-12
19+
- host: macos-13
2020
target: x86_64-apple-darwin
2121
build: |
2222
pnpm build:binding:release
2323
strip -x crates/native_binding/*.node
2424
- host: windows-latest
2525
build: pnpm build:binding:release
2626
target: x86_64-pc-windows-msvc
27-
- host: ubuntu-20.04
27+
- host: ubuntu-22.04
2828
target: x86_64-unknown-linux-gnu
2929
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
3030
build: |-
3131
set -e &&
32+
npm install -g [email protected] &&
3233
pnpm build:binding:release --target x86_64-unknown-linux-gnu &&
3334
strip crates/native_binding/*.node
34-
- host: ubuntu-20.04
35+
- host: ubuntu-22.04
3536
target: x86_64-unknown-linux-musl
3637
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
3738
build: set -e && pnpm build:binding:release && strip crates/native_binding/*.node
38-
- host: macos-12
39+
- host: macos-13
3940
target: aarch64-apple-darwin
4041
build: |
4142
pnpm build:binding:release --target aarch64-apple-darwin
@@ -48,7 +49,7 @@ jobs:
4849
- name: Setup pnpm
4950
uses: pnpm/[email protected]
5051
with:
51-
version: 8
52+
version: 10
5253
- name: Setup Node.js ${{ matrix.node-version }}
5354
uses: actions/setup-node@v4
5455
if: ${{ !matrix.settings.docker }}

.github/workflows/build-rust-wasm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: dtolnay/rust-toolchain@stable
1717
with:
1818
toolchain: stable
19-
targets: wasm32-wasi
19+
targets: wasm32-wasip1
2020
- name: Cache cargo
2121
uses: actions/cache@v3
2222
with:
@@ -33,5 +33,5 @@ jobs:
3333
uses: actions/upload-artifact@v4
3434
with:
3535
name: wasm-wasi-swc_plugins
36-
path: target/wasm32-wasi/release/*.wasm
36+
path: target/wasm32-wasip1/release/*.wasm
3737
if-no-files-found: error

0 commit comments

Comments
 (0)