diff --git a/package.json b/package.json index f3cc10a55b8e..4099f8c49069 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@types/jest": "^26.0.14", "@types/lodash": "^4.14.142", "@types/node": "^12.7.11", - "@types/react": "^16.9.5", + "@types/react": "16.9.49", "@types/sinon": "^7.5.0", "@types/tapable": "1.0.5", "@types/webpack": "^4.39.3", diff --git a/packages/taro-cli/src/doctor/configSchema.ts b/packages/taro-cli/src/doctor/configSchema.ts index 3fd541e2e20f..5e5d143d58d4 100644 --- a/packages/taro-cli/src/doctor/configSchema.ts +++ b/packages/taro-cli/src/doctor/configSchema.ts @@ -31,7 +31,7 @@ const schema = Joi.object().keys({ Joi.object().keys({ from: Joi.string().required(), to: Joi.string().required(), - ignore: Joi.string(), + ignore: Joi.array().items(Joi.string()), transform: Joi.func() }) ), diff --git a/packages/taro-loader/src/page.ts b/packages/taro-loader/src/page.ts index aadbc573b97b..034e7446dcb0 100644 --- a/packages/taro-loader/src/page.ts +++ b/packages/taro-loader/src/page.ts @@ -31,7 +31,7 @@ import component from ${stringify(componentPath)} var config = ${configString}; ${config.enableShareTimeline ? 'component.enableShareTimeline = true' : ''} ${config.enableShareAppMessage ? 'component.enableShareAppMessage = true' : ''} -var inst = Page(createPageConfig(component, '${options.name}', {}, config || {})) +var inst = Page(createPageConfig(component, '${options.name}', {root:{cn:[]}}, config || {})) ${options.prerender ? prerender : ''} ` } diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap index a24f636c6b20..e655ff0b365b 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap @@ -850,7 +850,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } ], [ [ 18, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap index 3e5c924d807a..25d68f43433d 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap @@ -864,7 +864,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 15, 0, 1, 3, 2 ] ] ]); diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap index 532524a85908..95642449c27d 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap @@ -843,7 +843,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } ], [ [ 18, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap index e47e1d04bc66..0454f6459dd2 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap @@ -898,7 +898,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u5173\\\\u4e8e\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(about_Index, \\"pages/about/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(about_Index, \\"pages/about/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 18, 0, 1, 3, 2 ] ] ]); @@ -944,7 +948,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 17, 0, 1, 3, 2 ] ] ]); diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap index 8ffdbaf99920..9fc156774453 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap @@ -1014,7 +1014,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -2146,7 +2150,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -3282,7 +3290,11 @@ I m irrelevant. var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 14, 0, 1, 3, 2 ] ] ]); diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap index dd2f3b8c27e6..b68763027595 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap @@ -877,7 +877,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); }, 7: function(module, exports, __webpack_require__) { module.exports = { @@ -2031,7 +2035,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); }, 7: function(module, exports, __webpack_require__) { module.exports = { diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap index 8025006299da..a022132f909d 100644 Binary files a/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap and b/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap differ diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/jd.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/jd.spec.ts.snap index 720b213b711b..f59aa86b8003 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/jd.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/jd.spec.ts.snap @@ -2325,7 +2325,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } ], [ [ 19, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/nerv.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/nerv.spec.ts.snap index dbea667f31be..cf3ee2cfa9bf 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/nerv.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/nerv.spec.ts.snap @@ -869,7 +869,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 14, 0, 1, 3, 2 ] ] ]); diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/parse-html.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/parse-html.spec.ts.snap index 0c23deef41a8..bd7cf9f73397 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/parse-html.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/parse-html.spec.ts.snap @@ -864,7 +864,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 15, 0, 1, 3, 2 ] ] ]); diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/prerender.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/prerender.spec.ts.snap index 87263dc58e46..c906ba87926b 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/prerender.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/prerender.spec.ts.snap @@ -934,7 +934,11 @@ require(\\"./taro\\"); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); var _node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19); var config = {}; - var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"others/detail/index\\", {}, config || {})); + var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"others/detail/index\\", { + root: { + cn: [] + } + }, config || {})); if (typeof PRERENDER !== \\"undefined\\") { global._prerender = inst; } @@ -2192,7 +2196,11 @@ require(\\"./taro\\"); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); var _node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20); var config = {}; - var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"others/normal/index\\", {}, config || {})); + var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"others/normal/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 31, 0, 1, 3, 2 ] ] ]); @@ -2245,7 +2253,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); if (typeof PRERENDER !== \\"undefined\\") { global._prerender = inst; } @@ -4769,7 +4781,11 @@ require(\\"./taro\\"); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); var _node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13); var config = {}; - var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"others/detail/index\\", {}, config || {})); + var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"others/detail/index\\", { + root: { + cn: [] + } + }, config || {})); if (typeof PRERENDER !== \\"undefined\\") { global._prerender = inst; } @@ -4830,7 +4846,11 @@ require(\\"./taro\\"); return Index; }(react[\\"Component\\"]); var config = {}; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(normal_Index, \\"others/normal/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(normal_Index, \\"others/normal/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 24, 0, 1, 3, 2 ] ] ]); @@ -4883,7 +4903,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); if (typeof PRERENDER !== \\"undefined\\") { global._prerender = inst; } @@ -7377,7 +7401,11 @@ require(\\"./taro\\"); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); var _node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13); var config = {}; - var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"others/detail/index\\", {}, config || {})); + var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"others/detail/index\\", { + root: { + cn: [] + } + }, config || {})); if (typeof PRERENDER !== \\"undefined\\") { global._prerender = inst; } @@ -7438,7 +7466,11 @@ require(\\"./taro\\"); return Index; }(react[\\"Component\\"]); var config = {}; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(normal_Index, \\"others/normal/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(normal_Index, \\"others/normal/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 24, 0, 1, 3, 2 ] ] ]); @@ -7491,7 +7523,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createPageConfig\\"])(_node_modules_babel_loader_lib_index_js_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"], \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); if (typeof PRERENDER !== \\"undefined\\") { global._prerender = inst; } diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/qq.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/qq.spec.ts.snap index 9fc4b6248c6c..1a89667ad25c 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/qq.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/qq.spec.ts.snap @@ -1261,7 +1261,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } ], [ [ 19, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ @@ -3003,7 +3007,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } ], [ [ 19, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/react.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/react.spec.ts.snap index 5eef68c9ff1f..5093b981f231 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/react.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/react.spec.ts.snap @@ -1477,7 +1477,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } ], [ [ 19, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/sass.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/sass.spec.ts.snap index 4c2c4c8a924a..ea8651aadf86 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/sass.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/sass.spec.ts.snap @@ -871,7 +871,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 15, 0, 1, 3, 2 ] ] ]); @@ -2004,7 +2008,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 15, 0, 1, 3, 2 ] ] ]); @@ -3137,7 +3145,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 15, 0, 1, 3, 2 ] ] ]); @@ -4270,7 +4282,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 15, 0, 1, 3, 2 ] ] ]); diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap index ce749e2332f8..aa0282c742e4 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap @@ -871,7 +871,11 @@ require(\\"../../sub-utils\\"); var config = { navigationBarTitleText: \\"\\\\u8be6\\\\u60c5\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(detail_Detail, \\"packageA/detail/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(detail_Detail, \\"packageA/detail/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 19, 0, 4, 1, 3, 2 ] ] ]); @@ -925,7 +929,11 @@ require(\\"../../sub-utils\\"); var config = { navigationBarTitleText: \\"\\\\u4e2a\\\\u4eba\\\\u4e2d\\\\u5fc3\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(my_My, \\"packageA/my/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(my_My, \\"packageA/my/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 20, 0, 4, 1, 3, 2 ] ] ]); @@ -983,7 +991,11 @@ require(\\"../../sub-utils\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 17, 0, 1, 3, 2 ] ] ]); diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/swan.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/swan.spec.ts.snap index c62b6a0ff111..9f56ce3457c6 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/swan.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/swan.spec.ts.snap @@ -846,7 +846,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } ], [ [ 18, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/tabbar.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/tabbar.spec.ts.snap index 984fd86e6990..d4ea525da2c6 100644 Binary files a/packages/taro-mini-runner/src/__tests__/__snapshots__/tabbar.spec.ts.snap and b/packages/taro-mini-runner/src/__tests__/__snapshots__/tabbar.spec.ts.snap differ diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/ts.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/ts.spec.ts.snap index d21a1ad29af9..ad96e7136107 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/ts.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/ts.spec.ts.snap @@ -874,7 +874,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 15, 0, 1, 3, 2 ] ] ]); diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/vue.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/vue.spec.ts.snap index 77a96d488b62..f169bc7f07b5 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/vue.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/vue.spec.ts.snap @@ -872,7 +872,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 6, 0, 1 ] ] ]); diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/vue3.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/vue3.spec.ts.snap index 2068b8a1c000..d06b57c05d86 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/vue3.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/vue3.spec.ts.snap @@ -879,7 +879,11 @@ require(\\"./taro\\"); var config = { navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 7, 0, 1, 2 ] ] ]); diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/wx-hybrid.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/wx-hybrid.spec.ts.snap index d047becbc5cb..8679a5a0eee2 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/wx-hybrid.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/wx-hybrid.spec.ts.snap @@ -1082,7 +1082,11 @@ require(\\"./taro\\"); tab: \\"../../components/tab/tab\\" } }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", { + root: { + cn: [] + } + }, config || {})); } }, [ [ 24, 0, 1, 3, 2 ] ] ]); diff --git a/yarn.lock b/yarn.lock index 67a88908a8c6..1eceef3c24c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2533,7 +2533,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^16.9.5": +"@types/react@*", "@types/react@16.9.49": version "16.9.49" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.49.tgz#09db021cf8089aba0cdb12a49f8021a69cce4872" dependencies: