<p dir="auto">Hi,</p>
<p dir="auto">I have (mocha) specs which have the same filename as the subject under test and only another extension. Example: subject.js and subject.spec.js. Since the AMD and the System formatter inherit from the Default formatter all file extensions are removed. This results in duplicate module ids. How about making the removal of the file extension or configurable? So that either I have module ids matching the filenames or that just the last "extension" is removed.</p>
<p dir="auto">Thanks</p>
<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/loganfsmyth/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/loganfsmyth">@loganfsmyth</a></p>
</blockquote>
<h3 dir="auto">Input code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function fn(){
    true;

    // Comment
    false;
}"><pre class="notranslate"><code class="notranslate">function fn(){
    true;

    // Comment
    false;
}
</code></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;

function fn() {
    true;

    // Comment
    false;
}"><pre class="notranslate"><code class="notranslate">"use strict";

function fn() {
    true;

    // Comment
    false;
}
</code></pre></div>
<p dir="auto">with map:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{&quot;version&quot;:3,&quot;sources&quot;:[&quot;main.js&quot;],&quot;names&quot;:[],&quot;mappings&quot;:&quot;;;AAAA,SAAS,EAAT,GAAa;AACT;;;AADS,SAIT,CAJS;CAAb&quot;,&quot;file&quot;:&quot;main-out.js&quot;,&quot;sourcesContent&quot;:[&quot;function fn(){\n    true;\n\n    // Comment\n    false;\n}\n&quot;]}"><pre class="notranslate"><code class="notranslate">{"version":3,"sources":["main.js"],"names":[],"mappings":";;AAAA,SAAS,EAAT,GAAa;AACT;;;AADS,SAIT,CAJS;CAAb","file":"main-out.js","sourcesContent":["function fn(){\n    true;\n\n    // Comment\n    false;\n}\n"]}
</code></pre></div>
<p dir="auto">running through <code class="notranslate">source-map</code> results in the following bindings:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[
  {
    &quot;source&quot;: &quot;main.js&quot;,
    &quot;generatedLine&quot;: 3,
    &quot;generatedColumn&quot;: 0,
    &quot;originalLine&quot;: 1,
    &quot;originalColumn&quot;: 0,
    &quot;name&quot;: null
  },
  {
    &quot;source&quot;: &quot;main.js&quot;,
    &quot;generatedLine&quot;: 3,
    &quot;generatedColumn&quot;: 9,
    &quot;originalLine&quot;: 1,
    &quot;originalColumn&quot;: 9,
    &quot;name&quot;: null
  },
  {
    &quot;source&quot;: &quot;main.js&quot;,
    &quot;generatedLine&quot;: 3,
    &quot;generatedColumn&quot;: 11,
    &quot;originalLine&quot;: 1,
    &quot;originalColumn&quot;: 0,
    &quot;name&quot;: null
  },
  {
    &quot;source&quot;: &quot;main.js&quot;,
    &quot;generatedLine&quot;: 3,
    &quot;generatedColumn&quot;: 14,
    &quot;originalLine&quot;: 1,
    &quot;originalColumn&quot;: 13,
    &quot;name&quot;: null
  },
  {
    &quot;source&quot;: &quot;main.js&quot;,
    &quot;generatedLine&quot;: 4,
    &quot;generatedColumn&quot;: 0,
    &quot;originalLine&quot;: 2,
    &quot;originalColumn&quot;: 4,
    &quot;name&quot;: null
  },
  {
    &quot;source&quot;: &quot;main.js&quot;,
    &quot;generatedLine&quot;: 7,
    &quot;generatedColumn&quot;: 0,
    &quot;originalLine&quot;: 1,
    &quot;originalColumn&quot;: 13,
    &quot;name&quot;: null
  },
  {
    &quot;source&quot;: &quot;main.js&quot;,
    &quot;generatedLine&quot;: 7,
    &quot;generatedColumn&quot;: 9,
    &quot;originalLine&quot;: 5,
    &quot;originalColumn&quot;: 4,
    &quot;name&quot;: null
  },
  {
    &quot;source&quot;: &quot;main.js&quot;,
    &quot;generatedLine&quot;: 7,
    &quot;generatedColumn&quot;: 10,
    &quot;originalLine&quot;: 1,
    &quot;originalColumn&quot;: 13,
    &quot;name&quot;: null
  },
  {
    &quot;source&quot;: &quot;main.js&quot;,
    &quot;generatedLine&quot;: 8,
    &quot;generatedColumn&quot;: 1,
    &quot;originalLine&quot;: 1,
    &quot;originalColumn&quot;: 0,
    &quot;name&quot;: null
  }
]"><pre class="notranslate"><code class="notranslate">[
  {
    "source": "main.js",
    "generatedLine": 3,
    "generatedColumn": 0,
    "originalLine": 1,
    "originalColumn": 0,
    "name": null
  },
  {
    "source": "main.js",
    "generatedLine": 3,
    "generatedColumn": 9,
    "originalLine": 1,
    "originalColumn": 9,
    "name": null
  },
  {
    "source": "main.js",
    "generatedLine": 3,
    "generatedColumn": 11,
    "originalLine": 1,
    "originalColumn": 0,
    "name": null
  },
  {
    "source": "main.js",
    "generatedLine": 3,
    "generatedColumn": 14,
    "originalLine": 1,
    "originalColumn": 13,
    "name": null
  },
  {
    "source": "main.js",
    "generatedLine": 4,
    "generatedColumn": 0,
    "originalLine": 2,
    "originalColumn": 4,
    "name": null
  },
  {
    "source": "main.js",
    "generatedLine": 7,
    "generatedColumn": 0,
    "originalLine": 1,
    "originalColumn": 13,
    "name": null
  },
  {
    "source": "main.js",
    "generatedLine": 7,
    "generatedColumn": 9,
    "originalLine": 5,
    "originalColumn": 4,
    "name": null
  },
  {
    "source": "main.js",
    "generatedLine": 7,
    "generatedColumn": 10,
    "originalLine": 1,
    "originalColumn": 13,
    "name": null
  },
  {
    "source": "main.js",
    "generatedLine": 8,
    "generatedColumn": 1,
    "originalLine": 1,
    "originalColumn": 0,
    "name": null
  }
]
</code></pre></div>
<p dir="auto">Given this map, if you want to find the original position of line 7 column 4, which should be line 5 column 4, instead we get line 1 column 13 (the start of the body)</p>