Open wkeese opened 2 years ago
Also getting this with vue-cli
May have been fixed by https://github.com/babel/babel/pull/14283
It looks like the sourcemap is being grabbed from file.inputMap.sourcemap
in babel-plugin-istanbul
here:
https://github.com/istanbuljs/babel-plugin-istanbul/blob/99bd2a27493b7552ae75877496c3b2ad93f5fc46/src/index.js#L114-L116
That seems like an ideal place to convert to a plain javascript object. It sounds like the babel team would like to not make a copy of the sourcemap every time they are generated.
Also seeing this with vue-cli, although it only seems to happen with components using script setup
.
I'm getting the
exception during instrumentation and I traced it down to this:
Visitor.js'
exit()
method callsbabel/@type
'svalueToNode(coverageData)
method. ThecoverageData.inputSourceMap
property used to be a plain object, but (I think because of a newer version of babel?),inputSourceMap
is now an instance of theSourceMap
class, causingvalueToNode()
to throw that exception.I know this is similar to #646 but we aren't using Angular. I am using https://github.com/JS-DevTools/coverage-istanbul-loader, perhaps I should be using https://github.com/istanbuljs/babel-plugin-istanbul instead. I am wondering though how or if this is working for other configurations, and if
istanbul-lib-instrument
needs an update to handlecoverageData.inputSourceMap
being aSourceMap
?