@umijs/core 4.0.37 → 4.0.38

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.
@@ -53,7 +53,7 @@ function transformRoute(opts) {
53
53
  let absPath = opts.route.path;
54
54
  if ((absPath == null ? void 0 : absPath.charAt(0)) !== "/") {
55
55
  const parentAbsPath = opts.parentId ? opts.memo.ret[opts.parentId].absPath.replace(/\/+$/, "/") : "/";
56
- absPath = endsWithStar(parentAbsPath) ? parentAbsPath : ensureWithSlash(parentAbsPath, absPath);
56
+ absPath = `${parentAbsPath}${endsWithStar(parentAbsPath) ? "" : absPath}`;
57
57
  }
58
58
  opts.memo.ret[id] = {
59
59
  ...routeProps,
@@ -103,12 +103,6 @@ function transformRoute(opts) {
103
103
  function endsWithStar(str) {
104
104
  return str.endsWith("*");
105
105
  }
106
- function ensureWithSlash(left, right) {
107
- if (!right.length || right === "/") {
108
- return left;
109
- }
110
- return `${left.replace(/\/+$/, "")}/${right.replace(/^\/+/, "")}`;
111
- }
112
106
  // Annotate the CommonJS export names for ESM import in node:
113
107
  0 && (module.exports = {
114
108
  getConfigRoutes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/core",
3
- "version": "4.0.37",
3
+ "version": "4.0.38",
4
4
  "homepage": "https://github.com/umijs/umi/tree/master/packages/core#readme",
5
5
  "bugs": "https://github.com/umijs/umi/issues",
6
6
  "repository": {
@@ -21,8 +21,8 @@
21
21
  "test": "umi-scripts jest-turbo"
22
22
  },
23
23
  "dependencies": {
24
- "@umijs/bundler-utils": "4.0.37",
25
- "@umijs/utils": "4.0.37"
24
+ "@umijs/bundler-utils": "4.0.38",
25
+ "@umijs/utils": "4.0.38"
26
26
  },
27
27
  "devDependencies": {
28
28
  "dotenv": "16.0.0",