remove ignoreRegex fallback

This commit is contained in:
Sebastian McKenzie 2015-01-14 15:06:12 +11:00
parent 5c575ebf8f
commit 59d6400eb9
2 changed files with 1 additions and 2 deletions

View File

@ -16,6 +16,7 @@ _Note: Gaps between patch versions are faulty/broken releases._
* **Breaking Change**
* `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.
* `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).
## 2.12.0

View File

@ -132,8 +132,6 @@ hookExtensions([".es6", ".es", ".js"]);
module.exports = function (opts) {
// normalise options
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.ignore != null) ignoreRegex = util.regexify(opts.ignore);