Skip to content

Commit

Permalink
feat: Rename plugins option to parser-plugins. (#1031)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
coreyfarrell committed Mar 18, 2019
1 parent aae5a59 commit 2867538
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -136,7 +136,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
})
}

Expand Down
2 changes: 1 addition & 1 deletion lib/hash.js
Expand Up @@ -7,7 +7,7 @@ function getInvalidatingOptions (config) {
'ignoreClassMethods',
'instrument',
'instrumenter',
'plugins',
'parserPlugins',
'preserveComments',
'produceSourceMap',
'sourceMap'
Expand Down
2 changes: 1 addition & 1 deletion lib/instrumenters/istanbul.js
Expand Up @@ -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({
Expand Down

0 comments on commit 2867538

Please sign in to comment.