@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.
@@ -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 (!isProd) {
27
+ if (process.env.NODE_ENV !== 'production') {
29
28
  console.error(res.errMsg);
30
29
  }
31
30
  isFunction(this.__fail) && this.__fail(res);
@@ -1,5 +1,4 @@
1
1
  import { TaroElement } from '@tarojs/runtime';
2
- export declare const isProd: boolean;
3
2
  export declare function shouldBeObject(target: unknown): {
4
3
  flag: boolean;
5
4
  msg?: undefined;
@@ -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 (isProd) {
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 (isProd) {
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 (isProd) {
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.1",
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.1",
35
- "@tarojs/router": "3.6.0-beta.1",
36
- "@tarojs/runtime": "3.6.0-beta.1",
37
- "@tarojs/shared": "3.6.0-beta.1"
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",