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

Support Source Maps with Sections #11

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

rokob
Copy link

@rokob rokob commented Dec 1, 2017

This PR does a few things:

  • decode now returns either SourceMapIndex or SectionedSourceMapIndex depending on whether the input has a 'sections' key.

  • SectionedSourceMapIndex implements the same interface as SourceMapIndex allowing for the external interaction to be transparent to which type of index is returned

  • lookup now returns both a token and the SourceMapIndex the token came from. This is relevant for working with the index around the token especially with SectionedSourceMapIndex as the lookup from SourceMapIndex just returns self.

  • Additional API methods were created to make it easier to work with the underlying index without having to reach into the internals:

    • columns_for_line
    • total_number_of_lines
    • files
    • sources_content_map
    • raw_sources

@mattrobenolt
Copy link
Owner

Hi @rollbar.

@brianr
Copy link

brianr commented Dec 2, 2017

hi @mattrobenolt ! :)

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.

6 participants