Skip to content

Conversation

@joshkel
Copy link

@joshkel joshkel commented Aug 20, 2025

If I understand correctly, the source-map library may set lastGeneratedColumn to infinity for the end of a mapping range:

https://github.com/mozilla/source-map/blob/v0.7.4/lib/source-map-consumer.js#L405

I believe it makes sense to represent this as the last valid column.

Without this patch, we were getting errors similar to the following:

build/static/js/runtime-main.d68f6598.js
  Your source map refers to generated column Infinity on line 1, but the source only contains 4809 column(s) on that line.
  Check that you are using the correct source map.

With this patch, I get identical output to what I get from running source-map-explore --no-border-checks.

See #248

If I understand correctly, the source-map library may set lastGeneratedColumn to infinity for the end of a mapping range:

https://github.com/mozilla/source-map/blob/v0.7.4/lib/source-map-consumer.js#L405

I believe it makes sense to represent this as the last valid column.

See danvk#248
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.

1 participant