tweaks
This commit is contained in:
parent
8262307302
commit
ef43d4e57d
1
.yarnrc
Normal file
1
.yarnrc
Normal file
@ -0,0 +1 @@
|
||||
--install.no-lockfile true
|
@ -28,7 +28,7 @@ const stripRe = /^.*?:\/\/(.*?@)?(github\.com[:/])/i;
|
||||
const partsRe = /^([^/]+)\/([^/#]+)?.*?([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i;
|
||||
const hashRe = /^[0-9a-f]+$/i;
|
||||
|
||||
const memoize = (fn) => {
|
||||
const memoize = fn => {
|
||||
const cache = {};
|
||||
return (arg, arg2) => cache[arg] || (cache[arg] = fn(arg, arg2));
|
||||
};
|
||||
@ -37,6 +37,7 @@ const esc = str => str.replace(/[|\\{}()[\]^$+*?.-]/g, "\\$&");
|
||||
const gitInfo = memoize(fromUrl);
|
||||
const registryAuthToken = memoize(rat);
|
||||
const registryUrl = memoize(ru);
|
||||
const normalizeRegistryUrl = memoize(url => url.endsWith("/") ? url.substring(0, url.length - 1) : url);
|
||||
|
||||
const args = minimist(process.argv.slice(2), {
|
||||
boolean: [
|
||||
@ -165,7 +166,7 @@ if (args.file) {
|
||||
} else {
|
||||
packageFile = findUp.sync("package.json");
|
||||
if (!packageFile) {
|
||||
finish(new Error(`Unable to find package.json in ${process.cwd()} or any of its parent directories`));
|
||||
finish(new Error(`Unable to find package.json in working directory or any of its parents`));
|
||||
}
|
||||
}
|
||||
|
||||
@ -354,10 +355,6 @@ function write(file, content) {
|
||||
}
|
||||
}
|
||||
|
||||
function normalizeRegistryUrl(url) {
|
||||
return url.endsWith("/") ? url.substring(0, url.length - 1) : url;
|
||||
}
|
||||
|
||||
function highlightDiff(a, b, added) {
|
||||
const aParts = a.split(/\./);
|
||||
const bParts = b.split(/\./);
|
||||
|
Loading…
Reference in New Issue
Block a user