-
-
Notifications
You must be signed in to change notification settings - Fork 28
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: Support Hermes (react-native) SourceMaps #22
Conversation
cfc198e
to
d459c64
Compare
Yeah. This is all a bit meh. I think one way we could go forward is instead of exposing the source map as the primary API to have view objects over them that provide the most common operations. We already effectively do something like this in symbolic where a source map often only makes sense when paired with the source view of the minified code. Might be worth looking into the firefox developer tools. They might have found better abstractions. |
|
||
let mut nums = parse_vlq_segment(mapping).ok()?.into_iter(); | ||
|
||
column = (i64::from(column) + nums.next()?) as u32; |
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.
wonder if we want to deal with the overflow explicitly here.
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.
hm, the regular sourcemap code doesn’t either.
Confirmed, just tested it end to end, it works! |
fixes #21
This exposes a new
SourceMapHermes
type, which can look up the scope name via a bytecode offset.