stricter hash parsing from git url
This commit is contained in:
parent
ea78984908
commit
8184f6c806
@ -8,7 +8,8 @@
|
|||||||
"jpeg-buffer-orientation": "0.0.0",
|
"jpeg-buffer-orientation": "0.0.0",
|
||||||
"styled-components": "2.5.0-1",
|
"styled-components": "2.5.0-1",
|
||||||
"@babel/preset-env": "7.0.0",
|
"@babel/preset-env": "7.0.0",
|
||||||
"updates": "https://github.com/silverwind/updates/tarball/6941e05"
|
"updates": "https://github.com/silverwind/updates/tarball/6941e05",
|
||||||
|
"ipaddr.js": "https://github.com/silverwind/ipaddr.js/tarball/ipv6_cidrs_take2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"updates": "file:."
|
"updates": "file:."
|
||||||
|
@ -25,8 +25,8 @@ const cwd = cwdFn();
|
|||||||
// regexes for url dependencies. does only github and only hash or exact semver
|
// regexes for url dependencies. does only github and only hash or exact semver
|
||||||
// https://regex101.com/r/gCZzfK/2
|
// https://regex101.com/r/gCZzfK/2
|
||||||
const stripRe = /^.*?:\/\/(.*?@)?(github\.com[:/])/i;
|
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 hashRe = /^[0-9a-f]{7,}$/i;
|
||||||
|
|
||||||
const memoize = fn => {
|
const memoize = fn => {
|
||||||
const cache = {};
|
const cache = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user