@renovatebot/pep440
Advanced tools
Comparing version 1.1.2 to 2.0.0
@@ -5,3 +5,2 @@ // This file is dual licensed under the terms of the Apache License, Version | ||
const XRegExp = require("xregexp"); | ||
const { VERSION_PATTERN, explain: explainVersion } = require("./version"); | ||
@@ -34,3 +33,3 @@ | ||
const rangeRegex = new XRegExp("^" + RANGE_PATTERN + "$", "i"); | ||
const rangeRegex = new RegExp("^" + RANGE_PATTERN + "$", "i"); | ||
@@ -44,4 +43,4 @@ function parse(ranges) { | ||
.split(",") | ||
.map((range) => XRegExp.exec(range.trim(), rangeRegex)) | ||
.map((groups) => { | ||
.map((range) => rangeRegex.exec(range.trim()) || {}) | ||
.map(({ groups }) => { | ||
if (!groups) { | ||
@@ -48,0 +47,0 @@ return null; |
@@ -1,3 +0,1 @@ | ||
const XRegExp = require("xregexp"); | ||
const VERSION_PATTERN = [ | ||
@@ -43,3 +41,3 @@ "v?", | ||
const validRegex = new XRegExp("^" + VERSION_PATTERN + "$", "i"); | ||
const validRegex = new RegExp("^" + VERSION_PATTERN + "$", "i"); | ||
@@ -50,3 +48,3 @@ function valid(version) { | ||
const cleanRegex = new XRegExp("^\\s*" + VERSION_PATTERN + "\\s*$", "i"); | ||
const cleanRegex = new RegExp("^\\s*" + VERSION_PATTERN + "\\s*$", "i"); | ||
function clean(version) { | ||
@@ -58,3 +56,3 @@ return stringify(parse(version, cleanRegex)); | ||
// Validate the version and parse it into pieces | ||
const groups = XRegExp.exec(version, regex || validRegex); | ||
const { groups } = (regex || validRegex).exec(version) || {}; | ||
if (!groups) { | ||
@@ -61,0 +59,0 @@ return null; |
{ | ||
"name": "@renovatebot/pep440", | ||
"version": "1.1.2", | ||
"version": "2.0.0", | ||
"description": "PEP440 implementation in JavaScript", | ||
@@ -28,2 +28,6 @@ "main": "index.js", | ||
"homepage": "https://github.com/renovatebot/pep440#readme", | ||
"engines": { | ||
"node": "^14.15.0 || >=16.13.0", | ||
"yarn": "^1.17.0" | ||
}, | ||
"devDependencies": { | ||
@@ -59,6 +63,3 @@ "codecov": "3.8.2", | ||
"index.d.ts" | ||
], | ||
"dependencies": { | ||
"xregexp": "4.4.1" | ||
} | ||
] | ||
} |
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
0
34137
722
- Removedxregexp@4.4.1
- Removed@babel/runtime-corejs3@7.26.0(transitive)
- Removedcore-js-pure@3.39.0(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
- Removedxregexp@4.4.1(transitive)