Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE: experimental & extensions options in instrument task throw errors #43

Open
reefath opened this issue Jan 22, 2016 · 0 comments
Open

Comments

@reefath
Copy link

reefath commented Jan 22, 2016

Im having a few es6 files with .es6 extension and es5 files with .js extension. I use grunt for build. I use babel6 as transpiler. I get errors with experimental & extensions option for babel. Can someone please let me know how to get this working?

This is my instrument task.
{
files: ['index.js','con//*.js', 'con//.es6', 'lib/__/.js', 'models/*/.js'],
options: {
lazy: true,
basePath: 'coverage/instrument/',
babel: {ignore: false, experimental: true, extensions: ['.es6']},
instrumenter: isparta.Instrumenter
}

Exception stack:

Running "instrument" task
Fatal error: An error occurred in an async call.
cause stack is ...
ReferenceError: [BABEL] con/account.es6: Unknown option: base.experimental
at Logger.error (/../node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:262:18)
at OptionManager.init (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:416:10)
at File.initOptions (/../node_modules/babel-core/lib/transformation/file/index.js:191:75)
at new File (/../node_modules/babel-core/lib/transformation/file/index.js:122:22)
at Pipeline.transform (/../node_modules/babel-core/lib/transformation/pipeline.js:42:16)
at Instrumenter.instrumentSync (/../node_modules/isparta/lib/instrumenter.js:64:55)
at Instrumenter.instrument (/../node_modules/isparta/node_modules/istanbul/lib/instrumenter.js:594:37)
at StepContext.instrumentFile (/../node_modules/grunt-istanbul/tasks/helpers.js:76:24)
at runStep (/../node_modules/grunt-istanbul/node_modules/nue/lib/nue.js:113:14)
async call history is ...
[ { function: 'instrumentFile',
location: '/../node_modules/grunt-istanbul/tasks/helpers.js:76:71',
mapping: { name: 'controllers/account.es6', code: [Object] } } ]

Running "instrument" task
Fatal error: An error occurred in an async call.
cause stack is ...
ReferenceError: [BABEL] con/account.es6: Unknown option: base.extensions
at Logger.error (/../node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:262:18)
at OptionManager.init (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:416:10)
at File.initOptions (/../node_modules/babel-core/lib/transformation/file/index.js:191:75)
at new File (/../node_modules/babel-core/lib/transformation/file/index.js:122:22)
at Pipeline.transform (/../node_modules/babel-core/lib/transformation/pipeline.js:42:16)
at Instrumenter.instrumentSync (/../node_modules/isparta/lib/instrumenter.js:64:55)
at Instrumenter.instrument (/../node_modules/isparta/node_modules/istanbul/lib/instrumenter.js:594:37)
at StepContext.instrumentFile (/../node_modules/grunt-istanbul/tasks/helpers.js:76:24)
at runStep (/../node_modules/grunt-istanbul/node_modules/nue/lib/nue.js:113:14)
async call history is ...
[ { function: 'instrumentFile',
location: '/../node_modules/grunt-istanbul/tasks/helpers.js:76:71',
mapping: { name: 'controllers/account.es6', code: [Object] } } ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant