Socket
Socket
Sign inDemoInstall

@aurelia/router-lite

Package Overview
Dependencies
Maintainers
1
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurelia/router-lite - npm Package Compare versions

Comparing version 2.0.1-dev.202405230048 to 2.0.1-dev.202406121156

16

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc