oxc/crates/oxc_sourcemap/tests/fixtures/basic/visualizer.snap
Hiroshi Ogawa 3d66929fa2
fix(sourcemap): improve source map visualizer (#7386)
- Related https://github.com/rolldown/rolldown/issues/2737

Probably this is still an approximation of what
https://github.com/evanw/source-map-visualization does, but I tried to
get some ideas from it.

For comparison, I added an example from their site
https://evanw.github.io/source-map-visualization/ as a snapshot in
`crates/oxc_sourcemap/tests/fixtures/esbuild/visualizer.snap`. I'll
mention a few notable changes in the comments.

Snapshot change in rolldown repo can be found in
- https://github.com/rolldown/rolldown/pull/2829
2024-11-21 14:35:56 +08:00

18 lines
544 B
Text

---
source: crates/oxc_sourcemap/tests/main.rs
input_file: crates/oxc_sourcemap/tests/fixtures/basic/test.js
snapshot_kind: text
---
- shared.js
(0:0) "const " --> (2:0) "const "
(0:6) "a = " --> (2:6) "a = "
(0:10) "'shared.js'\n" --> (2:10) "'shared.js';\n"
- index.js
(1:0) "const " --> (5:0) "const "
(1:6) "a = " --> (5:6) "a$1 = "
(1:10) "'index.js'\n" --> (5:12) "'index.js';\n"
(2:0) "console." --> (6:0) "console."
(2:8) "log(" --> (6:8) "log("
(2:12) "a, " --> (6:12) "a$1, "
(2:15) "a2)" --> (6:17) "a)"
(2:18) "\n" --> (6:19) ";\n"