Draft: Add support for remapping with range mappings#48
Open
takikawa wants to merge 5 commits intojridgewell:mainfrom
Open
Draft: Add support for remapping with range mappings#48takikawa wants to merge 5 commits intojridgewell:mainfrom
takikawa wants to merge 5 commits intojridgewell:mainfrom
Conversation
* Adjust rangeSegments to map to range mapping info such as the end point, not just a boolean state of being a range or not. * Add isRange to allow querying the range mapping data for a segment * Add traceSegmentsInRange for finding segments in a range
* add back line information for traceSegmentsInRange because it needs to be represented somehow in the return result (an alternative would be a start line + array of arrays) * fixes most range mapping remapping test failures that came up due to rebasing these patches
* Expose range mappings from remapping SourceMap * Conditionalize calling setRangeSegment
This file contains hidden or 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
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.
This is a draft PR for remapping support with range mappings.
Marking draft because the tests are not quite passing in the current state. They were working in a previous iteration but I've rebased it to the latest trace-mapping code, and haven't had time to debug all the differences between my working branch and HEAD quite yet.
While rebasing it, some interesting points came up:
rangeSegmentsso that it can be easily queried from aSourcemapSegment.traceSegmentsInRangeso that when you have a range mapping to compose with other mappings, you can find the overlapping ranges or regular mappings.Would be happy to keep fixing this up if this seems like a good approach.