Skip to content

Conversation

szuend
Copy link
Collaborator

@szuend szuend commented Aug 25, 2025

This was discussed in the TC39-TG4 meeting of 2025-08-13. tl;dr, we'd like to have a set of decoding tests that store a source map and a serialized version of the "Decoded Source Map Record" next to each other.

The PR currently keeps the "decoding test source maps" separate from the other source map fixtures in "resources/". If we also want to store .golden for the source maps in "resources/", I can shuffle it around.

The PR adds a .d.ts file for the golden format, as we can't map the "Decoded Source Map Record" 1:1 due to the cycles in the object hierarchy.

Once we have ironed out the details on this PR, I'll start with a follow-up PR for "scopes" spec tests.

@szuend
Copy link
Collaborator Author

szuend commented Aug 25, 2025

Can't add reviewers for some reason, so pinging @takikawa and @jridgewell directly.

@takikawa takikawa self-requested a review August 28, 2025 15:52
@@ -0,0 +1 @@
{"file":"single-root-original-scope.js","mappings":[],"sources":[{"url":"original_0.js","content":null,"ignored":false,"scope":{"start":{"line":0,"column":0},"end":{"line":10,"column":0},"name":null,"kind":"global","isStackFrame":false,"variables":[],"children":[]}}],"ranges":[{"start":{"line":0,"column":0},"end":{"line":0,"column":10},"definitionIndex":0,"stackFrameType":"none","callSite":null,"bindings":[],"children":[]}]}
Copy link
Member

Choose a reason for hiding this comment

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

Pretty-printing this would make is easier for humans to review what is going on

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.

3 participants