Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【WIP】4.0.9 #17011

Merged
merged 22 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
53880bf
fix(swiper): 修复初始1个元素且动态新增元素并切换current时动画失效问题(coding:C2024121206762)
Dec 13, 2024
716e723
Merge branch 'main' into fix/swiper-h5
Dec 16, 2024
4dd7835
Merge branch 'main' into fix/swiper-h5
Dec 17, 2024
5f037c8
fix(mix): 修复taro引用原生页面时误处理image等组件的src属性问题 (coding:C2024090427890)
Dec 17, 2024
0227596
chore(release): publish 4.0.9-beta.3 --tag=beta
Dec 17, 2024
47722ef
feat(cli): 增加按需编译pages或components能力
Dec 25, 2024
c1ccf60
chore(release): publish 4.0.9-beta.4 --tag=beta
Dec 25, 2024
04f652e
fix(cli): buildes5参数支持命令行和插件调用时传递
Dec 26, 2024
f4918ff
chore(release): publish 4.0.9-beta.5 --tag=beta
Dec 26, 2024
48597d2
feat(dataset): 修复clickview无法注入dataset问题
Dec 27, 2024
9795177
fix(swiper): 升级swiperjs,解决cube轮播闪烁问题
Dec 30, 2024
e7c1a42
chore(release): publish 4.0.9-beta.6 --tag=beta
Dec 30, 2024
1eacec7
fix(h5nativecomp): 支持h5预览调试组件&收敛产物chunk
Jan 3, 2025
7d1e69b
chore(release): publish 4.0.9-beta.7 --tag=beta
Jan 3, 2025
2ba5c7c
test(components): update snapshot
Jan 3, 2025
ee36849
Merge branch 'main' into fix/swiper-h5
Jan 3, 2025
e6cce42
fix(jd-components): 京东小程序下PickerView组件新增属性
Jan 7, 2025
de8ad63
Merge branch 'main' into fix/swiper-h5
Jan 7, 2025
c7b5ef3
test: update snapshot
Jan 7, 2025
2ec47d9
fix(scrolview): 解决scrollview在ios下滚动不流畅问题
Jan 13, 2025
3de9c2a
chore(rust): 使用wasm32-wasip1代替wasm32-wasi,解决编译出错问题
Jan 13, 2025
8ed7311
chore(release): publish 4.0.9-beta.8 --tag=beta
Jan 13, 2025
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
2 changes: 1 addition & 1 deletion crates/native_binding/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/binding",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Node binding for taro",
"main": "binding.js",
"typings": "binding.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-darwin-arm64",
"description": "Native binding for taro",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-darwin-x64",
"description": "Native binding for taro",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-linux-x64-gnu",
"description": "Native binding for taro",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/binding-linux-x64-musl",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-win32-x64-msvc",
"description": "Native binding for taro",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taro",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "开放式跨端跨框架开发解决方案",
"homepage": "https://github.com/NervJS/taro#readme",
"author": "O2Team",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-transform-react-jsx-to-rn-stylesheet",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Transform stylesheet selector to style in JSX Elements.",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-solid-jsx/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "babel-plugin-transform-solid-jsx",
"description": "A JSX to DOM plugin that wraps expressions for fine grained change detection",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-taroapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-transform-taroapi",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"author": "O2Team",
"license": "MIT",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-taro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-taro",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Taro babel preset",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/create-app",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "create taro app with one command",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/css-to-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "taro-css-to-react-native",
"description": "Convert CSS text to a React Native stylesheet object",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"author": "O2Team",
"license": "MIT",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-taro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-taro",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Taro specific linting rules for ESLint",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-helper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-taro-helper",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "jest helper for taro",
"private": true,
"author": "O2Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-html-transform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-html-transform",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "transform html tag name selector",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-plugin-constparse/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-plugin-constparse",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "parse constants defined in config",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-pxtransform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-pxtransform",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "PostCSS plugin px 转小程序 rpx及h5 rem 单位",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-unit-transform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-taro-unit-transform",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "小程序单位转换",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/rollup-plugin-copy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rollup-plugin-copy",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "rollup-plugin-copy for taro",
"private": true,
"author": "O2Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/shared",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Taro utils internal use.",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-config-taro-rn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stylelint-config-taro-rn",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Shareable stylelint config for React Native CSS modules",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-taro-rn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stylelint-taro-rn",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "A collection of React Native specific rules for stylelint",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-taro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stylelint-taro",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Taro stylelint 规则集合",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/api",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Taro common API",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-cli-convertor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/cli-convertor",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "cli tool for taro-convert",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/cli",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "cli tool for taro",
"author": "O2Team",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions packages/taro-cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export default class CLI {
projectName: _[1] || args.name,
description: args.description,
typescript: args.typescript,
buildEs5: args['build-es5'],
framework: args.framework,
compiler: args.compiler,
npm: args.npm,
Expand Down
7 changes: 7 additions & 0 deletions packages/taro-cli/src/presets/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
validateConfig
} from '@tarojs/plugin-doctor'

import { extractCompileEntry } from '../../util/appConfig'
import * as hooks from '../constant'

