Skip to content

Commit 1789b48

Browse files
authored
Merge branch 'main' into fix/harmonyDTsReg
2 parents b0ffb82 + 1ab7de8 commit 1789b48

File tree

101 files changed

+296
-347
lines changed

Some content is hidden

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

101 files changed

+296
-347
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
3030
build: |-
3131
set -e &&
32+
npm install -g corepack@0.31.0 &&
3233
pnpm build:binding:release --target x86_64-unknown-linux-gnu &&
3334
strip crates/native_binding/*.node
3435
- host: ubuntu-20.04

crates/native_binding/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/binding",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Node binding for taro",
55
"main": "binding.js",
66
"typings": "binding.d.ts",

npm/darwin-arm64/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tarojs/binding-darwin-arm64",
33
"description": "Native binding for taro",
4-
"version": "4.0.9",
4+
"version": "4.0.10-beta.1",
55
"os": [
66
"darwin"
77
],

npm/darwin-x64/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tarojs/binding-darwin-x64",
33
"description": "Native binding for taro",
4-
"version": "4.0.9",
4+
"version": "4.0.10-beta.1",
55
"os": [
66
"darwin"
77
],

npm/linux-x64-gnu/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tarojs/binding-linux-x64-gnu",
33
"description": "Native binding for taro",
4-
"version": "4.0.9",
4+
"version": "4.0.10-beta.1",
55
"os": [
66
"linux"
77
],

npm/linux-x64-musl/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/binding-linux-x64-musl",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"os": [
55
"linux"
66
],

npm/win32-x64-msvc/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tarojs/binding-win32-x64-msvc",
33
"description": "Native binding for taro",
4-
"version": "4.0.9",
4+
"version": "4.0.10-beta.1",
55
"os": [
66
"win32"
77
],

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "taro",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "开放式跨端跨框架开发解决方案",
55
"homepage": "https://github.com/NervJS/taro#readme",
66
"author": "O2Team",

packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-plugin-transform-react-jsx-to-rn-stylesheet",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Transform stylesheet selector to style in JSX Elements.",
55
"author": "O2Team",
66
"license": "MIT",

packages/babel-plugin-transform-solid-jsx/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "babel-plugin-transform-solid-jsx",
33
"description": "A JSX to DOM plugin that wraps expressions for fine grained change detection",
4-
"version": "4.0.9",
4+
"version": "4.0.10-beta.1",
55
"license": "MIT",
66
"repository": {
77
"type": "git",

packages/babel-plugin-transform-taroapi/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-plugin-transform-taroapi",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"author": "O2Team",
55
"license": "MIT",
66
"main": "dist/index.js",

packages/babel-preset-taro/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-preset-taro",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Taro babel preset",
55
"author": "O2Team",
66
"license": "MIT",

packages/create-app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/create-app",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "create taro app with one command",
55
"author": "O2Team",
66
"license": "MIT",

packages/css-to-react-native/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "taro-css-to-react-native",
33
"description": "Convert CSS text to a React Native stylesheet object",
4-
"version": "4.0.9",
4+
"version": "4.0.10-beta.1",
55
"author": "O2Team",
66
"license": "MIT",
77
"main": "dist/index.js",

packages/eslint-config-taro/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-taro",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Taro specific linting rules for ESLint",
55
"author": "O2Team",
66
"license": "MIT",

packages/jest-helper/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jest-taro-helper",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "jest helper for taro",
55
"private": true,
66
"author": "O2Team",

packages/postcss-html-transform/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-html-transform",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "transform html tag name selector",
55
"author": "O2Team",
66
"license": "MIT",

packages/postcss-plugin-constparse/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-plugin-constparse",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "parse constants defined in config",
55
"author": "O2Team",
66
"license": "MIT",

packages/postcss-pxtransform/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-pxtransform",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "PostCSS plugin px 转小程序 rpx及h5 rem 单位",
55
"author": "O2Team",
66
"license": "MIT",

packages/postcss-unit-transform/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-taro-unit-transform",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "小程序单位转换",
55
"author": "O2Team",
66
"license": "MIT",

packages/rollup-plugin-copy/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rollup-plugin-copy",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "rollup-plugin-copy for taro",
55
"private": true,
66
"author": "O2Team",

packages/shared/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/shared",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Taro utils internal use.",
55
"author": "O2Team",
66
"license": "MIT",

packages/stylelint-config-taro-rn/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stylelint-config-taro-rn",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Shareable stylelint config for React Native CSS modules",
55
"author": "O2Team",
66
"license": "MIT",

packages/stylelint-taro-rn/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stylelint-taro-rn",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "A collection of React Native specific rules for stylelint",
55
"author": "O2Team",
66
"license": "MIT",

packages/stylelint-taro/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stylelint-taro",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Taro stylelint 规则集合",
55
"author": "O2Team",
66
"license": "MIT",

packages/taro-api/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/api",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Taro common API",
55
"author": "O2Team",
66
"license": "MIT",

packages/taro-cli-convertor/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/cli-convertor",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "cli tool for taro-convert",
55
"author": "O2Team",
66
"license": "MIT",

packages/taro-cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/cli",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "cli tool for taro",
55
"author": "O2Team",
66
"license": "MIT",

packages/taro-components-advanced/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/components-advanced",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "",
55
"author": "O2Team",
66
"license": "MIT",

packages/taro-components-library-react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/components-library-react",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Taro 组件库 React 版本库",
55
"private": true,
66
"author": "O2Team",

packages/taro-components-library-solid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/components-library-solid",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Taro 组件库 Solid 版本库",
55
"private": true,
66
"main": "index.js",

packages/taro-components-library-vue3/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/components-library-vue3",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Taro 组件库 Vue3 版本库",
55
"private": true,
66
"author": "O2Team",

packages/taro-components-react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/components-react",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "",
55
"main:h5": "dist/index.js",
66
"main": "dist/index.js",

packages/taro-components-rn/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/components-rn",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "React Native 基础组件",
55
"author": "O2Team",
66
"license": "MIT",

packages/taro-components/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/components",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Taro 组件库",
55
"browser": "dist/index.js",
66
"main:h5": "dist/index.js",

packages/taro-extend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/extend",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Taro extend functionality",
55
"author": "O2Team",
66
"license": "MIT",

packages/taro-framework-react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/plugin-framework-react",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "React/Preact 框架插件",
55
"author": "O2Team",
66
"homepage": "https://github.com/nervjs/taro",

packages/taro-framework-solid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tarojs/plugin-framework-solid",
3-
"version": "4.0.9",
3+
"version": "4.0.10-beta.1",
44
"description": "Solid 框架插件",
55
"author": "drchan",
66
"homepage": "https://github.com/nervjs/taro",

packages/taro-framework-solid/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default (ctx: IPluginContext) => {
5353
const { compiler } = opts
5454
if (compiler.type === 'webpack5') {
5555
// 提供给 webpack5 依赖预编译收集器的第三方依赖
56-
const deps = ['@tarojs/plugin-framework-solid/dist/runtime']
56+
const deps = ['solid-js', 'solid-js/web', 'solid-js/store', 'solid-js/universal', '@tarojs/plugin-framework-solid/dist/runtime']
5757
compiler.prebundle ||= {}
5858
const prebundleOptions = compiler.prebundle
5959
prebundleOptions.include ||= []

packages/taro-framework-solid/src/reconciler/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
ValidComponent
1414
} from 'solid-js'
1515

16-
import { createElement, insert, spread } from './render'
16+
import { createElement, createTextNode, insert, spread } from './render'
1717

1818
export * from './render'
1919

@@ -26,7 +26,7 @@ export function Portal<T extends boolean = false, S extends boolean = false> (pr
2626
) => void)
2727
children: JSX.Element
2828
}) {
29-
const marker = document.createTextNode('')
29+
const marker = createTextNode('')
3030
const mount = () => props.mount || document.body
3131
const owner = getOwner()
3232
let content: undefined | (() => JSX.Element)

packages/taro-framework-solid/src/webpack.h5.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ function setLoader (chain) {
5555
}
5656

5757
function setPlugin (chain) {
58-
const mainFields = ['unpkg', ...defaultMainFields]
58+
const alias = chain.resolve.alias
5959
const resolveOptions = {
6060
basedir: process.cwd(),
61-
mainFields,
61+
mainFields: ['unpkg', ...defaultMainFields],
6262
}
63-
const alias = chain.resolve.alias
64-
// Note: 本地 link 调试时,避免 solid 重复打包
63+
// 第三方库使用了RECONCILER_NAME的包,需要指定到业务测的reconciler包 统一依赖版本
64+
6565
alias.set('solid-js$', resolveSync('solid-js', resolveOptions))
66+
alias.set('solid-js/store$', resolveSync('solid-js/store', resolveOptions))
67+
alias.set('solid-js/universal$', resolveSync('solid-js/universal', resolveOptions))
68+
alias.set('solid-js/html$', resolveSync('solid-js/html', resolveOptions))
69+
alias.set('solid-js/h$', resolveSync('solid-js/h', resolveOptions))
6670
}

packages/taro-framework-solid/src/webpack.harmony.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { defaultMainFields, resolveSync } from '@tarojs/helper'
2+
13
import { RECONCILER_NAME } from './constant'
24
import { getLoaderMeta } from './loader-meta'
35

@@ -8,8 +10,19 @@ export function modifyHarmonyWebpackChain (chain) {
810

911
function setAlias (chain) {
1012
const alias = chain.resolve.alias
13+
const resolveOptions = {
14+
basedir: process.cwd(),
15+
mainFields: ['unpkg', ...defaultMainFields],
16+
}
1117

12-
alias.set('solid-js/web$', RECONCILER_NAME)
18+
// 第三方库使用了RECONCILER_NAME的包,需要指定到业务测的reconciler包 统一依赖版本
19+
alias.set(RECONCILER_NAME, resolveSync(RECONCILER_NAME, resolveOptions))
20+
alias.set('solid-js/web$', resolveSync(RECONCILER_NAME, resolveOptions))
21+
alias.set('solid-js$', resolveSync('solid-js', resolveOptions))
22+
alias.set('solid-js/store$', resolveSync('solid-js/store', resolveOptions))
23+
alias.set('solid-js/universal$', resolveSync('solid-js/universal', resolveOptions))
24+
alias.set('solid-js/html$', resolveSync('solid-js/html', resolveOptions))
25+
alias.set('solid-js/h$', resolveSync('solid-js/h', resolveOptions))
1326
}
1427

1528
function setLoader (chain) {

0 commit comments

Comments
 (0)