@aurelia/router-lite
Advanced tools
Comparing version 2.0.1-dev.202405230048 to 2.0.1-dev.202406121156
{ | ||
"name": "@aurelia/router-lite", | ||
"version": "2.0.1-dev.202405230048", | ||
"version": "2.0.1-dev.202406121156", | ||
"main": "dist/cjs/index.cjs", | ||
@@ -57,9 +57,9 @@ "module": "dist/esm/index.mjs", | ||
"dependencies": { | ||
"@aurelia/kernel": "2.0.1-dev.202405230048", | ||
"@aurelia/metadata": "2.0.1-dev.202405230048", | ||
"@aurelia/platform": "2.0.1-dev.202405230048", | ||
"@aurelia/platform-browser": "2.0.1-dev.202405230048", | ||
"@aurelia/route-recognizer": "2.0.1-dev.202405230048", | ||
"@aurelia/runtime": "2.0.1-dev.202405230048", | ||
"@aurelia/runtime-html": "2.0.1-dev.202405230048" | ||
"@aurelia/kernel": "2.0.1-dev.202406121156", | ||
"@aurelia/metadata": "2.0.1-dev.202406121156", | ||
"@aurelia/platform": "2.0.1-dev.202406121156", | ||
"@aurelia/platform-browser": "2.0.1-dev.202406121156", | ||
"@aurelia/route-recognizer": "2.0.1-dev.202406121156", | ||
"@aurelia/runtime": "2.0.1-dev.202406121156", | ||
"@aurelia/runtime-html": "2.0.1-dev.202406121156" | ||
}, | ||
@@ -66,0 +66,0 @@ "devDependencies": { |
@@ -13,2 +13,3 @@ import { Metadata } from '@aurelia/metadata'; | ||
import { Events, getMessage } from './events'; | ||
import { RESIDUE } from '@aurelia/route-recognizer'; | ||
@@ -140,4 +141,3 @@ export const noRoutes = emptyArray as RouteConfig['routes']; | ||
public _getTransitionPlan(cur: RouteNode, next: RouteNode, overridingTransitionPlan: TransitionPlan | null) { | ||
const hasSameParameters = shallowEquals(cur.params, next.params); | ||
if (hasSameParameters) return 'none'; | ||
if (hasSamePath(cur, next) && shallowEquals(cur.params, next.params)) return 'none'; | ||
@@ -148,2 +148,11 @@ if (overridingTransitionPlan != null) return overridingTransitionPlan; | ||
return typeof plan === 'function' ? plan(cur, next) : plan; | ||
function cleanPath(path: string): string { return path.replace(`/*${RESIDUE}`, ''); } | ||
function hasSamePath(nodeA: RouteNode, nodeB: RouteNode): boolean { | ||
const pathA = nodeA.finalPath; | ||
const pathB = nodeB.finalPath; | ||
// As this function is invoked when the components are same, we are giving a benefit of doubt for empty paths. | ||
// It is seems like a sensible assumption that a transition from '' to '/p1' (assuming p1 is same as the empty path) does not require a non-none transition. | ||
return pathA.length === 0 || pathB.length === 0 || cleanPath(pathA) === cleanPath(pathB); | ||
} | ||
} | ||
@@ -150,0 +159,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2062882
34986
+ Added@aurelia/expression-parser@2.0.1-dev.202406121156(transitive)
+ Added@aurelia/kernel@2.0.1-dev.202406121156(transitive)
+ Added@aurelia/metadata@2.0.1-dev.202406121156(transitive)
+ Added@aurelia/platform@2.0.1-dev.202406121156(transitive)
+ Added@aurelia/platform-browser@2.0.1-dev.202406121156(transitive)
+ Added@aurelia/route-recognizer@2.0.1-dev.202406121156(transitive)
+ Added@aurelia/runtime@2.0.1-dev.202406121156(transitive)
+ Added@aurelia/runtime-html@2.0.1-dev.202406121156(transitive)
+ Added@aurelia/template-compiler@2.0.1-dev.202406121156(transitive)
- Removed@aurelia/expression-parser@2.0.1-dev.202405230048(transitive)
- Removed@aurelia/kernel@2.0.1-dev.202405230048(transitive)
- Removed@aurelia/metadata@2.0.1-dev.202405230048(transitive)
- Removed@aurelia/platform@2.0.1-dev.202405230048(transitive)
- Removed@aurelia/platform-browser@2.0.1-dev.202405230048(transitive)
- Removed@aurelia/route-recognizer@2.0.1-dev.202405230048(transitive)
- Removed@aurelia/runtime@2.0.1-dev.202405230048(transitive)
- Removed@aurelia/runtime-html@2.0.1-dev.202405230048(transitive)
- Removed@aurelia/template-compiler@2.0.1-dev.202405230048(transitive)