import type { IPluginContext } from '@tarojs/service'
Expand All @@ -14,6 +15,8 @@ export default (ctx: IPluginContext) => {
'--type [typeName]': 'Build type, weapp/swan/alipay/tt/qq/jd/h5/rn',
'--watch': 'Watch mode',
'--env [env]': 'Value for process.env.NODE_ENV',
'--pages': 'Specify the pages to be compiled, separate multiple by comma',
'--components': 'Specify the components to be compiled, separate multiple by comma',
'--mode [mode]': 'Value of dotenv extname',
'-p, --port [port]': 'Specified port',
'--no-build': 'Do not build project',
Expand All @@ -36,6 +39,7 @@ export default (ctx: IPluginContext) => {
synopsisList: [
'taro build --type weapp',
'taro build --type weapp --watch',
'taro build --type weapp --watch --pages pages/index/index',
'taro build --type weapp --env production',
'taro build --type weapp --blended',
'taro build --type weapp --no-build',
Expand All @@ -50,6 +54,7 @@ export default (ctx: IPluginContext) => {
const { platform, isWatch, blended, newBlended, withoutBuild, noInjectGlobalStyle, noCheck } = options
const { fs, chalk, PROJECT_CONFIG } = ctx.helper
const { outputPath, configPath } = ctx.paths
const { args } = options

if (!configPath || !fs.existsSync(configPath)) {
console.log(chalk.red(`找不到项目配置文件${PROJECT_CONFIG},请确定当前目录是 Taro 项目根目录!`))
Expand Down Expand Up @@ -120,6 +125,8 @@ export default (ctx: IPluginContext) => {
newBlended,
noInjectGlobalStyle,
async modifyAppConfig (appConfig) {
extractCompileEntry(appConfig, args, ctx)

await ctx.applyPlugins({
name: hooks.MODIFY_APP_CONFIG,
opts: {
Expand Down
3 changes: 3 additions & 0 deletions packages/taro-cli/src/presets/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default (ctx: IPluginContext) => {
'--name [name]': '项目名称',
'--description [description]': '项目介绍',
'--typescript': '使用TypeScript',
'--build-es5': '是否需要编译为es5',
'--npm [npm]': '包管理工具',
'--template-source [templateSource]': '项目模板源',
'--clone [clone]': '拉取远程模板时使用git clone',
Expand All @@ -25,6 +26,7 @@ export default (ctx: IPluginContext) => {
template,
description,
typescript,
buildEs5,
css,
npm,
framework,
Expand All @@ -45,6 +47,7 @@ export default (ctx: IPluginContext) => {
template,
description,
typescript,
buildEs5,
framework,
compiler,
hideDefaultTemplate,
Expand Down
29 changes: 29 additions & 0 deletions packages/taro-cli/src/util/appConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { IPluginContext } from '@tarojs/service'
import { isString } from '@tarojs/shared'
import { AppConfig } from '@tarojs/taro'

/**
* 按需编译功能,只编译指定的页面或组件
* @param appConfig
* @param args
*/
export function extractCompileEntry(
appConfig: AppConfig,
args: { _: string[], [key: string]: any },
ctx: IPluginContext
): void {
const { chalk } = ctx.helper

const extractType = isString(args.pages) ? 'pages' : isString(args.components) ? 'components' : ''
if (!extractType) return

const entries = args[extractType].split(',').map(item => item.trim()).filter(Boolean)
if (!entries.length) {
console.log(chalk.yellow(`按需编译开启失败,请指定要编译的${extractType}`))
return
}

appConfig[extractType] = entries
appConfig.subPackages = []
console.log(chalk.green(`已开启按需编译,仅编译以下${extractType}: ${appConfig[extractType]}`))
}
2 changes: 1 addition & 1 deletion packages/taro-components-advanced/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-advanced",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-library-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-library-react",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Taro 组件库 React 版本库",
"private": true,
"author": "O2Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-library-solid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-library-solid",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Taro 组件库 Solid 版本库",
"private": true,
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-library-vue3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-library-vue3",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "Taro 组件库 Vue3 版本库",
"private": true,
"author": "O2Team",
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-react",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "",
"main:h5": "dist/index.js",
"main": "dist/index.js",
Expand Down Expand Up @@ -37,7 +37,7 @@
"@tarojs/components": "workspace:*",
"@babel/runtime": "^7.24.4",
"classnames": "^2.2.5",
"swiper": "11.1.0",
"swiper": "11.1.15",
"tslib": "^2.6.2"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class SwiperInner extends React.Component<SwiperProps, SwiperState> {

const loopAdditionalSlides = this.getLoopAdditionalSlides()
const centeredSlides = displayMultipleItems === 1 && this.getNeedFixLoop()
const slidesPerView = parseFloat(String(displayMultipleItems)) === 1 ? 'auto' : displayMultipleItems
const slidesPerView = displayMultipleItems
// eslint-disable-next-line @typescript-eslint/no-this-alias
const that = this
const opt: Record<string, any> = {
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-rn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-rn",
"version": "4.0.9-beta.2",
"version": "4.0.9-beta.7",
"description": "React Native 基础组件",
"author": "O2Team",
"license": "MIT",
Expand Down
Loading
Loading