@modern-js/runtime 2.60.0 → 2.60.1-alpha.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.
@@ -84,8 +84,8 @@ const routerPlugin = (userConfig = {}) => {
84
84
  const useCreateRouter = (props) => {
85
85
  var _window__SERVER_DATA;
86
86
  const runtimeContext = (0, import_react.useContext)(import_core.RuntimeReactContext);
87
- const baseUrl = (runtimeContext._internalRouterBaseName || ((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
88
- const _basename = baseUrl === "/" ? (0, import_utils.urlJoin)(baseUrl, basename) : baseUrl;
87
+ const baseUrl = (((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
88
+ const _basename = baseUrl === "/" ? (0, import_utils.urlJoin)(baseUrl, runtimeContext._internalRouterBaseName || basename) : baseUrl;
89
89
  let hydrationData = window._ROUTER_DATA;
90
90
  const { unstable_getBlockNavState: getBlockNavState } = runtimeContext;
91
91
  return (0, import_react.useMemo)(() => {
@@ -65,8 +65,8 @@ var routerPlugin = function() {
65
65
  var useCreateRouter = function(props) {
66
66
  var _window__SERVER_DATA;
67
67
  var runtimeContext = useContext(RuntimeReactContext);
68
- var baseUrl = (runtimeContext._internalRouterBaseName || ((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
69
- var _basename = baseUrl === "/" ? urlJoin(baseUrl, basename) : baseUrl;
68
+ var baseUrl = (((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
69
+ var _basename = baseUrl === "/" ? urlJoin(baseUrl, runtimeContext._internalRouterBaseName || basename) : baseUrl;
70
70
  var hydrationData = window._ROUTER_DATA;
71
71
  var getBlockNavState = runtimeContext.unstable_getBlockNavState;
72
72
  return useMemo(function() {
@@ -58,8 +58,8 @@ const routerPlugin = (userConfig = {}) => {
58
58
  const useCreateRouter = (props) => {
59
59
  var _window__SERVER_DATA;
60
60
  const runtimeContext = useContext(RuntimeReactContext);
61
- const baseUrl = (runtimeContext._internalRouterBaseName || ((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
62
- const _basename = baseUrl === "/" ? urlJoin(baseUrl, basename) : baseUrl;
61
+ const baseUrl = (((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
62
+ const _basename = baseUrl === "/" ? urlJoin(baseUrl, runtimeContext._internalRouterBaseName || basename) : baseUrl;
63
63
  let hydrationData = window._ROUTER_DATA;
64
64
  const { unstable_getBlockNavState: getBlockNavState } = runtimeContext;
65
65
  return useMemo(() => {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.60.0",
18
+ "version": "2.60.1-alpha.1",
19
19
  "engines": {
20
20
  "node": ">=14.17.6"
21
21
  },
@@ -199,11 +199,11 @@
199
199
  "react-is": "^18",
200
200
  "react-side-effect": "^2.1.1",
201
201
  "styled-components": "^5.3.1",
202
- "@modern-js/plugin": "2.60.0",
203
202
  "@modern-js/runtime-utils": "2.60.0",
204
203
  "@modern-js/types": "2.60.0",
205
204
  "@modern-js/utils": "2.60.0",
206
- "@modern-js/plugin-data-loader": "2.60.0"
205
+ "@modern-js/plugin-data-loader": "2.60.0",
206
+ "@modern-js/plugin": "2.60.0"
207
207
  },
208
208
  "peerDependencies": {
209
209
  "react": ">=17",
@@ -226,16 +226,15 @@
226
226
  "ts-jest": "^29.1.0",
227
227
  "typescript": "^5",
228
228
  "webpack": "^5.94.0",
229
- "@modern-js/core": "2.60.0",
230
- "@modern-js/app-tools": "2.60.0",
231
229
  "@scripts/build": "2.60.0",
232
- "@scripts/jest-config": "2.60.0"
230
+ "@modern-js/app-tools": "2.60.0",
231
+ "@scripts/jest-config": "2.60.0",
232
+ "@modern-js/core": "2.60.0"
233
233
  },
234
234
  "sideEffects": false,
235
235
  "publishConfig": {
236
236
  "registry": "https://registry.npmjs.org/",
237
- "access": "public",
238
- "provenance": true
237
+ "access": "public"
239
238
  },
240
239
  "scripts": {
241
240
  "dev": "modern-lib build --watch",