lockfile-lint-api
Advanced tools
Comparing version 5.0.8 to 5.0.9
@@ -6,2 +6,13 @@ # Change Log | ||
## [5.0.9](https://github.com/lirantal/lockfile-lint/compare/lockfile-lint-api@5.0.8...lockfile-lint-api@5.0.9) (2020-02-04) | ||
### Bug Fixes | ||
* **validators:** only validating when URL is present ([#59](https://github.com/lirantal/lockfile-lint/issues/59)) ([dcf4e40](https://github.com/lirantal/lockfile-lint/commit/dcf4e40)), closes [#53](https://github.com/lirantal/lockfile-lint/issues/53) | ||
## [5.0.8](https://github.com/lirantal/lockfile-lint/compare/lockfile-lint-api@5.0.7...lockfile-lint-api@5.0.8) (2020-02-03) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "lockfile-lint-api", | ||
"version": "5.0.8", | ||
"version": "5.0.9", | ||
"description": "Lint an npm or yarn lockfile to analyze and detect issues", | ||
@@ -177,3 +177,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "8b00015c273507f966327be1fab9a9e935d56607" | ||
"gitHead": "e741421f79066beda8021a50af8bbecdcc8c3090" | ||
} |
@@ -31,14 +31,14 @@ 'use strict' | ||
packageResolvedURL = new URL(packageMetadata.resolved) | ||
if (packageResolvedURL.protocol !== HTTPS_PROTOCOL) { | ||
validationResult.errors.push({ | ||
message: `detected invalid protocol for package: ${packageName}\n expected: ${HTTPS_PROTOCOL}\n actual: ${ | ||
packageResolvedURL.protocol | ||
}\n`, | ||
package: packageName | ||
}) | ||
} | ||
} catch (error) { | ||
// swallow error (assume that the version is correct) | ||
} | ||
if (packageResolvedURL.protocol !== HTTPS_PROTOCOL) { | ||
validationResult.errors.push({ | ||
message: `detected invalid protocol for package: ${packageName}\n expected: ${HTTPS_PROTOCOL}\n actual: ${ | ||
packageResolvedURL.protocol | ||
}\n`, | ||
package: packageName | ||
}) | ||
} | ||
} | ||
@@ -45,0 +45,0 @@ |
@@ -33,15 +33,14 @@ 'use strict' | ||
packageResolvedURL = new URL(packageMetadata.resolved) | ||
if (packageResolvedURL.protocol && schemes.indexOf(packageResolvedURL.protocol) === -1) { | ||
validationResult.errors.push({ | ||
message: `detected invalid scheme(s) for package: ${packageName}\n expected: ${schemes}\n actual: ${ | ||
packageResolvedURL.protocol | ||
}\n`, | ||
package: packageName | ||
}) | ||
} | ||
} catch (error) { | ||
// swallow error (assume that the version is correct) | ||
} | ||
if (packageResolvedURL.protocol && schemes.indexOf(packageResolvedURL.protocol) === -1) { | ||
// throw new Error(`detected invalid origin for package: ${packageName}`) | ||
validationResult.errors.push({ | ||
message: `detected invalid scheme(s) for package: ${packageName}\n expected: ${schemes}\n actual: ${ | ||
packageResolvedURL.protocol | ||
}\n`, | ||
package: packageName | ||
}) | ||
} | ||
} | ||
@@ -48,0 +47,0 @@ |
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
40747
325