Add experimental support for range mappings in source maps.#18006
Open
nicolo-ribaudo wants to merge 1 commit into
Open
Add experimental support for range mappings in source maps.#18006nicolo-ribaudo wants to merge 1 commit into
nicolo-ribaudo wants to merge 1 commit into
Conversation
Collaborator
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/61926 |
nicolo-ribaudo
force-pushed
the
range-mappings
branch
from
May 21, 2026 14:03
9abdbad to
b508a69
Compare
|
commit: |
nicolo-ribaudo
force-pushed
the
range-mappings
branch
from
May 25, 2026 09:55
b1667a1 to
25134a6
Compare
nicolo-ribaudo
force-pushed
the
range-mappings
branch
from
July 15, 2026 16:09
25134a6 to
e8163ab
Compare
nicolo-ribaudo
force-pushed
the
range-mappings
branch
from
July 15, 2026 16:12
e8163ab to
26d955f
Compare
nicolo-ribaudo
marked this pull request as ready for review
July 15, 2026 16:15
JLHwung
reviewed
Jul 15, 2026
nicolo-ribaudo
force-pushed
the
range-mappings
branch
from
July 17, 2026 07:48
26d955f to
b4053bf
Compare
nicolo-ribaudo
force-pushed
the
range-mappings
branch
from
July 17, 2026 08:06
b4053bf to
3f4b6ca
Compare
Member
Author
|
As the source maps libraries do not support yet merging source maps that use range mappings, we should automatically want and disable ranges when an |
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.
Fixes #1, Fixes #2This PR implements the range mappings proposal for source maps. WebKit devtools just merged support for it.
The proposal is at stage 3, meaning that while there might be changes it's expected to be quite stable and changes would be due to implementation feedback. Given that we are in close coordination with all the tools implementing it (we have monthly calls in TC39-TG4), we can safely coordinate changes if they will happen.
Given this test case:
without range mappings we generate
{ version: 3, file: undefined, names: [ 'z' ], sourceRoot: undefined, sources: [ 'unknown' ], sourcesContent: [ 'let x, y, z, w;\nx + y + z + w;' ], mappings: 'AAAA,IAAI,CAAC,EAAE,CAAC,EAAEA,CAAC,EAAE,CAAC;AACd,CAAC,GAAG,CAAC,GAAGA,CAAC,GAAK,CAAC', ignoreList: undefined, rangeMappings: undefined }while with range mappings it becomes