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

urlpattern-polyfill

Package Overview
Dependencies
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urlpattern-polyfill - npm Package Compare versions

Comparing version 6.0.1 to 6.0.2

29

dist/urlpattern.js

@@ -451,3 +451,6 @@ // src/path-to-regex-modified.ts

const leadingSlash = pathname[0] == "/";
pathname = new URL(!leadingSlash ? "/-" + pathname : pathname, "https://example.com").pathname;
pathname = new URL(
!leadingSlash ? "/-" + pathname : pathname,
"https://example.com"
).pathname;
if (!leadingSlash) {

@@ -869,2 +872,8 @@ pathname = pathname.substring(2, pathname.length);

}
function processBaseURLString(input, isPattern) {
if (!isPattern) {
return input;
}
return escapePatternString(input);
}
function applyInit(o, init, isPattern) {

@@ -875,10 +884,10 @@ let baseURL;

baseURL = new URL(init.baseURL);
o.protocol = baseURL.protocol ? baseURL.protocol.substring(0, baseURL.protocol.length - 1) : "";
o.username = baseURL.username;
o.password = baseURL.password;
o.hostname = baseURL.hostname;
o.port = baseURL.port;
o.pathname = baseURL.pathname;
o.search = baseURL.search ? baseURL.search.substring(1, baseURL.search.length) : "";
o.hash = baseURL.hash ? baseURL.hash.substring(1, baseURL.hash.length) : "";
o.protocol = processBaseURLString(baseURL.protocol.substring(0, baseURL.protocol.length - 1), isPattern);
o.username = processBaseURLString(baseURL.username, isPattern);
o.password = processBaseURLString(baseURL.password, isPattern);
o.hostname = processBaseURLString(baseURL.hostname, isPattern);
o.port = processBaseURLString(baseURL.port, isPattern);
o.pathname = processBaseURLString(baseURL.pathname, isPattern);
o.search = processBaseURLString(baseURL.search.substring(1, baseURL.search.length), isPattern);
o.hash = processBaseURLString(baseURL.hash.substring(1, baseURL.hash.length), isPattern);
} catch {

@@ -908,3 +917,3 @@ throw new TypeError(`invalid baseURL '${init.baseURL}'.`);

if (slashIndex >= 0) {
o.pathname = baseURL.pathname.substring(0, slashIndex + 1) + o.pathname;
o.pathname = processBaseURLString(baseURL.pathname.substring(0, slashIndex + 1), isPattern) + o.pathname;
}

@@ -911,0 +920,0 @@ }

{
"name": "urlpattern-polyfill",
"version": "6.0.1",
"version": "6.0.2",
"description": "Polyfill for the URLPattern API",

@@ -42,7 +42,7 @@ "repository": {

"@ava/typescript": "^3.0.1",
"ava": "^4.1.0",
"ava": "^5.1.0",
"esbuild": "^0.14.31",
"rimraf": "^3.0.2",
"typescript": "^4.7.2",
"wireit": "^0.4.3"
"wireit": "^0.7.3"
},

@@ -141,3 +141,6 @@ "ava": {

"author": "",
"license": "MIT"
"license": "MIT",
"dependencies": {
"braces": "^3.0.2"
}
}

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