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

Pass through the implementation of more index map operations. #364

Merged
merged 1 commit into from
Oct 18, 2018

Conversation

loganfsmyth
Copy link
Contributor

Indexed maps have a lot of duplication with basic maps right now, and I can't see a good reason for it, so this is an effort to normalize all of that logic on top of the basic map implementation.

This PR also includes support for computeColumnSpans on indexed maps, so that the two types of consumers have a consistent API again.

Beyond the expected stuff, this PR also includes one breaking change. The basic consumer's eachMapping function now returns lastGeneratedColumn as Infinity instead of null when you've called computeColumnSpans and there was no span end. Before this, it was null, but setting it to Infinity keeps the API consistent with generatedPositionFor and allGeneratedPositionsFor's lastColumn value.

@tromey
Copy link
Contributor

tromey commented Oct 16, 2018

I don't really know much about this area so I think I will leave it to Nick.

@tromey tromey removed their request for review October 16, 2018 19:44
@coveralls
Copy link

Pull Request Test Coverage Report for Build 516

  • 53 of 55 (96.36%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+4.2%) to 88.063%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/source-map-consumer.js 53 55 96.36%
Totals Coverage Status
Change from base Build 505: 4.2%
Covered Lines: 876
Relevant Lines: 972

💛 - Coveralls

Copy link
Contributor

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks @loganfsmyth :)

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.

4 participants