remove escape-string-regexp dependency

This commit is contained in:
silverwind 2019-06-29 15:31:25 +02:00
parent 7795eca9a3
commit ef0199e9be
Signed by: silverwind
GPG Key ID: 2E62B41C93869443
2 changed files with 4 additions and 2 deletions

@ -28,7 +28,6 @@
],
"dependencies": {
"chalk": "2.4.2",
"escape-string-regexp": "2.0.0",
"find-up": "4.1.0",
"hosted-git-info": "2.7.1",
"make-fetch-happen": "4.0.1",

@ -206,6 +206,10 @@ function memoize(fn) {
return arg => cache[arg] || (cache[arg] = fn(arg));
}
function esc(str) {
return str.replace(/[|\\{}()[\]^$+*?.-]/g, "\\$&");
}
function getAuthAndRegistry(name, registry) {
if (!name.startsWith("@")) {
return [registryAuthToken(registry), registry];
@ -400,7 +404,6 @@ function formatDeps() {
}
function updatePkg() {
const esc = require("escape-string-regexp");
let newPkgStr = pkgStr;
for (const dep of Object.keys(deps)) {