Feature request. map.names is always empty. Tooling that renames identifiers and prints through esrap loses the devtools "original name" reverse-resolution that text-splicing pipelines get from magic-string's storeName: true.
With boundaryTokens: true (which is excellent - it closed the mapping-density gap for us) the remaining delta to a hires text-splice map is exactly the names array: record the source identifier's text on the mapping segment when a node with a name is printed.
Context: found by a parse -> print -> reparse structural gate over a ~8.5k-file TS/JS corpus while adopting esrap in core-js's build plugin, then re-verified in isolation. esrap 2.3.5; the ASTs below come from @typescript-eslint/typescript-estree 8.67 with loc/range enabled, so the repros are independent of our own (oxc-based) pipeline.
Feature request.
map.namesis always empty. Tooling that renames identifiers and prints through esrap loses the devtools "original name" reverse-resolution that text-splicing pipelines get from magic-string'sstoreName: true.With
boundaryTokens: true(which is excellent - it closed the mapping-density gap for us) the remaining delta to a hires text-splice map is exactly thenamesarray: record the source identifier's text on the mapping segment when a node with anameis printed.Context: found by a parse -> print -> reparse structural gate over a ~8.5k-file TS/JS corpus while adopting esrap in core-js's build plugin, then re-verified in isolation. esrap 2.3.5; the ASTs below come from
@typescript-eslint/typescript-estree8.67 withloc/rangeenabled, so the repros are independent of our own (oxc-based) pipeline.