Skip to content

Commit

Permalink
Replace lodash 'escapeRegExp' with escape-string-regexp library (#11842)
Browse files Browse the repository at this point in the history
* Replace lodash 'escapeRegExp' with escape-string-regexp library

* Update yarn.lock
  • Loading branch information
jayaddison committed Jul 20, 2020
1 parent e9493a4 commit e2b33c2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/babel-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@babel/types": "workspace:^7.10.4",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"escape-string-regexp": "^4.0.0",
"gensync": "^1.0.0-beta.1",
"json5": "^2.1.2",
"lodash": "^4.17.13",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-core/src/config/pattern-to-regex.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow
import path from "path";
import escapeRegExp from "lodash/escapeRegExp";
import escapeRegExp from "escape-string-regexp";

const sep = `\\${path.sep}`;
const endSep = `(?:${sep}|$)`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@babel/helper-fixtures": "workspace:^7.10.4",
"@babel/polyfill": "workspace:^7.10.4",
"babel-check-duplicated-nodes": "^1.0.0",
"escape-string-regexp": "^4.0.0",
"jest": "^25.1.0",
"jest-diff": "^25.1.0",
"lodash": "^4.17.13",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import sourceMap from "source-map";
import { codeFrameColumns } from "@babel/code-frame";
import defaults from "lodash/defaults";
import includes from "lodash/includes";
import escapeRegExp from "lodash/escapeRegExp";
import escapeRegExp from "escape-string-regexp";
import * as helpers from "./helpers";
import extend from "lodash/extend";
import merge from "lodash/merge";
Expand Down
1 change: 1 addition & 0 deletions packages/babel-register/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"./lib/node.js": "./lib/browser.js"
},
"dependencies": {
"escape-string-regexp": "^4.0.0",
"find-cache-dir": "^3.2.0",
"lodash": "^4.17.13",
"pirates": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-register/src/node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import deepClone from "lodash/cloneDeep";
import sourceMapSupport from "source-map-support";
import * as registerCache from "./cache";
import escapeRegExp from "lodash/escapeRegExp";
import escapeRegExp from "escape-string-regexp";
import * as babel from "@babel/core";
import { OptionManager, DEFAULT_EXTENSIONS } from "@babel/core";
import { addHook } from "pirates";
Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ __metadata:
"@babel/types": "workspace:^7.10.4"
convert-source-map: ^1.7.0
debug: ^4.1.0
escape-string-regexp: ^4.0.0
gensync: ^1.0.0-beta.1
json5: ^2.1.2
lodash: ^4.17.13
Expand Down Expand Up @@ -963,6 +964,7 @@ __metadata:
"@babel/helper-fixtures": "workspace:^7.10.4"
"@babel/polyfill": "workspace:^7.10.4"
babel-check-duplicated-nodes: ^1.0.0
escape-string-regexp: ^4.0.0
jest: ^25.1.0
jest-diff: ^25.1.0
lodash: ^4.17.13
Expand Down Expand Up @@ -3355,6 +3357,7 @@ __metadata:
"@babel/plugin-transform-modules-commonjs": "workspace:^7.10.4"
browserify: 16.5.0
default-require-extensions: ^2.0.0
escape-string-regexp: ^4.0.0
find-cache-dir: ^3.2.0
lodash: ^4.17.13
pirates: ^4.0.0
Expand Down Expand Up @@ -8368,6 +8371,13 @@ __metadata:
languageName: node
linkType: hard

"escape-string-regexp@npm:^4.0.0":
version: 4.0.0
resolution: "escape-string-regexp@npm:4.0.0"
checksum: c747be8d5ff7873127e3e0cffe7d2206a37208077fa9c30a3c1bb4f26bebd081c8c24d5fba7a99449f9d20670bea3dc5e1b6098b0f074b099bd38766271a272f
languageName: node
linkType: hard

"escodegen@npm:^1.11.1":
version: 1.14.1
resolution: "escodegen@npm:1.14.1"
Expand Down

0 comments on commit e2b33c2

Please sign in to comment.