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

WIP: one to multiple source maps #21 #62

Conversation

DracoBlue
Copy link

@DracoBlue DracoBlue commented Oct 2, 2019

I am trying to fix #21 and v8-to-istanbul: source-mappings from one to many files not yet supported

Approach:

  1. v8-to-istanbul.js expects only one file of the sourcemap to be parsed at the same time
  2. create a new method and walk through all source files of the sourcemap and reset state (this. sourceTranspiled and this.source) before

@bcoe
Copy link
Member

bcoe commented Oct 6, 2019

👋 hey @DracoBlue, I apologize for not having had much time to look at this project lately. I'm excited that your'e looking into this.

@bcoe
Copy link
Member

bcoe commented Oct 24, 2019

@DracoBlue still something you'd like to land, looks like a few tests are failing.

@DracoBlue
Copy link
Author

@bcoe Yup. The test are failing because of the result dump. I am currently trying to get it working with a big webpack-based project. if this works properly I will add tests for my usecase and update the PR here.

@bcoe
Copy link
Member

bcoe commented Oct 25, 2019

@DracoBlue very much appreciated 👏 we just landed some source-map related functionality in Node.js core, that's made me excited about dusting off these libraries ... they now work for edge-cases like ts-node.

@DracoBlue
Copy link
Author

Nice!

I am currently struggling with those member variables. Hopefully I get this sorted within next days. Having v8 istanbul reporting for production sourcemap files would help me to end2end test our production build with little effort ;).

@SergeyPirogov
Copy link

@DracoBlue what is the progress with this? I struggling with the same issue.

@SergeyPirogov
Copy link

I've added these changes to my project and when trying to generate the report it's failing:

file: /home/sergey/Github/todomvc/examples/typescript-angular/js/Application.js error: TypeError: Cannot read property '0' of undefined
    at /home/sergey/Github/todomvc/examples/typescript-angular/node_modules/v8-to-istanbul/lib/v8-to-istanbul.js:66:75
    at async Promise.all (index 0)
    at async V8ToIstanbul.load (/home/sergey/Github/todomvc/examples/typescript-angular/node_modules/v8-to-istanbul/lib/v8-to-istanbul.js:46:39)
    at async Report.getCoverageMapFromAllCoverageFiles (/home/sergey/Github/todomvc/examples/typescript-angular/node_modules/c8/lib/report.js:69:9)
    at async Report.run (/home/sergey/Github/todomvc/examples/typescript-angular/node_modules/c8/lib/report.js:39:17)
    at async Object.exports.outputReport (/home/sergey/Github/todomvc/examples/typescript-angular/node_modules/c8/lib/commands/report.js:24:3)
    at async Object.exports.handler (/home/sergey/Github/todomvc/examples/typescript-angular/node_modules/c8/lib/commands/report.js:9:3)

@DracoBlue
Copy link
Author

I am still struggling with the code, since some of these member variables are used elsewhere and it is not easy to emulate.

My ncc build does not highlight properly at all. So long I close this PR until I have time for this matter again.

@DracoBlue DracoBlue closed this Nov 14, 2019
@SergeyPirogov
Copy link

Will try to complete this

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

Successfully merging this pull request may close these issues.

add support for 1:many source-maps
3 participants