remove escape-string-regexp dependency
This commit is contained in:
parent
7795eca9a3
commit
ef0199e9be
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user