Skip to content

Commit 318a6e5

Browse files
authored
Merge pull request #1611 from NervJS/v3.4
V3.4
2 parents 7ec03ee + 43bc4a1 commit 318a6e5

Some content is hidden

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

68 files changed

+25970
-15032
lines changed

.eslintrc.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
{
1010
"files": [
1111
"packages/**/*.ts",
12-
"packages/**/*.tsx"
12+
"packages/**/*.tsx",
13+
"packages/**/*.d.ts"
1314
],
1415
"parser": "@typescript-eslint/parser",
1516
"parserOptions": {
@@ -53,12 +54,14 @@
5354
]
5455
}
5556
],
56-
"no-unused-vars": [
57+
"no-unused-vars": "off",
58+
"@typescript-eslint/no-unused-vars": [
5759
"error",
5860
{
5961
"varsIgnorePattern": "React"
6062
}
6163
],
64+
"@typescript-eslint/no-empty-interface": "off",
6265
"no-console": [
6366
"error",
6467
{
@@ -78,9 +81,22 @@
7881
]
7982
},
8083
"settings": {
81-
"import/ignore": ["react-native"],
84+
"import/ignore": [
85+
"react-native"
86+
],
8287
"react": {
8388
"version": "detect"
89+
},
90+
"import/resolver": {
91+
"node": {
92+
"extensions": [
93+
".js",
94+
".jsx",
95+
".ts",
96+
".tsx",
97+
".d.ts"
98+
]
99+
}
84100
}
85101
}
86102
},

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@ stats.html
2929
# Test files
3030
coverage
3131

