From 7edcab6ecdaa3323efd6cc56f686a6fbaa31b2e0 Mon Sep 17 00:00:00 2001 From: xuxiaoyan Date: Fri, 15 Jan 2021 14:32:59 +0800 Subject: [PATCH 1/3] Update changelog --- CHANGELOG.en-US.md | 1 + CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 9f5db36d..ab3b249a 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -10,6 +10,7 @@ toc: hidden - Feat - `Dialog` supports passing in `transition` when using static methods[#716](https://github.com/didi/mand-mobile/issues/716) - Fix + - Fix `Tip` error when no attributes in subcomponent - Fix the conflict of `InputItem` component instance method sharing `debounce` internal variables ### 2.5.13 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1934a9f9..22223057 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ toc: hidden - Feat - `Dialog`使用静态方法时支持传入`transition`[#716](https://github.com/didi/mand-mobile/issues/716) - Fix + - 修复`Tip`组件子组件属性为空时导致报错 - 修复`InputItem`组件实例方法共享`debounce`内部变量的冲突 ### 2.5.13 From e431e5aa32280b29d846276a2ec12a6f4714eb3b Mon Sep 17 00:00:00 2001 From: zouhang Date: Thu, 4 Feb 2021 16:50:17 +0800 Subject: [PATCH 2/3] fix(build): replace NODE_ENV with MAND_ENV in some components --- components/popup/index.vue | 4 ++-- components/swiper/index.vue | 4 ++-- components/water-mark/index.vue | 2 +- config/dev.env.js | 3 ++- config/prod.env.js | 3 ++- config/test.env.js | 3 ++- package.json | 6 +++--- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/components/popup/index.vue b/components/popup/index.vue index 6aa557ca..10caf5d4 100644 --- a/components/popup/index.vue +++ b/components/popup/index.vue @@ -145,7 +145,7 @@ export default { // popup box enter the animation after popup show this.isPopupBoxShow = true /* istanbul ignore if */ - if (process.env.NODE_ENV === 'test') { + if (process.env.MAND_ENV === 'test') { this.$_onPopupTransitionStart() this.$_onPopupTransitionEnd() } @@ -158,7 +158,7 @@ export default { this.preventScroll && this.$_preventScroll(false) this.$emit('input', false) /* istanbul ignore if */ - if (process.env.NODE_ENV === 'test') { + if (process.env.MAND_ENV === 'test') { this.$_onPopupTransitionStart() this.$_onPopupTransitionEnd() } diff --git a/components/swiper/index.vue b/components/swiper/index.vue index f215d287..3b41b73b 100644 --- a/components/swiper/index.vue +++ b/components/swiper/index.vue @@ -547,8 +547,8 @@ export default { dragState.startTime = new Date() dragState.startLeft = point.pageX dragState.startTop = point.pageY - dragState.itemWidth = process.env.NODE_ENV !== 'test' ? element.offsetWidth : 100 - dragState.itemHeight = process.env.NODE_ENV !== 'test' ? element.offsetHeight : 100 + dragState.itemWidth = process.env.MAND_ENV !== 'test' ? element.offsetWidth : 100 + dragState.itemHeight = process.env.MAND_ENV !== 'test' ? element.offsetHeight : 100 }, $_doOnTouchMove(event) { diff --git a/components/water-mark/index.vue b/components/water-mark/index.vue index 0f94d868..27e15269 100644 --- a/components/water-mark/index.vue +++ b/components/water-mark/index.vue @@ -86,7 +86,7 @@ export default { data() { return { - repetition: process.env.NODE_ENV === 'test' ? 2 : 50, + repetition: process.env.MAND_ENV === 'test' ? 2 : 50, } }, diff --git a/config/dev.env.js b/config/dev.env.js index 1e22973a..fedb8b79 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -3,5 +3,6 @@ const merge = require('webpack-merge') const prodEnv = require('./prod.env') module.exports = merge(prodEnv, { - NODE_ENV: '"development"' + NODE_ENV: '"development"', + MAND_ENV: '"development"', }) diff --git a/config/prod.env.js b/config/prod.env.js index a6f99761..cc4c7b54 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,4 +1,5 @@ 'use strict' module.exports = { - NODE_ENV: '"production"' + NODE_ENV: '"production"', + MAND_ENV: '"production"', } diff --git a/config/test.env.js b/config/test.env.js index c2824a30..dded621d 100644 --- a/config/test.env.js +++ b/config/test.env.js @@ -3,5 +3,6 @@ const merge = require('webpack-merge') const devEnv = require('./dev.env') module.exports = merge(devEnv, { - NODE_ENV: '"testing"' + NODE_ENV: '"testing"', + MAND_ENV: '"testing"', }) diff --git a/package.json b/package.json index c892d758..a342b34f 100644 --- a/package.json +++ b/package.json @@ -48,9 +48,9 @@ "build:webpack:mand-mobile": "cross-env NODE_ENV=production node build/webpack/build-mand-mobile", "build:webpack:components": "cross-env NODE_ENV=production gulp build --gulpfile gulpfile.js && node build/webpack/build-style-entry", "codecov": "codecov", - "test": "jest --no-cache --runInBand --verbose --silent", - "test:lib": "TEST_TYPE=lib jest --no-cache --runInBand --verbose --silent", - "test:lib-vw": "TEST_TYPE=lib-vw jest --no-cache --runInBand --verbose --silent" + "test": "MAND_ENV=test jest --no-cache --runInBand --verbose --silent", + "test:lib": "MAND_ENV=test TEST_TYPE=lib jest --no-cache --runInBand --verbose --silent", + "test:lib-vw": "MAND_ENV=test TEST_TYPE=lib-vw jest --no-cache --runInBand --verbose --silent" }, "license": "Apache", "config": { From bf4147d5f02fd2dd57b3b5a06af8f5fc09d7571d Mon Sep 17 00:00:00 2001 From: zouhang Date: Thu, 4 Feb 2021 17:26:36 +0800 Subject: [PATCH 3/3] Bump up version to 2.5.15 --- CHANGELOG.en-US.md | 7 +++++++ CHANGELOG.md | 7 +++++++ package.json | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index ab3b249a..330f2fff 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -3,6 +3,13 @@ title: Change Log toc: hidden --- +### 2.5.15 + +`2021-02-04` + +- Fix + - Replace `NODE_ENV` with `MAND_ENV` in some components + ### 2.5.14 `2021-01-15` diff --git a/CHANGELOG.md b/CHANGELOG.md index 22223057..8e0e4c4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ title: 更新日志 toc: hidden --- +### 2.5.15 + +`2021-02-04` + +- Fix + - 移除组件中对`NODE_ENV`的依赖 + ### 2.5.14 `2021-01-15` diff --git a/package.json b/package.json index a342b34f..5e264922 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mand-mobile", - "version": "2.5.14", + "version": "2.5.15", "description": "A Vue.js 2.0 Mobile UI Toolkit", "homepage": "https://didi.github.io/mand-mobile", "main": "lib/mand-mobile.umd.js",