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 authored and nicolo-ribaudo committed Sep 1, 2020
1 parent f2e0cff commit 4e5de65
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.11.0",
"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.19",
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.5",
"@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.19",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import getFixtures from "@babel/helper-fixtures";
import sourceMap from "source-map";
import { codeFrameColumns } from "@babel/code-frame";
import defaults from "lodash/defaults";
import escapeRegExp from "lodash/escapeRegExp";
import escapeRegExp from "escape-string-regexp";
import * as helpers from "./helpers";
import merge from "lodash/merge";
import assert from "assert";
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.19",
"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 @@ -139,6 +139,7 @@ __metadata:
"@babel/types": "workspace:^7.11.0"
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.19
Expand Down Expand Up @@ -771,6 +772,7 @@ __metadata:
"@babel/helper-fixtures": "workspace:^7.10.5"
"@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.19
Expand Down Expand Up @@ -3129,6 +3131,7 @@ __metadata:
"@babel/plugin-transform-modules-commonjs": "workspace:^7.10.4"
browserify: ^16.5.2
default-require-extensions: ^2.0.0
escape-string-regexp: ^4.0.0
find-cache-dir: ^3.2.0
lodash: ^4.17.19
pirates: ^4.0.0
Expand Down Expand Up @@ -8071,6 +8074,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.3
resolution: "escodegen@npm:1.14.3"
Expand Down

0 comments on commit 4e5de65

Please sign in to comment.