32+
# miniapp private files
33+
*.private.*
34+
3235
# taro rn release
3336
!packages/taro-ui-demo-rn/release/**

lerna.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"packages": [
3-
"packages/taro-ui",
4-
"packages/taro-ui-demo",
5-
"packages/taro-ui-demo-rn"
3+
"packages/taro-ui"
64
],
75
"command": {
86
"publish": {
@@ -14,5 +12,6 @@
1412
}
1513
},
1614
"version": "3.1.0-beta.4",
17-
"npmClient": "yarn"
15+
"npmClient": "yarn",
16+
"useWorkspaces": true
1817
}

package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
"url": "[email protected]:nervjs/taro-ui.git"
1010
},
1111
"license": "MIT",
12+
"workspaces": {
13+
"packages": [
14+
"packages/taro-ui",
15+
"packages/taro-ui-demo",
16+
"packages/taro-ui-docs"
17+
]
18+
},
1219
"scripts": {
1320
"bootstrap": "lerna bootstrap",
1421
"build": "lerna run build",
@@ -21,11 +28,11 @@
2128
"@commitlint/cli": "^8.3.5",
2229
"@commitlint/config-conventional": "^8.3.4",
2330
"eslint-config-taro": "~3.0.2",
24-
"@typescript-eslint/eslint-plugin": "^2.26.0",
25-
"@typescript-eslint/parser": "^2.26.0",
31+
"@typescript-eslint/eslint-plugin": "^5.20.0",
32+
"@typescript-eslint/parser": "^5.20.0",
2633
"conventional-changelog-cli": "^2.0.31",
2734
"cross-env": "^7.0.2",
28-
"eslint": "^6.8.0",
35+
"eslint": "^8.12.0",
2936
"eslint-config-o2team": "^0.1.7",
3037
"eslint-config-prettier": "^6.10.1",
3138
"eslint-import-resolver-custom-alias": "^1.2.0",
@@ -41,7 +48,10 @@
4148
"stylelint": "^15.10.1",
4249
"stylelint-config-standard": "^20.0.0",
4350
"stylelint-scss": "^3.16.0",
44-
"typescript": "~3.7.2"
51+
"typescript": "~4.1.0"
52+
},
53+
"resolutions": {
54+
"sharp": "^0.28.3"
4555
},
4656
"husky": {
4757
"hooks": {

packages/taro-ui-demo-rn/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import '@tarojs/rn-supporter/entry-file.js'
Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const { mergeConfig } = require('metro-config')
2+
const { getMetroConfig } = require('@tarojs/rn-supporter')
13
const fs = require('fs')
24
const path = require('path')
35
const exclusionList = require('metro-config/src/defaults/exclusionList')
@@ -13,6 +15,7 @@ const modules = [
1315
'react-native',
1416
'@tarojs/components-rn',
1517
'@tarojs/taro-rn',
18+
'@tarojs/runtime-rn',
1619
'react-native-svg',
1720
'react-native-root-siblings',
1821
...Object.keys({
@@ -21,17 +24,20 @@ const modules = [
2124
})
2225
]
2326

24-
module.exports = {
25-
// maxWorkers: 1,
26-
// resetCache: true,
27-
watchFolders: [taroUI, __dirname],
28-
resolver: {
29-
extraNodeModules: modules.reduce((acc, name) => {
30-
acc[name] = path.join(__dirname, 'node_modules', name)
31-
return acc
32-
}, {}),
33-
blockList: exclusionList([
34-
new RegExp(`^${escape(path.join(taroUI, 'node_modules'))}\\/.*$`)
35-
])
36-
}
37-
}
27+
module.exports = mergeConfig(
28+
{
29+
// maxWorkers: 1,
30+
// resetCache: true,
31+
watchFolders: [taroUI, __dirname],
32+
resolver: {
33+
extraNodeModules: modules.reduce((acc, name) => {
34+
acc[name] = path.join(__dirname, 'node_modules', name)
35+
return acc
36+
}, {}),
37+
blockList: exclusionList([
38+
new RegExp(`^${escape(path.join(taroUI, 'node_modules'))}\\/.*$`)
39+
])
40+
}
41+
},
42+
getMetroConfig()
43+
)

packages/taro-ui-demo-rn/package.json

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,47 +42,37 @@
4242
],
4343
"dependencies": {
4444
"@babel/runtime": "^7.7.7",
45-
"@tarojs/components": "3.4.13",
46-
"@tarojs/plugin-framework-react": "3.4.13",
47-
"@tarojs/react": "3.4.13",
48-
"@tarojs/rn-runner": "3.4.13",
49-
"@tarojs/runtime": "3.4.13",
50-
"@tarojs/taro": "3.4.13",
51-
"@tarojs/taro-rn": "3.4.13",
52-
"react": "^17.0.2",
53-
"react-dom": "^16.13.0",
54-
"react-native": "~0.68.1",
45+
"@tarojs/components": "3.6.5-canary.1",
46+
"@tarojs/plugin-framework-react": "3.6.5-canary.1",
47+
"@tarojs/react": "3.6.5-canary.1",
48+
"@tarojs/rn-runner": "3.6.5-canary.1",
49+
"@tarojs/runtime": "3.6.5-canary.1",
50+
"@tarojs/taro": "3.6.5-canary.1",
51+
"@tarojs/taro-rn": "3.6.5-canary.1",
52+
"react": "^18.2.0",
53+
"react-dom": "^18.2.0",
54+
"react-native": "^0.71.6",
5555
"react-native-modal": "^13.0.0",
5656
"taro-ui": "3.1.0-beta.4"
5757
},
5858
"devDependencies": {
5959
"@babel/core": "^7.8.0",
6060
"@react-native-picker/picker": "^1.15.0",
61-
"@tarojs/cli": "3.4.13",
62-
"@tarojs/mini-runner": "3.4.13",
63-
"@tarojs/webpack-runner": "3.4.13",
64-
"@types/react": "^16.0.0",
61+
"@tarojs/cli": "3.6.5-canary.1",
62+
"@tarojs/mini-runner": "3.6.5-canary.1",
63+
"@tarojs/webpack-runner": "3.6.5-canary.1",
64+
"@types/react": "^18.2.0",
6565
"@types/webpack-env": "^1.13.6",
6666
"babel-plugin-transform-imports": "^2.0.0",
67-
"babel-preset-taro": "3.4.13",
67+
"babel-preset-taro": "3.6.5-canary.1",
6868
"escape-string-regexp": "^4.0.0",
69-
"eslint-config-taro": "3.4.13",
70-
"expo-constants": "13.1.1",
71-
"expo-modules-core": "0.9.2",
69+
"eslint-config-taro": "3.6.5-canary.1",
70+
"expo": "~48.0.0",
7271
"patch-package": "^6.4.7",
72+
"react-native-svg": "13.8.0",
7373
"typescript": "^3.8.3"
7474
},
7575
"resolutions": {
76-
"sass": "1.37.5",
77-
"expo-camera": "12.3.0",
78-
"expo-barcode-scanner": "11.3.0",
79-
"expo-image-picker": "13.1.1",
80-
"expo-brightness": "10.2.0",
81-
"expo-file-system": "14.0.0",
82-
"expo-keep-awake": "10.1.1",
83-
"expo-permissions": "13.2.0",
84-
"expo-sensors": "11.3.0",
85-
"expo-asset": "8.5.0",
86-
"expo-av": "11.2.3"
76+
"sass": "1.37.5"
8777
}
8878
}

packages/taro-ui-demo-rn/src/pages/index/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react'
22
import { Image, Text, View } from '@tarojs/components'
33
import Taro, { ShareAppMessageReturn } from '@tarojs/taro'
4+
import { AtIcon } from 'taro-ui'
45
import iconAction from '../../assets/images/icon-list-action.png'
56
import iconBasic from '../../assets/images/icon-list-basic.png'
67
import iconForm from '../../assets/images/icon-list-form.png'
@@ -130,7 +131,7 @@ export default class Index extends React.Component<{}, IndexState> {
130131
</View>
131132
</View>
132133
<View className='module-list__arrow'>
133-
<Text className='at-icon at-icon-chevron-right' />
134+
<AtIcon value='chevron-right' color='#fff' size='20' />
134135
</View>
135136
</View>
136137
))}

0 commit comments

Comments
 (0)