istanbuljs / puppeteer-to-istanbul

given coverage information output by puppeteer's API output a format consumable by Istanbul reports
ISC License
212 stars 46 forks source link

Add originalPath to out.json #31

Open daniellara opened 5 years ago

daniellara commented 5 years ago

We have a project with many similar filenames (i.e. path_one/tag.js, path_two/tag.js, ... path_n/tag.js).

When passing puppeter-to-istanbul, these path and filenames are converted to tag.N.js for avoid conflicts at the time of writing these files in tmp folder, but if we pass the result to our reporter (similar to istanbul-reporter) we generate a lot of rows like tag.1.js, tag.2.js ... tag.N.js so it's complicated to follow the exact file that we want to look in the reporter. It is possible to include that "originalPath" in the out.json in order to use it in the reporter?

P.D. I have made some changes in puppeter-to-istanbul in my local to include the "originalPath" to the out.json generated, so if you want I can make a PR with these changes.

bcoe commented 5 years ago

@daniellara I would be very open to PRs, I haven't been able to put much work against this repo (burried in other OSS work unfortunately).