@renovatebot/pep440
Advanced tools
Comparing version 2.1.5 to 2.1.6
@@ -13,3 +13,3 @@ // This file is dual licensed under the terms of the Apache License, Version | ||
"(", | ||
/* */ "(?<version>(" + VERSION_PATTERN.replace(/\?<\w+>/g, "?:") + "))", | ||
/* */ "(?<version>(?:" + VERSION_PATTERN.replace(/\?<\w+>/g, "?:") + "))", | ||
/* */ "(?<prefix>\\.\\*)?", | ||
@@ -129,2 +129,16 @@ /* */ "|", | ||
function arrayStartsWith(array, prefix) { | ||
if (prefix.length > array.length) { | ||
return false; | ||
} | ||
for (let i = 0; i < prefix.length; i += 1) { | ||
if (prefix[i] !== array[i]) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
function contains(specifier, input) { | ||
@@ -152,3 +166,7 @@ const { explained } = input; | ||
if (spec.prefix) { | ||
return version.startsWith(spec.version) === (spec.operator === "=="); | ||
const isMatching = | ||
explained.epoch === spec.epoch && | ||
arrayStartsWith(explained.release, spec.release); | ||
const isEquality = spec.operator !== "!="; | ||
return isEquality ? isMatching : !isMatching; | ||
} | ||
@@ -155,0 +173,0 @@ |
{ | ||
"name": "@renovatebot/pep440", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "PEP440 implementation in JavaScript", | ||
@@ -36,3 +36,3 @@ "main": "index.js", | ||
"conventional-changelog-conventionalcommits": "5.0.0", | ||
"eslint": "8.22.0", | ||
"eslint": "8.29.0", | ||
"eslint-config-airbnb-base": "15.0.0", | ||
@@ -42,7 +42,7 @@ "eslint-config-prettier": "8.5.0", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"eslint-plugin-promise": "6.0.0", | ||
"husky": "8.0.1", | ||
"eslint-plugin-promise": "6.1.1", | ||
"husky": "8.0.2", | ||
"jest": "28.1.3", | ||
"npm-run-all": "4.1.5", | ||
"prettier": "2.7.1", | ||
"prettier": "2.8.1", | ||
"pretty-quick": "3.1.3", | ||
@@ -49,0 +49,0 @@ "semantic-release": "19.0.5" |
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
34719
742