@modern-js/plugin-data-loader 2.59.0 → 2.60.1
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/esm/cli/data.js
CHANGED
|
@@ -5,6 +5,7 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
|
5
5
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
6
6
|
import { _ as _to_array } from "@swc/helpers/_/_to_array";
|
|
7
7
|
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
8
|
+
import { _ as _type_of } from "@swc/helpers/_/_type_of";
|
|
8
9
|
import { _ as _wrap_async_generator } from "@swc/helpers/_/_wrap_async_generator";
|
|
9
10
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
10
11
|
import { AbortedDeferredError, UNSAFE_DeferredData as DeferredData } from "@modern-js/runtime-utils/remix-router";
|
|
@@ -42,7 +43,7 @@ function _parseDeferredReadableStream() {
|
|
|
42
43
|
throw new Error("no critical data");
|
|
43
44
|
}
|
|
44
45
|
criticalData = JSON.parse(initialSection);
|
|
45
|
-
if (typeof criticalData === "object" && criticalData !== null) {
|
|
46
|
+
if ((typeof criticalData === "undefined" ? "undefined" : _type_of(criticalData)) === "object" && criticalData !== null) {
|
|
46
47
|
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
47
48
|
try {
|
|
48
49
|
_loop = function() {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
2
2
|
import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
|
|
3
|
+
import { _ as _type_of } from "@swc/helpers/_/_type_of";
|
|
3
4
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
4
5
|
import { transformNestedRoutes } from "@modern-js/runtime-utils/browser";
|
|
5
6
|
import { createRequestContext, matchEntry, reporterCtx } from "@modern-js/runtime-utils/node";
|
|
@@ -21,7 +22,7 @@ function isRedirectResponse(status) {
|
|
|
21
22
|
return redirectStatusCodes.has(status);
|
|
22
23
|
}
|
|
23
24
|
function isResponse(value) {
|
|
24
|
-
return value != null && typeof value.status === "number" && typeof value.statusText === "string" &&
|
|
25
|
+
return value != null && typeof value.status === "number" && typeof value.statusText === "string" && _type_of(value.headers) === "object" && typeof value.body !== "undefined";
|
|
25
26
|
}
|
|
26
27
|
function convertModernRedirectResponse(headers, basename) {
|
|
27
28
|
var newHeaders = new Headers(headers);
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.60.1",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=16.2.0"
|
|
21
21
|
},
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@babel/core": "^7.24.7",
|
|
50
|
-
"@swc/helpers": "0.5.
|
|
50
|
+
"@swc/helpers": "0.5.13",
|
|
51
51
|
"path-to-regexp": "^6.2.0",
|
|
52
|
-
"@modern-js/utils": "2.
|
|
53
|
-
"@modern-js/
|
|
52
|
+
"@modern-js/runtime-utils": "2.60.1",
|
|
53
|
+
"@modern-js/utils": "2.60.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/babel__core": "^7.20.5",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"ts-jest": "^29.1.0",
|
|
67
67
|
"typescript": "^5",
|
|
68
68
|
"webpack": "^5.94.0",
|
|
69
|
-
"@modern-js/core": "2.
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"@scripts/jest-config": "2.
|
|
73
|
-
"@modern-js/
|
|
69
|
+
"@modern-js/core": "2.60.1",
|
|
70
|
+
"@scripts/build": "2.60.1",
|
|
71
|
+
"@modern-js/types": "2.60.1",
|
|
72
|
+
"@scripts/jest-config": "2.60.1",
|
|
73
|
+
"@modern-js/server-core": "2.60.1"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"react": ">=17.0.0"
|