Skip to content

Commit

Permalink
refactor: swiper 版本升级到 11.1.0 (#16323)
Browse files Browse the repository at this point in the history
* feat: 完成stencil组件的swiper升级

* feat: 完成react组件库的swiper升级

* feat: 完善onChange和onAnimationFinish 的调用时机

* fix: lint

* feat: 补齐组件类型导出

* feat: 修改solid组件的导出

* feat: 加入动画参数

* chore(release): publish 4.0.5-alpha.0 --tag=alpha

* feat: 修复harmony-hybrid 的组件导出错误

* chore(release): publish 4.0.5-alpha.1 --tag=alpha

* feat: 删除tabbar从组件库暴露给用户

* fix: 修复swiper 事件回调触发类型

* chore(release): publish 4.0.5-alpha.2 --tag=alpha

* fix: 调整swiper-wrapper样式

* chore(release): publish 4.0.5-alpha.3 --tag=alpha

* fix: 修复swiper-wrapper 样式错误

* test: 修复测试用例

* fix: lint

* style: 调整 swiper-pagination 样式

* test: 修复 taro-h5 测试

* feat: 调整components 一些参数输出

* chore(release): publish 4.0.5-alpha.6 --tag=alpha

* chore: remove upload coverage reports to Codecov

* fix: 修复 由于 picomatch 引起的 prerender 的bug

* test: 更新webpack5-runner 的 snap

* ci: ci 恢复webpack5-runner的测试

* styles: 调整 Swiper 组件代码风格和添加注释

* chore(release): publish 4.0.5-alpha.7 --tag=alpha

* feat: 修改 swiper 的 onAnimationFinish调用时机
  • Loading branch information
ZEJIA-LIU authored Aug 16, 2024
1 parent 39dd83e commit 2ab7015
Show file tree
Hide file tree
Showing 102 changed files with 1,118 additions and 605 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@ jobs:
run: pnpm test
env:
CI: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

# 以下 coverage 流程通过 artifact 拆分文件作为单独 job 上传时间损耗过长,因此在在 node test 后直接继续执行
- name: Upload [taro-cli] coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.7",
"os": [
"win32"
],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taro",
"version": "4.0.4",
"version": "4.0.5-alpha.7",
"description": "开放式跨端跨框架开发解决方案",
"homepage": "https://github.com/NervJS/taro#readme",
"author": "O2Team",
Expand Down Expand Up @@ -29,7 +29,7 @@
"lint:style": "stylelint ./packages/**/*.{css,scss}",
"format": "prettier --write --cache .",
"format:check": "prettier --check --cache .",
"test": "pnpm --if-present -r --aggregate-output --filter=./packages/* test:ci",
"test": "pnpm --if-present -r --aggregate-output --filter=./packages/* --filter=./tests test:ci",
"test:binding": "pnpm --filter @tarojs/binding run test",
"updateSnapshot": "pnpm --if-present -r --aggregate-output --filter=./tests --filter=./packages/* updateSnapshot",
"version": "run-s version:*",
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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.7",
"description": "cli tool for taro",
"author": "O2Team",
"license": "MIT",
Expand Down
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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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.4",
"version": "4.0.5-alpha.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": "6.8.0",
"swiper": "11.1.0",
"tslib": "^2.6.2"
},
"devDependencies": {
Expand Down
9 changes: 7 additions & 2 deletions packages/taro-components-react/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function getAliasPlugin (framework) {
}

const base = {
input: 'src/index.ts',
treeshake: false,
output: {
chunkFileNames: '[name].js',
Expand All @@ -51,7 +50,7 @@ const base = {
format: 'es',
preserveModules: true,
preserveModulesRoot: 'src',
sourcemap: true
sourcemap: true,
}
}

Expand All @@ -62,6 +61,9 @@ const babelConfig = {

const react = () => {
const config = recursiveMerge({}, base, {
input: {
index: 'src/index.react.ts'
},
plugins: getPlugins(
[
getAliasPlugin('react'),
Expand Down Expand Up @@ -89,6 +91,9 @@ const react = () => {

const solid = () => {
const config = recursiveMerge({}, base, {
input: {
index: 'src/index.solid.ts'
},
output: {
dir: 'dist/solid',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ $weuiBtnPlainWarnActiveBorderColor: rgba(230 67 64 / 60%);
font-size: $weuiBtnMiniFontSize;
}

&[plain],
&[plain][type="default"],
&[plain][type="primary"] {
&[plain="true"],
&[plain="true"][type="default"],
&[plain="true"][type="primary"] {
border-width: 1px;
background-color: transparent;
}
Expand Down Expand Up @@ -162,7 +162,7 @@ $weuiBtnPlainWarnActiveBorderColor: rgba(230 67 64 / 60%);
}
}

&[plain][type="primary"] {
&[plain="true"][type="primary"] {
border: 1px solid $weuiBtnPlainPrimaryBorderColor;
color: $weuiBtnPlainPrimaryColor;

Expand All @@ -177,7 +177,7 @@ $weuiBtnPlainWarnActiveBorderColor: rgba(230 67 64 / 60%);
}
}

&[plain][type="warn"] {
&[plain="true"][type="warn"] {
border: 1px solid $weuiBtnPlainWarnBorderColor;
color: $weuiBtnPlainWarnColor;

Expand All @@ -192,8 +192,8 @@ $weuiBtnPlainWarnActiveBorderColor: rgba(230 67 64 / 60%);
}
}

&[plain],
&[plain][type="default"] {
&[plain="true"],
&[plain="true"][type="default"] {
border: 1px solid $weuiBtnPlainDefaultBorderColor;
color: $weuiBtnPlainDefaultColor;

Expand Down Expand Up @@ -236,13 +236,13 @@ $weuiBtnPlainWarnActiveBorderColor: rgba(230 67 64 / 60%);
}
}

&[plain][disabled] {
&[plain="true"][disabled] {
border: 1px solid rgb(0 0 0 / 20%);
background-color: #f7f7f7;
color: rgb(0 0 0 / 30%);
}

&[plain][disabled][type="primary"] {
&[plain="true"][disabled][type="primary"] {
border: 1px solid rgb(0 0 0 / 20%);
background-color: #f7f7f7;
color: rgb(0 0 0 / 30%);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ img[src=""] {
}

.taro-img__mode-scaletofill {
object-fit: contain;
width: 100%;
height: 100%;
}
Expand Down
Loading

0 comments on commit 2ab7015

Please sign in to comment.