urlpattern-polyfill
Advanced tools
Comparing version 4.0.3 to 5.0.0
@@ -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", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7
85773
2477