Skip to content

Commit 2a7a8a1

Browse files
committed
Merge remote-tracking branch 'origin/main' into 4.x
2 parents fbfb50e + 02b845d commit 2a7a8a1

File tree

1,229 files changed

+115293
-53864
lines changed

Some content is hidden

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

1,229 files changed

+115293
-53864
lines changed

.eslintrc.js

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
module.exports = {
22
parser: '@typescript-eslint/parser',
3-
plugins: ['@typescript-eslint', 'import', 'jest', 'react', 'simple-import-sort', 'prettier'],
3+
plugins: [
4+
'@typescript-eslint',
5+
'import',
6+
'jest',
7+
'react',
8+
'simple-import-sort'
9+
],
410
extends: [
511
'eslint:recommended',
612
'standard',
713
'plugin:@typescript-eslint/recommended',
814
'plugin:react/jsx-runtime',
915
'plugin:react/recommended',
10-
'prettier',
1116
],
1217
rules: {
1318
'@typescript-eslint/ban-ts-comment': 0,
@@ -27,29 +32,34 @@ module.exports = {
2732
'@typescript-eslint/no-use-before-define': [1, { functions: false, classes: false }],
2833
'@typescript-eslint/no-var-requires': 0,
2934
camelcase: 0,
30-
'comma-spacing': 2,
3135
'eol-last': 2,
32-
'import/first': 2,
33-
'import/newline-after-import': 2,
34-
'import/no-duplicates': 2,
35-
indent: 0,
36-
'keyword-spacing': 2,
36+
'comma-dangle': 0,
37+
'comma-spacing': 2,
3738
'no-console': [2, { allow: ['warn', 'error'] }],
3839
'no-empty': 1,
39-
'no-multiple-empty-lines': 2,
4040
'no-multi-spaces': 2,
41+
'no-multiple-empty-lines': 0,
42+
'no-mixed-operators': 0,
4143
'no-prototype-builtins': 0,
4244
'no-unused-expressions': 0,
4345
'no-unused-vars': 'off',
4446
'no-use-before-define': 0,
47+
'import/first': 2,
48+
'import/newline-after-import': 2,
49+
'import/no-duplicates': 2,
50+
'import/no-named-default': 'off',
51+
indent: 0,
52+
'keyword-spacing': 2,
4553
'object-curly-spacing': 2,
54+
'operator-linebreak': [2, 'after', {
55+
overrides: { '?': 'before', ':': 'before' },
56+
}],
4657
'prefer-spread': 0,
4758
'prefer-rest-params': 0,
4859
'react/jsx-uses-vars': 1,
4960
'react/prop-types': 0,
5061
'react/no-find-dom-node': 0,
5162
'react/no-unknown-property': 0,
52-
'import/no-named-default': 'off',
5363
quotes: [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }],
5464
semi: [2, 'never'],
5565
'simple-import-sort/imports': [

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
set -e &&
3232
pnpm build:binding:release --target x86_64-unknown-linux-gnu &&
3333
strip crates/native_binding/*.node
34+
- host: ubuntu-20.04
35+
target: x86_64-unknown-linux-musl
36+
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
37+
build: set -e && pnpm build:binding:release && strip crates/native_binding/*.node
3438
- host: macos-11
3539
target: aarch64-apple-darwin
3640
build: |
@@ -42,7 +46,7 @@ jobs:
4246
- name: Checkout
4347
uses: actions/checkout@v4
4448
- name: Setup pnpm
45-
uses: pnpm/action-setup@v2.4.0
49+
uses: pnpm/action-setup@v3.0.0
4650
with:
4751
version: 8
4852
- name: Setup Node.js ${{ matrix.node-version }}

.github/workflows/nodejs.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
target: x86_64-pc-windows-msvc
4646
- host: ubuntu-latest
4747
target: x86_64-unknown-linux-gnu
48+
- host: ubuntu-latest
49+
target: x86_64-unknown-linux-musl
4850
exclude:
4951
- node-version: 16.x
5052
host: macos-11
@@ -60,7 +62,7 @@ jobs:
6062
- name: Checkout
6163
uses: actions/checkout@v4
6264
- name: Setup pnpm
63-
uses: pnpm/action-setup@v2.4.0
65+
uses: pnpm/action-setup@v3.0.0
6466
with:
6567
version: 8
6668
- name: Setup Node.js ${{ matrix.node-version }}
@@ -90,9 +92,9 @@ jobs:
9092
path: crates/native_binding
9193
- name: Test bindings
9294
run: pnpm test:binding
93-
if: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
95+
if: ${{ matrix.host != 'ubuntu-latest' }}
9496
- name: Test bindings with docker
95-
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
97+
if: ${{ matrix.host == 'ubuntu-latest' }}
9698
# 暂时使用了一个第三方的 docker 镜像
9799
run: docker run --rm -v $(pwd):/build -w /build chf007/pnpm pnpm test:binding
98100
# 以下的测试流程应该在所有平台都执行,但 windows 好像还有些问题,因此目前只在 ubuntu-latest 执行
@@ -118,39 +120,39 @@ jobs:
118120

119121
# 以下 coverage 流程通过 artifact 拆分文件作为单独 job 上传时间损耗过长,因此在在 node test 后直接继续执行
120122
- name: Upload [taro-cli] coverage to Codecov
121-
uses: codecov/codecov-action@v3
123+
uses: codecov/codecov-action@v4
122124
if: ${{ matrix.host == 'ubuntu-latest' }}
123125
with:
124126
move_coverage_to_trash: true
125127
flags: taro-cli
126128
files: ./packages/taro-cli/coverage/clover.xml
127129
token: ${{ secrets.CODECOV_TOKEN }}
128130
- name: Upload runner coverage to Codecov
129-
uses: codecov/codecov-action@v3
131+
uses: codecov/codecov-action@v4
130132
if: ${{ matrix.host == 'ubuntu-latest' }}
131133
with:
132134
move_coverage_to_trash: true
133135
flags: taro-runner
134136
files: ./packages/taro-webpack5-runner/coverage/clover.xml,./packages/taro-webpack-runner/coverage/clover.xml,./packages/taro-mini-runner/coverage/clover.xml
135137
token: ${{ secrets.CODECOV_TOKEN }}
136138
- name: Upload [taro-runtime] coverage to Codecov
137-
uses: codecov/codecov-action@v3
139+
uses: codecov/codecov-action@v4
138140
if: ${{ matrix.host == 'ubuntu-latest' }}
139141
with:
140142
move_coverage_to_trash: true
141143
flags: taro-runtime
142144
files: ./packages/taro-runtime/coverage/clover.xml
143145
token: ${{ secrets.CODECOV_TOKEN }}
144146
- name: Upload [taro-web] coverage to Codecov
145-
uses: codecov/codecov-action@v3
147+
uses: codecov/codecov-action@v4
146148
if: ${{ matrix.host == 'ubuntu-latest' }}
147149
with:
148150
move_coverage_to_trash: true
149151
flags: taro-web
150152
files: ./packages/taro-components/coverage/clover.xml,./packages/taro-h5/coverage/clover.xml,./packages/taro-router/coverage/clover.xml
151153
token: ${{ secrets.CODECOV_TOKEN }}
152154
- name: Upload rest coverage to Codecov
153-
uses: codecov/codecov-action@v3
155+
uses: codecov/codecov-action@v4
154156
if: ${{ matrix.host == 'ubuntu-latest' }}
155157
with:
156158
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- '2.x'
1010
- '3.x'
1111
- '4.x'
12+
# When Release Pull Request is merged
1213
pull_request:
1314
branches:
1415
- main
@@ -85,7 +86,7 @@ jobs:
8586
- name: Checkout
8687
uses: actions/checkout@v4
8788
- name: Setup pnpm
88-
uses: pnpm/action-setup@v2.4.0
89+
uses: pnpm/action-setup@v3.0.0
8990
with:
9091
version: 8
9192
- name: Setup Node 16

.github/workflows/sync-components-types.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
${{ runner.os }}-
3535
3636
- name: install
37-
uses: pnpm/action-setup@v2.4.0
37+
uses: pnpm/action-setup@v3.0.0
3838
with:
3939
version: 8
4040
run_install: |

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ common/autoinstallers/*/.npmrc
7676

7777
target/
7878
debug/
79+
!packages/taro-platform-harmony-hybrid/src/api/apis/base/debug
7980

8081
# Binding artifacts
8182
artifacts
@@ -84,4 +85,4 @@ artifacts
8485
*.node
8586

8687
# harmony-hybrid extend-h5-apis file
87-
packages/taro-platform-harmony-hybrid/src/api/apis/extend-h5-apis.ts
88+
packages/taro-platform-harmony-hybrid/src/api/apis/extend-h5-apis.ts

0 commit comments

Comments
 (0)