@jsenv/navi 0.4.1 → 0.4.2

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.
@@ -17092,16 +17092,9 @@ const createRoute = (urlPatternInput) => {
17092
17092
  if (processedRelativeUrl[0] === "/") {
17093
17093
  processedRelativeUrl = processedRelativeUrl.slice(1);
17094
17094
  }
17095
-
17096
17095
  if (hasRawUrlPartWithInvalidChars) {
17097
- // Manually construct URL to avoid automatic encoding by URL constructor
17098
- const baseUrlObj = new URL(baseUrl);
17099
- if (baseUrlObj.pathname.endsWith("/")) {
17100
- return `${baseUrl}${processedRelativeUrl}`;
17101
- }
17102
17096
  return `${baseUrl}/${processedRelativeUrl}`;
17103
17097
  }
17104
-
17105
17098
  const url = new URL(processedRelativeUrl, baseUrl).href;
17106
17099
  return url;
17107
17100
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Library of components including navigation to create frontend applications",
5
5
  "repository": {
6
6
  "type": "git",
@@ -359,16 +359,9 @@ const createRoute = (urlPatternInput) => {
359
359
  if (processedRelativeUrl[0] === "/") {
360
360
  processedRelativeUrl = processedRelativeUrl.slice(1);
361
361
  }
362
-
363
362
  if (hasRawUrlPartWithInvalidChars) {
364
- // Manually construct URL to avoid automatic encoding by URL constructor
365
- const baseUrlObj = new URL(baseUrl);
366
- if (baseUrlObj.pathname.endsWith("/")) {
367
- return `${baseUrl}${processedRelativeUrl}`;
368
- }
369
363
  return `${baseUrl}/${processedRelativeUrl}`;
370
364
  }
371
-
372
365
  const url = new URL(processedRelativeUrl, baseUrl).href;
373
366
  return url;
374
367
  };