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 4.0.3 to 5.0.0

dist/types.d.ts

55

dist/index.d.ts

@@ -1,53 +0,8 @@

export {};
import type * as Types from "./types";
declare global {
type URLPatternInput = URLPatternInit | string;
class URLPattern {
constructor(init?: URLPatternInput, baseURL?: string);
test(input?: URLPatternInput, baseURL?: string): boolean;
exec(input?: URLPatternInput, baseURL?: string): URLPatternResult | null;
readonly protocol: string;
readonly username: string;
readonly password: string;
readonly hostname: string;
readonly port: string;
readonly pathname: string;
readonly search: string;
readonly hash: string;
}
interface URLPatternInit {
baseURL?: string;
username?: string;
password?: string;
protocol?: string;
hostname?: string;
port?: string;
pathname?: string;
search?: string;
hash?: string;
}
interface URLPatternResult {
inputs: [URLPatternInput];
protocol: URLPatternComponentResult;
username: URLPatternComponentResult;
password: URLPatternComponentResult;
hostname: URLPatternComponentResult;
port: URLPatternComponentResult;
pathname: URLPatternComponentResult;
search: URLPatternComponentResult;
hash: URLPatternComponentResult;
}
interface URLPatternComponentResult {
input: string;
groups: {
[key: string]: string | undefined;
};
}
class URLPattern extends Types.URLPattern {}
type URLPatternInit = Types.URLPatternInit;
type URLPatternResult = Types.URLPatternResult;
type URLPatternComponentResult = Types.URLPatternComponentResult;
}
{
"name": "urlpattern-polyfill",
"version": "4.0.3",
"version": "5.0.0",
"description": "Polyfill for the URLPattern API",

@@ -10,8 +10,14 @@ "repository": {

"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"main": "./index.cjs",
"module": "./index.js",
"types": "./dist/index.d.ts",
"exports": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
"./urlpattern": {
"import": "./dist/urlpattern.js",
"require": "./dist/urlpattern.cjs"
},
".": {
"import": "./index.js",
"require": "./index.cjs"
}
},

@@ -52,7 +58,7 @@ "tags": [

"prebuild": "rimraf dist",
"build:esm": "esbuild --bundle --format=esm src/patch-global.mts --outfile=dist/index.js",
"build:cjs": "esbuild --bundle --format=cjs src/patch-global.cts --outfile=dist/index.cjs",
"copy:dts": "cp ./src/index.d.ts ./dist",
"build:esm": "esbuild --bundle --format=esm src/url-pattern.ts --outfile=dist/urlpattern.js",
"build:cjs": "esbuild --bundle --format=cjs src/url-pattern.ts --outfile=dist/urlpattern.cjs",
"copy:dts": "cp ./src/index.d.ts ./src/types.d.ts ./dist",
"build": "npm run build:esm && npm run build:cjs && npm run copy:dts",
"pretest": "npm run build",
"pretest": "npm run build; rm -rf node_modules/urlpattern-polyfill; ln -s $(pwd) node_modules/urlpattern-polyfill",
"test": "ava --fail-fast -s",

@@ -59,0 +65,0 @@ "manual-test": "npx http-server -o /index.html -p 4203",

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