Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/component-base

Package Overview
Dependencies
Maintainers
12
Versions
410
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/component-base - npm Package Compare versions

Comparing version 24.5.0-alpha9 to 24.5.0-beta1

6

package.json
{
"name": "@vaadin/component-base",
"version": "24.5.0-alpha9",
"version": "24.5.0-beta1",
"publishConfig": {

@@ -41,7 +41,7 @@ "access": "public"

"devDependencies": {
"@vaadin/chai-plugins": "24.5.0-alpha9",
"@vaadin/chai-plugins": "24.5.0-beta1",
"@vaadin/testing-helpers": "^1.0.0",
"sinon": "^18.0.0"
},
"gitHead": "804744762f3bec0a2247c4bbcbbb204dbcd78bc0"
"gitHead": "da4b57724d7089e3766d59d01068159322adb2b8"
}

@@ -12,3 +12,3 @@ /**

get() {
return '24.5.0-alpha9';
return '24.5.0-beta1';
},

@@ -15,0 +15,0 @@ });

@@ -22,5 +22,2 @@ /**

/**
* @param {HTMLElement} host
*/
constructor(query: string, callback: (matches: boolean) => void);

@@ -27,0 +24,0 @@

@@ -30,4 +30,5 @@ /**

* @param {string} expected The expected URL to match.
* @param {Object} matchOptions Options for path matching.
*/
export function matchPaths(actual, expected) {
export function matchPaths(actual, expected, matchOptions = { matchNested: false }) {
const base = document.baseURI;

@@ -37,7 +38,8 @@ const actualUrl = new URL(actual, base);

return (
actualUrl.origin === expectedUrl.origin &&
actualUrl.pathname === expectedUrl.pathname &&
containsQueryParams(actualUrl.searchParams, expectedUrl.searchParams)
);
const matchesOrigin = actualUrl.origin === expectedUrl.origin;
const matchesPath = matchOptions.matchNested
? actualUrl.pathname === expectedUrl.pathname || actualUrl.pathname.startsWith(`${expectedUrl.pathname}/`)
: actualUrl.pathname === expectedUrl.pathname;
return matchesOrigin && matchesPath && containsQueryParams(actualUrl.searchParams, expectedUrl.searchParams);
}
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