Open rschoenbichler opened 9 months ago
That sounds like a good third-party plugin. What problem did you have with the plugin code you posted?
That sounds like a good third-party plugin.
Absolutely, I just think that the parcel eco-system as a whole would benefit from this feature. So the awareness on the parcel side makes sense to me.
What problem did you have with the plugin code you posted?
I was trying to instrument a react / typescript / es-next module application. I've added the transformer as last step to the tsx transformer pipeline. The instrumentation failed in some deep recursive stack in the istanbul code traversal with a meaningless "can't turn this into a node" failure.
I know this is not parcels responsibility. Looking at the plugin I've posted, I think the code and the transformer API make sense. I just don't know where to go from here. Maybe istanbul isn't even a viable option because it is nested too deep in the babel ages. Which is why I thought reaching out to you makes sense, and maybe this is something that parcel want's to push as well and take it on your own agenda too?
That transformer plugin should work.
I've added the transformer as last step to the tsx transformer pipeline.
Try putting it at the start of the pipeline instead.
Which is why I thought reaching out to you makes sense, and maybe this is something that parcel want's to push as well and take it on your own agenda too?
No, we already have quite few people working on Parcel itself.
Putting it to the start causes Istanbul to fail at the first typescript specific code segment (in my case a generic type)
π feature request
A transformer plugin that instruments the build to record code coverage in an istanbul.js compatible format
π€ Expected Behavior
include via .parcelrc transformer section
π― Current Behavior
not present
π Possible Solution
After some local trials, the istanbul-lib-instrumentation transformer always fails with a
don't know how to turn this value into a node
error. I've not found any other library so far for code coverage augmentation.π¦ Context
I'm trying to augment a react/typescript/esnext application to retrieve code coverage information during runtime.
π» Examples