@modern-js/runtime-utils 2.60.2 → 2.60.4

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.
@@ -78,10 +78,8 @@ const renderNestedRoute = (nestedRoute, options = {}) => {
78
78
  } else if (isLoadableComponent(Component) && lazyImport) {
79
79
  element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {});
80
80
  } else if (isRoot) {
81
- element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
82
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {
83
- ...props
84
- })
81
+ element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {
82
+ ...props
85
83
  });
86
84
  } else if (lazyImport) {
87
85
  element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Suspense, {
@@ -3,7 +3,7 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
3
3
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
4
4
  import { _ as _type_of } from "@swc/helpers/_/_type_of";
5
5
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
6
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { LOADER_REPORTER_NAME } from "@modern-js/utils/universal/constants";
8
8
  import { Suspense } from "react";
9
9
  import { Outlet, Route, createRoutesFromElements } from "react-router-dom";
@@ -74,9 +74,7 @@ var renderNestedRoute = function(nestedRoute) {
74
74
  } else if (isLoadableComponent(Component) && lazyImport) {
75
75
  element = /* @__PURE__ */ _jsx(Component, {});
76
76
  } else if (isRoot) {
77
- element = /* @__PURE__ */ _jsx(_Fragment, {
78
- children: /* @__PURE__ */ _jsx(Component, _object_spread({}, props))
79
- });
77
+ element = /* @__PURE__ */ _jsx(Component, _object_spread({}, props));
80
78
  } else if (lazyImport) {
81
79
  element = /* @__PURE__ */ _jsx(Suspense, {
82
80
  fallback: null,
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { LOADER_REPORTER_NAME } from "@modern-js/utils/universal/constants";
3
3
  import { Suspense } from "react";
4
4
  import { Outlet, Route, createRoutesFromElements } from "react-router-dom";
@@ -54,10 +54,8 @@ const renderNestedRoute = (nestedRoute, options = {}) => {
54
54
  } else if (isLoadableComponent(Component) && lazyImport) {
55
55
  element = /* @__PURE__ */ _jsx(Component, {});
56
56
  } else if (isRoot) {
57
- element = /* @__PURE__ */ _jsx(_Fragment, {
58
- children: /* @__PURE__ */ _jsx(Component, {
59
- ...props
60
- })
57
+ element = /* @__PURE__ */ _jsx(Component, {
58
+ ...props
61
59
  });
62
60
  } else if (lazyImport) {
63
61
  element = /* @__PURE__ */ _jsx(Suspense, {
@@ -9,5 +9,5 @@ export declare const renderNestedRoute: (nestedRoute: NestedRoute, options?: {
9
9
  DeferredDataComponent?: DeferredDataComponentType;
10
10
  props?: Record<string, any>;
11
11
  reporter?: Reporter;
12
- }) => JSX.Element;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.60.2",
18
+ "version": "2.60.4",
19
19
  "_comment": "Provide ESM and CJS exports, ESM is used by runtime package, for treeshaking",
20
20
  "exports": {
21
21
  "./router": {
@@ -126,12 +126,12 @@
126
126
  }
127
127
  },
128
128
  "dependencies": {
129
- "@remix-run/router": "1.15.0",
129
+ "@remix-run/router": "1.20.0",
130
130
  "@swc/helpers": "0.5.13",
131
131
  "lru-cache": "^6.0.0",
132
- "react-router-dom": "6.22.0",
132
+ "react-router-dom": "6.27.0",
133
133
  "serialize-javascript": "^6.0.0",
134
- "@modern-js/utils": "2.60.2"
134
+ "@modern-js/utils": "2.60.4"
135
135
  },
136
136
  "peerDependencies": {
137
137
  "react": ">=17.0.0",
@@ -154,9 +154,9 @@
154
154
  "react": "^18.2.0",
155
155
  "react-dom": "^18.2.0",
156
156
  "typescript": "^5",
157
- "@scripts/jest-config": "2.60.2",
158
- "@scripts/build": "2.60.2",
159
- "@modern-js/types": "2.60.2"
157
+ "@scripts/build": "2.60.4",
158
+ "@modern-js/types": "2.60.4",
159
+ "@scripts/jest-config": "2.60.4"
160
160
  },
161
161
  "sideEffects": false,
162
162
  "scripts": {