@modern-js/plugin-data-loader 0.0.0-next-1686679651083 → 0.0.0-next-1686710299692
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/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
# @modern-js/plugin-data-loader
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1686710299692
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- 7e6fb5fc16: chore: publishConfig add provenance config
|
|
8
8
|
|
|
9
9
|
chore: publishConfig 增加 provenance 配置
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- a7a7ad7797: chore: move some public code to the utils package
|
|
12
12
|
chore: 移动一些公共的代码到 utils 包
|
|
13
|
-
-
|
|
13
|
+
- 6dec7c2a1e: test(utils): reuse the snapshot serializer of vitest config
|
|
14
14
|
|
|
15
15
|
test(utils): 复用 vitest 的 snapshot serializer
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
- Updated dependencies [
|
|
20
|
-
-
|
|
21
|
-
- Updated dependencies [6dec7c2a1]
|
|
22
|
-
- Updated dependencies [c3216b5e0]
|
|
23
|
-
- @modern-js/utils@0.0.0-next-1686679651083
|
|
17
|
+
- Updated dependencies [7e6fb5fc16]
|
|
18
|
+
- Updated dependencies [a7a7ad7797]
|
|
19
|
+
- Updated dependencies [6dec7c2a1e]
|
|
20
|
+
- @modern-js/utils@0.0.0-next-1686710299692
|
|
24
21
|
|
|
25
22
|
## 2.22.1
|
|
26
23
|
|
|
@@ -18,7 +18,7 @@ _export(exports, {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
const _pathtoregexp = require("path-to-regexp");
|
|
21
|
-
const
|
|
21
|
+
const _reactrouterdom = require("react-router-dom");
|
|
22
22
|
const _constants = require("../common/constants");
|
|
23
23
|
const _data = require("./data");
|
|
24
24
|
const getRequestUrl = ({ params, request, routeId }) => {
|
|
@@ -36,7 +36,7 @@ const handleRedirectResponse = (res) => {
|
|
|
36
36
|
const { headers } = res;
|
|
37
37
|
const location = headers.get("X-Modernjs-Redirect");
|
|
38
38
|
if (location) {
|
|
39
|
-
throw (0,
|
|
39
|
+
throw (0, _reactrouterdom.redirect)(location);
|
|
40
40
|
}
|
|
41
41
|
return res;
|
|
42
42
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
2
2
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
3
3
|
import { compile } from "path-to-regexp";
|
|
4
|
-
import { redirect } from "
|
|
4
|
+
import { redirect } from "react-router-dom";
|
|
5
5
|
import { LOADER_ID_PARAM, DIRECT_PARAM, CONTENT_TYPE_DEFERRED } from "../common/constants";
|
|
6
6
|
import { parseDeferredReadableStream } from "./data";
|
|
7
7
|
export var getRequestUrl = function(param) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compile } from "path-to-regexp";
|
|
2
|
-
import { redirect } from "
|
|
2
|
+
import { redirect } from "react-router-dom";
|
|
3
3
|
import { LOADER_ID_PARAM, DIRECT_PARAM, CONTENT_TYPE_DEFERRED } from "../common/constants";
|
|
4
4
|
import { parseDeferredReadableStream } from "./data";
|
|
5
5
|
export const getRequestUrl = ({ params, request, routeId }) => {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-next-
|
|
18
|
+
"version": "0.0.0-next-1686710299692",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=14.17.6"
|
|
21
21
|
},
|
|
@@ -57,8 +57,9 @@
|
|
|
57
57
|
"@babel/core": "^7.21.8",
|
|
58
58
|
"@remix-run/node": "^1.12.0",
|
|
59
59
|
"path-to-regexp": "^6.2.0",
|
|
60
|
+
"react-router-dom": "^6.8.1",
|
|
60
61
|
"@swc/helpers": "0.5.1",
|
|
61
|
-
"@modern-js/utils": "0.0.0-next-
|
|
62
|
+
"@modern-js/utils": "0.0.0-next-1686710299692"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@types/babel__core": "^7.20.0",
|
|
@@ -75,14 +76,16 @@
|
|
|
75
76
|
"webpack-chain": "^6.5.1",
|
|
76
77
|
"react": "^18",
|
|
77
78
|
"react-dom": "^18",
|
|
78
|
-
"
|
|
79
|
-
"@modern-js/
|
|
80
|
-
"@modern-js/
|
|
81
|
-
"@
|
|
82
|
-
"@scripts/
|
|
79
|
+
"react-router-dom": "^6.8.1",
|
|
80
|
+
"@modern-js/core": "0.0.0-next-1686710299692",
|
|
81
|
+
"@modern-js/server-core": "0.0.0-next-1686710299692",
|
|
82
|
+
"@modern-js/types": "0.0.0-next-1686710299692",
|
|
83
|
+
"@scripts/build": "0.0.0-next-1686710299692",
|
|
84
|
+
"@scripts/jest-config": "0.0.0-next-1686710299692"
|
|
83
85
|
},
|
|
84
86
|
"peerDependencies": {
|
|
85
|
-
"react": ">=17.0.0"
|
|
87
|
+
"react": ">=17.0.0",
|
|
88
|
+
"react-router-dom": "^6.8.1"
|
|
86
89
|
},
|
|
87
90
|
"sideEffects": false,
|
|
88
91
|
"publishConfig": {
|