From 9ff5d66b731e8acca2aa26c8d44e5a030b3902c9 Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Sun, 17 Mar 2019 10:39:44 -0400 Subject: [PATCH] feat: Rename `plugins` option to `parser-plugins`. The original option name created confusion about what was expected. This helps identify that babel parser plugins are expected, not babel transform plugins. BREAKING CHANGE: The `plugins` option has been renamed to `parser-plugins`. Fixes #986 --- index.js | 2 +- lib/hash.js | 2 +- lib/instrumenters/istanbul.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 296733ac6..53fa6254e 100755 --- a/index.js +++ b/index.js @@ -137,7 +137,7 @@ NYC.prototype._createInstrumenter = function () { compact: this.config.compact, preserveComments: this.config.preserveComments, esModules: this.config.esModules, - plugins: this.config.plugins + plugins: this.config.parserPlugins }) } diff --git a/lib/hash.js b/lib/hash.js index 02f605715..ebf6c7d3a 100644 --- a/lib/hash.js +++ b/lib/hash.js @@ -7,7 +7,7 @@ function getInvalidatingOptions (config) { 'ignoreClassMethods', 'instrument', 'instrumenter', - 'plugins', + 'parserPlugins', 'preserveComments', 'produceSourceMap', 'sourceMap' diff --git a/lib/instrumenters/istanbul.js b/lib/instrumenters/istanbul.js index 5e823a431..7e8dd8f91 100644 --- a/lib/instrumenters/istanbul.js +++ b/lib/instrumenters/istanbul.js @@ -5,7 +5,7 @@ const convertSourceMap = require('convert-source-map') const mergeSourceMap = require('merge-source-map') function InstrumenterIstanbul (cwd, options) { - const plugins = options.plugins + const plugins = options.parserPlugins const configPlugins = plugins ? { plugins } : {} const instrumenter = createInstrumenter(Object.assign({