@equinor/fusion-framework-module-navigation 7.0.7 → 7.0.8

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.
@@ -1 +1 @@
1
- export declare const version = "7.0.7";
1
+ export declare const version = "7.0.8";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-module-navigation",
3
- "version": "7.0.7",
3
+ "version": "7.0.8",
4
4
  "description": "Navigation module for Fusion Framework providing routing and navigation capabilities using React Router 7",
5
5
  "sideEffects": false,
6
6
  "main": "dist/esm/index.js",
@@ -40,10 +40,10 @@
40
40
  "rxjs": "^7.8.1",
41
41
  "typescript": "^7.0.2",
42
42
  "vitest": "^4.1.0",
43
- "@equinor/fusion-framework-module-event": "^6.0.1",
44
43
  "@equinor/fusion-framework-module": "^6.1.2",
45
- "@equinor/fusion-observable": "^9.1.1",
46
- "@equinor/fusion-framework-module-telemetry": "^7.0.2"
44
+ "@equinor/fusion-framework-module-telemetry": "^7.0.2",
45
+ "@equinor/fusion-framework-module-event": "^6.0.1",
46
+ "@equinor/fusion-observable": "^9.1.1"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@remix-run/router": "^1.0.0",
@@ -37,9 +37,12 @@ const normalizePathname = (path: string): string => {
37
37
  let result = '';
38
38
  let lastWasSlash = false;
39
39
 
40
+ // Walk each character once to collapse runs of slashes in a single pass
40
41
  for (let i = 0; i < path.length; i++) {
41
42
  const char = path[i];
43
+ // Only slashes need de-duplication; every other character passes through
42
44
  if (char === '/') {
45
+ // Keep the first slash of a run, drop the rest
43
46
  if (!lastWasSlash) {
44
47
  result += char;
45
48
  lastWasSlash = true;
@@ -67,6 +70,7 @@ const normalizePathname = (path: string): string => {
67
70
  const stripTrailingSlashes = (path: string): string => {
68
71
  // Use iterative approach to avoid ReDoS vulnerability
69
72
  let endIndex = path.length;
73
+ // Shrink endIndex past every trailing slash
70
74
  while (endIndex > 0 && path[endIndex - 1] === '/') {
71
75
  endIndex--;
72
76
  }
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '7.0.7';
2
+ export const version = '7.0.8';