fix regex for repos with dots

This commit is contained in:
silverwind 2019-12-07 19:50:24 +01:00
parent b243856cd4
commit 03cb2ed0d9
Signed by: silverwind
GPG Key ID: 2E62B41C93869443

@ -6,9 +6,9 @@ const MAX_SOCKETS = 64;
const sep = "\0";
// regexes for url dependencies. does only github and only hash or exact semver
// https://regex101.com/r/gCZzfK/1
// https://regex101.com/r/gCZzfK/2
const stripRe = /^.*?:\/\/(.*?@)?(github\.com[:/])/i;
const partsRe = /^([^/]+)\/([^/#.]+)?.*?([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i;
const partsRe = /^([^/]+)\/([^/#]+)?.*?([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i;
const hashRe = /^[0-9a-f]+$/i;
const args = require("minimist")(process.argv.slice(2), {