@shuvi/platform-shared 1.0.1 → 1.0.3

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.
@@ -62,6 +62,9 @@ export function runInParallerAndBail(fns) {
62
62
  });
63
63
  }
64
64
  function redirectHelper(to, status = 302) {
65
+ if (process.env.NODE_ENV === 'development') {
66
+ invariant(typeof to === 'string', `redirect fist argument should be string, now is ${typeof to}`);
67
+ }
65
68
  throw createRedirect(to, status);
66
69
  }
67
70
  function errorHelper(msg, statusCode = 500) {
@@ -69,6 +69,9 @@ function runInParallerAndBail(fns) {
69
69
  }
70
70
  exports.runInParallerAndBail = runInParallerAndBail;
71
71
  function redirectHelper(to, status = 302) {
72
+ if (process.env.NODE_ENV === 'development') {
73
+ (0, invariant_1.default)(typeof to === 'string', `redirect fist argument should be string, now is ${typeof to}`);
74
+ }
72
75
  throw (0, response_1.redirect)(to, status);
73
76
  }
74
77
  function errorHelper(msg, statusCode = 500) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuvi/platform-shared",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/shuvijs/shuvi.git",
@@ -83,20 +83,20 @@
83
83
  "node": ">= 12.0.0"
84
84
  },
85
85
  "dependencies": {
86
- "@shuvi/hook": "1.0.1",
86
+ "@shuvi/hook": "1.0.3",
87
87
  "@shuvi/redox": "0.0.7",
88
- "@shuvi/router": "1.0.1",
89
- "@shuvi/runtime": "1.0.1",
90
- "@shuvi/service": "1.0.1",
91
- "@shuvi/shared": "1.0.1",
92
- "@shuvi/toolpack": "1.0.1",
93
- "@shuvi/utils": "1.0.1",
88
+ "@shuvi/router": "1.0.3",
89
+ "@shuvi/runtime": "1.0.3",
90
+ "@shuvi/shared": "1.0.3",
91
+ "@shuvi/toolpack": "1.0.3",
92
+ "@shuvi/utils": "1.0.3",
94
93
  "redux": "4.1.2"
95
94
  },
96
95
  "peerDependencies": {
97
- "@shuvi/service": "1.0.1"
96
+ "@shuvi/service": "1.0.3"
98
97
  },
99
98
  "devDependencies": {
99
+ "@shuvi/service": "workspace:*",
100
100
  "@types/minimatch": "3.0.5"
101
101
  }
102
102
  }