-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
feat: adds support for source-map production #439
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows the user to control the source map output post instrumentation. Not fully straightforward right now, but when combined with a fork of source-map-support that has inline support (or placing the files in the proper location), end to end covered source maps can be achieved. For runtime source-map-support, see evanw/node-source-map-support#118. Will be forking to @kpdecker/source-map-support soon, since the canonical project appears to be dead.
Simplify the API and add tests.
…ke accurate stack traces. thanks @kpdecker
Awesome. LGTM |
JaKXz
reviewed
Nov 7, 2016
@@ -128,7 +127,9 @@ NYC.prototype.instrumenter = function () { | |||
} | |||
|
|||
NYC.prototype._createInstrumenter = function () { | |||
return this._instrumenterLib(this.cwd) | |||
return this._instrumenterLib(this.cwd, { | |||
produceSourceMap: this.config.produceSourceMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
JaKXz
approved these changes
Nov 7, 2016
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic. Thanks for calling out the branch on merging source maps.
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@kpdecker I had some refactoring on my mind, that I opted to tack onto your work so that we can get this landed -- rather than overly marking up #393.
I made a few very minor changes:
--produce-source-map
; I also had some performance concerns, and think it's better that folks usingsource-map-support
opt in.index.js
, so that it's ultimately just calling a bunch of pretty easy to follow libraries and helpers. tldr; I pulled the source-map logic into the instrumenter.TODOs
around adding additional tests, and opened add more tests for produce-source-map logic #438.CC: @JaKXz would love to have you take one final look at this.