@tarojs/taro-h5 3.6.0-beta.1 → 3.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/base/system.js +5 -1
- package/dist/index.cjs.js +9 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +9 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/handler.js +1 -2
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +3 -4
- package/package.json +5 -5
package/dist/utils/handler.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isFunction } from '@tarojs/shared';
|
|
2
|
-
import { isProd } from './index';
|
|
3
2
|
export class MethodHandler {
|
|
4
3
|
constructor({ name, success, fail, complete }) {
|
|
5
4
|
this.isHandlerError = false;
|
|
@@ -25,7 +24,7 @@ export class MethodHandler {
|
|
|
25
24
|
else {
|
|
26
25
|
res.errMsg = `${this.methodName}:fail ${res.errMsg}`;
|
|
27
26
|
}
|
|
28
|
-
if (
|
|
27
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
29
28
|
console.error(res.errMsg);
|
|
30
29
|
}
|
|
31
30
|
isFunction(this.__fail) && this.__fail(res);
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import { addLeadingSlash, getHomePage, stripBasename } from '@tarojs/router/dist
|
|
|
4
4
|
import { Current, hooks } from '@tarojs/runtime';
|
|
5
5
|
import { isFunction } from '@tarojs/shared';
|
|
6
6
|
import { MethodHandler } from './handler';
|
|
7
|
-
export const isProd = process.env.NODE_ENV === 'production';
|
|
8
7
|
export function shouldBeObject(target) {
|
|
9
8
|
if (target && typeof target === 'object')
|
|
10
9
|
return { flag: true };
|
|
@@ -86,7 +85,7 @@ export function temporarilyNotSupport(name = '') {
|
|
|
86
85
|
type: 'method',
|
|
87
86
|
category: 'temporarily',
|
|
88
87
|
});
|
|
89
|
-
if (
|
|
88
|
+
if (process.env.NODE_ENV === 'production') {
|
|
90
89
|
console.warn(errMsg);
|
|
91
90
|
return handle.success({ errMsg });
|
|
92
91
|
}
|
|
@@ -106,7 +105,7 @@ export function weixinCorpSupport(name) {
|
|
|
106
105
|
type: 'method',
|
|
107
106
|
category: 'weixin_corp',
|
|
108
107
|
});
|
|
109
|
-
if (
|
|
108
|
+
if (process.env.NODE_ENV === 'production') {
|
|
110
109
|
console.warn(errMsg);
|
|
111
110
|
return handle.success({ errMsg });
|
|
112
111
|
}
|
|
@@ -126,7 +125,7 @@ export function permanentlyNotSupport(name = '') {
|
|
|
126
125
|
type: 'method',
|
|
127
126
|
category: 'permanently',
|
|
128
127
|
});
|
|
129
|
-
if (
|
|
128
|
+
if (process.env.NODE_ENV === 'production') {
|
|
130
129
|
console.warn(errMsg);
|
|
131
130
|
return handle.success({ errMsg });
|
|
132
131
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro-h5",
|
|
3
|
-
"version": "3.6.0-beta.
|
|
3
|
+
"version": "3.6.0-beta.2",
|
|
4
4
|
"description": "Taro h5 framework",
|
|
5
5
|
"browser": "dist/index.esm.js",
|
|
6
6
|
"main:h5": "dist/index.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"jsonp-retry": "^1.0.3",
|
|
32
32
|
"query-string": "^7.1.1",
|
|
33
33
|
"whatwg-fetch": "^3.4.0",
|
|
34
|
-
"@tarojs/api": "3.6.0-beta.
|
|
35
|
-
"@tarojs/router": "3.6.0-beta.
|
|
36
|
-
"@tarojs/runtime": "3.6.0-beta.
|
|
37
|
-
"@tarojs/shared": "3.6.0-beta.
|
|
34
|
+
"@tarojs/api": "3.6.0-beta.2",
|
|
35
|
+
"@tarojs/router": "3.6.0-beta.2",
|
|
36
|
+
"@tarojs/runtime": "3.6.0-beta.2",
|
|
37
|
+
"@tarojs/shared": "3.6.0-beta.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"jest": "^29.3.1",
|