@modern-js/runtime 0.0.0-next-c835d71 → 0.0.0-next-3ef832741
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 +14 -8
- package/dist/cjs/ssr/serverRender/renderToStream/bulidTemplate.before.js +5 -1
- package/dist/esm/ssr/serverRender/renderToStream/bulidTemplate.before.js +1 -1
- package/dist/esm-node/ssr/serverRender/renderToStream/bulidTemplate.before.js +5 -1
- package/dist/types/document/Body.d.ts +0 -1
- package/dist/types/document/Head.d.ts +0 -1
- package/dist/types/document/Html.d.ts +0 -1
- package/dist/types/document/Links.d.ts +0 -1
- package/dist/types/document/Root.d.ts +0 -1
- package/dist/types/document/Script.d.ts +0 -1
- package/dist/types/document/Scripts.d.ts +0 -1
- package/dist/types/router/runtime/DefaultNotFound.d.ts +0 -1
- package/dist/types/router/runtime/DeferredDataScripts.d.ts +0 -2
- package/dist/types/router/runtime/index.d.ts +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
# @modern-js/runtime
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-3ef832741
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- 3ef832741: fix: fix types pathname for model field
|
|
8
|
+
fix: 修复 model 字段对应的 types 路径
|
|
9
|
+
- 9330022f4: fix: add missing react-router type
|
|
10
|
+
fix: 添加丢失的 react-router 导出类型
|
|
11
|
+
- 58a1fc64d: fix: pass basename to `matchRoutes`
|
|
12
|
+
fix: 修复 `matchRoutes` 未传入 basename 参数
|
|
13
|
+
- 1f6ca2c7f: fix: nested routes in ssg
|
|
8
14
|
fix: 修复嵌套路由在 SSG 中的问题
|
|
9
|
-
-
|
|
15
|
+
- 9c9ebba6f: fix: fix duplicate re-exports of reduck
|
|
10
16
|
fix: 修复从 reduck 重复导出的 API
|
|
11
|
-
- Updated dependencies [
|
|
12
|
-
- Updated dependencies [
|
|
13
|
-
- @modern-js/utils@0.0.0-next-
|
|
14
|
-
- @modern-js/types@0.0.0-next-
|
|
15
|
-
- @modern-js/plugin@0.0.0-next-
|
|
17
|
+
- Updated dependencies [1104a9f18]
|
|
18
|
+
- Updated dependencies [1f6ca2c7f]
|
|
19
|
+
- @modern-js/utils@0.0.0-next-3ef832741
|
|
20
|
+
- @modern-js/types@0.0.0-next-3ef832741
|
|
21
|
+
- @modern-js/plugin@0.0.0-next-3ef832741
|
|
16
22
|
|
|
17
23
|
## 2.7.0
|
|
18
24
|
|
|
@@ -58,7 +58,11 @@ function getHeadTemplate(beforeEntryTemplate, context) {
|
|
|
58
58
|
}
|
|
59
59
|
const { routeAssets } = routeManifest;
|
|
60
60
|
const cssChunks = [];
|
|
61
|
-
const matches = (0, import_react_router_dom.matchRoutes)(
|
|
61
|
+
const matches = (0, import_react_router_dom.matchRoutes)(
|
|
62
|
+
routes,
|
|
63
|
+
routerContext.location,
|
|
64
|
+
routerContext.basename
|
|
65
|
+
);
|
|
62
66
|
matches == null ? void 0 : matches.forEach((match, index) => {
|
|
63
67
|
if (!index) {
|
|
64
68
|
return;
|
|
@@ -71,7 +71,7 @@ function getHeadTemplate(beforeEntryTemplate, context) {
|
|
|
71
71
|
}
|
|
72
72
|
var routeAssets = routeManifest.routeAssets;
|
|
73
73
|
var cssChunks = [];
|
|
74
|
-
var matches = matchRoutes(routes, routerContext.location);
|
|
74
|
+
var matches = matchRoutes(routes, routerContext.location, routerContext.basename);
|
|
75
75
|
matches === null || matches === void 0 ? void 0 : matches.forEach(function(match, index) {
|
|
76
76
|
if (!index) {
|
|
77
77
|
return;
|
|
@@ -29,7 +29,11 @@ function getHeadTemplate(beforeEntryTemplate, context) {
|
|
|
29
29
|
}
|
|
30
30
|
const { routeAssets } = routeManifest;
|
|
31
31
|
const cssChunks = [];
|
|
32
|
-
const matches = matchRoutes(
|
|
32
|
+
const matches = matchRoutes(
|
|
33
|
+
routes,
|
|
34
|
+
routerContext.location,
|
|
35
|
+
routerContext.basename
|
|
36
|
+
);
|
|
33
37
|
matches == null ? void 0 : matches.forEach((match, index) => {
|
|
34
38
|
if (!index) {
|
|
35
39
|
return;
|
|
@@ -4,6 +4,6 @@ export type { SingleRouteConfig, RouterConfig };
|
|
|
4
4
|
export default routerPlugin;
|
|
5
5
|
export { modifyRoutes } from './plugin';
|
|
6
6
|
export * from './withRouter';
|
|
7
|
-
export type { FormEncType, FormMethod, GetScrollRestorationKeyFunction, ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, FetcherWithComponents, ActionFunction, ActionFunctionArgs, AwaitProps, unstable_Blocker, unstable_BlockerFunction, DataRouteMatch, DataRouteObject, Fetcher, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LayoutRouteProps, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, Params, ParamParseKey, Path, PathMatch, Pathname, PathPattern, PathRouteProps, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, Search, ShouldRevalidateFunction, To } from 'react-router-dom';
|
|
7
|
+
export type { FormEncType, FormMethod, GetScrollRestorationKeyFunction, ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, FetcherWithComponents, ActionFunction, ActionFunctionArgs, AwaitProps, unstable_Blocker, unstable_BlockerFunction, DataRouteMatch, DataRouteObject, Fetcher, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LayoutRouteProps, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NavLinkProps, NonIndexRouteObject, OutletProps, Params, ParamParseKey, Path, PathMatch, Pathname, PathPattern, PathRouteProps, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, Search, ShouldRevalidateFunction, To } from 'react-router-dom';
|
|
8
8
|
export { createBrowserRouter, createHashRouter, createMemoryRouter, RouterProvider, BrowserRouter, HashRouter, MemoryRouter, Router, Await, Form, Link, NavLink, Navigate, Outlet, Route, Routes, ScrollRestoration, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit, createRoutesFromChildren, createRoutesFromElements, createSearchParams, generatePath, isRouteErrorResponse, matchPath, matchRoutes, renderMatches, resolvePath } from 'react-router-dom';
|
|
9
9
|
export { defer, json, redirect } from '@modern-js/utils/remix-router';
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-3ef832741",
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=14.17.6"
|
|
17
17
|
},
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"./model": {
|
|
69
69
|
"jsnext:source": "./src/state/index.ts",
|
|
70
|
-
"types": "./
|
|
70
|
+
"types": "./types/model.d.ts",
|
|
71
71
|
"default": "./dist/esm/state/index.js"
|
|
72
72
|
},
|
|
73
73
|
"./cli": {
|
|
@@ -158,9 +158,9 @@
|
|
|
158
158
|
"react-side-effect": "^2.1.1",
|
|
159
159
|
"redux-logger": "^3.0.6",
|
|
160
160
|
"styled-components": "^5.3.1",
|
|
161
|
-
"@modern-js/plugin": "0.0.0-next-
|
|
162
|
-
"@modern-js/types": "0.0.0-next-
|
|
163
|
-
"@modern-js/utils": "0.0.0-next-
|
|
161
|
+
"@modern-js/plugin": "0.0.0-next-3ef832741",
|
|
162
|
+
"@modern-js/types": "0.0.0-next-3ef832741",
|
|
163
|
+
"@modern-js/utils": "0.0.0-next-3ef832741"
|
|
164
164
|
},
|
|
165
165
|
"peerDependencies": {
|
|
166
166
|
"react": ">=17",
|
|
@@ -181,11 +181,11 @@
|
|
|
181
181
|
"react-dom": "^18",
|
|
182
182
|
"ts-jest": "^27.0.4",
|
|
183
183
|
"typescript": "^4",
|
|
184
|
-
"@modern-js/app-tools": "0.0.0-next-
|
|
185
|
-
"@modern-js/core": "0.0.0-next-
|
|
186
|
-
"@
|
|
187
|
-
"@scripts/
|
|
188
|
-
"@
|
|
184
|
+
"@modern-js/app-tools": "0.0.0-next-3ef832741",
|
|
185
|
+
"@modern-js/core": "0.0.0-next-3ef832741",
|
|
186
|
+
"@scripts/build": "0.0.0-next-3ef832741",
|
|
187
|
+
"@scripts/jest-config": "0.0.0-next-3ef832741",
|
|
188
|
+
"@modern-js/server-core": "0.0.0-next-3ef832741"
|
|
189
189
|
},
|
|
190
190
|
"sideEffects": false,
|
|
191
191
|
"modernConfig": {},
|