Only generate a mapping at a generated location for the most specific mapping
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.7k
- Forks
- 370
- PR merge metrics
- No merged PRs in 30d
Description
If we have the following mappings, should we generate them all in the source map or only the most specific mapping?
map.addMapping({
generated: { line: 3, column: 5 }
});
map.addMapping({
generated: { line: 3, column: 5 },
original: { line: 6, column: 7 },
source: 'foo.js'
});
map.addMapping({
generated: { line: 3, column: 5 },
original: { line: 6, column: 7 },
source: 'foo.js',
name: 'bar'
});
What should be the behavior if there is different original locations for the same generated position? Should we still use the most specific/detailed mapping and ignore the others?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the three map.addMapping examples in the issue and determine the expected behavior when generated positions and original locations overlap. Review the source-map mapping-generation entry points and existing tests, if available, then document or test whether the most specific mapping wins or whether multiple mappings are retained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100