remove ignoreRegex fallback
This commit is contained in:
parent
5c575ebf8f
commit
59d6400eb9
@ -16,6 +16,7 @@ _Note: Gaps between patch versions are faulty/broken releases._
|
|||||||
* **Breaking Change**
|
* **Breaking Change**
|
||||||
* `allowImportExportEverywhere` acorn option has been disabled for spec compliancy so imports and exports can **only** be present at the top level.
|
* `allowImportExportEverywhere` acorn option has been disabled for spec compliancy so imports and exports can **only** be present at the top level.
|
||||||
* Caching is now always enabled for the require hook. It also now no longer caches require resolutions.
|
* Caching is now always enabled for the require hook. It also now no longer caches require resolutions.
|
||||||
|
* `ignoreRegex` fallback has now been dropped from the require hook. `register(/foo/);`, `register({ ignoreRegex: /foo/ })` -> `register({ ignore: /foo/ })`.
|
||||||
* Optional fast transformer backwards compatibility support has been removed. Use [loose mode](https://6to5.org/docs/usage/loose).
|
* Optional fast transformer backwards compatibility support has been removed. Use [loose mode](https://6to5.org/docs/usage/loose).
|
||||||
|
|
||||||
## 2.12.0
|
## 2.12.0
|
||||||
|
|||||||
@ -132,8 +132,6 @@ hookExtensions([".es6", ".es", ".js"]);
|
|||||||
module.exports = function (opts) {
|
module.exports = function (opts) {
|
||||||
// normalise options
|
// normalise options
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
if (_.isRegExp(opts)) opts = { ignore: opts };
|
|
||||||
if (opts.ignoreRegex != null) opts.ignore = opts.ignoreRegex;
|
|
||||||
|
|
||||||
if (opts.only != null) onlyRegex = util.regexify(opts.only);
|
if (opts.only != null) onlyRegex = util.regexify(opts.only);
|
||||||
if (opts.ignore != null) ignoreRegex = util.regexify(opts.ignore);
|
if (opts.ignore != null) ignoreRegex = util.regexify(opts.ignore);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user