lockfile-lint-api
Advanced tools
Comparing version 5.1.2 to 5.1.5
@@ -6,2 +6,25 @@ # Change Log | ||
## [5.1.5](https://github.com/lirantal/lockfile-lint/compare/lockfile-lint-api@5.1.2...lockfile-lint-api@5.1.5) (2020-05-13) | ||
### Bug Fixes | ||
* **hostvalidator:** support full urls for host ([#88](https://github.com/lirantal/lockfile-lint/issues/88)) ([d0002e7](https://github.com/lirantal/lockfile-lint/commit/d0002e7)) | ||
* bump package ver that skipped releases ([7d239ca](https://github.com/lirantal/lockfile-lint/commit/7d239ca)) | ||
## [5.1.3](https://github.com/lirantal/lockfile-lint/compare/lockfile-lint-api@5.1.2...lockfile-lint-api@5.1.3) (2020-04-30) | ||
### Bug Fixes | ||
* **hostvalidator:** support full urls for host ([#88](https://github.com/lirantal/lockfile-lint/issues/88)) ([d0002e7](https://github.com/lirantal/lockfile-lint/commit/d0002e7)) | ||
## [5.1.2](https://github.com/lirantal/lockfile-lint/compare/lockfile-lint-api@5.1.1...lockfile-lint-api@5.1.2) (2020-03-25) | ||
@@ -8,0 +31,0 @@ |
{ | ||
"name": "lockfile-lint-api", | ||
"version": "5.1.2", | ||
"version": "5.1.5", | ||
"description": "Lint an npm or yarn lockfile to analyze and detect issues", | ||
@@ -177,3 +177,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "6241cad1f1430cf544cd3cea522ed5fba98783d2" | ||
"gitHead": "a9bf2112535cb68c71d50b9f0c326147aa50cdda" | ||
} |
@@ -33,5 +33,14 @@ 'use strict' | ||
const packageResolvedURL = new URL(packageMetadata.resolved) | ||
const allowedHosts = hosts.map(hostValue => { | ||
const allowedHosts = hosts.map(allowedHost => { | ||
// eslint-disable-next-line security/detect-object-injection | ||
return REGISTRY[hostValue] ? REGISTRY[hostValue] : hostValue | ||
const host = REGISTRY[allowedHost] ? REGISTRY[allowedHost] : allowedHost | ||
let hostValue | ||
try { | ||
const parsedHost = new URL(host) | ||
hostValue = parsedHost.host | ||
} catch (error) { | ||
hostValue = host | ||
} | ||
return hostValue | ||
}) | ||
@@ -38,0 +47,0 @@ const isPassing = allowedHosts.includes(packageResolvedURL.host) |
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
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
45066
383