danvk / source-map-explorer

Analyze and debug space usage through source maps
Apache License 2.0
3.82k stars 100 forks source link

Visualize the line endings in the treemap #150

Closed paulirish closed 4 years ago

paulirish commented 4 years ago

as of #146, SME calculates the byte total of line endings and reports them. but they're not currently shown in the treemap, whereas no source or unmapped bytes are.

This PR fixes that.

image

+@connorjclark


Side note: I also think its weird that a line-ending isn't attributed the file that had the "active" mapping. Perhaps it should be?

connorjclark commented 4 years ago

attributing the newline to the file amounts to +1 (or 2 for \r\n) here: https://github.com/danvk/source-map-explorer/blob/master/src/explore.ts#L199

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.07%) to 92.767% when pulling 09b3d66828a96cbafc41384753b70e4c01e824fc on paulirish:lineendings into 92692faeab08362c4dd8346e660e2b7e89a69ac8 on danvk:master.

nikolay-borzov commented 4 years ago

Side note: I also think its weird that a line-ending isn't attributed the file that had the "active" mapping. Perhaps it should be?

What do you mean by "active" mapping?