You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following is a legal sourceMap. Note the condition that causes a problem, is the combination of a relative sourceRoot along with a sources member that contains a path that an additional level deep in the directory structure. In this case, subdir/foo.ts.
Where dirname(this.path) would get the directory for the src file in question. resolve would then resolve against the relative sourceRoot getting the absolute path to the source directory. From there the join would attach the source file and be teh right path to the source file.
I'll need to test this though to make sure I'm not just fixing this case.
The following is a legal sourceMap. Note the condition that causes a problem, is the combination of a relative
sourceRoot
along with asources
member that contains a path that an additional level deep in the directory structure. In this case,subdir/foo.ts
.Give the discovery of a covered file in c8 that was
[somepath]/rootdir/subdir/foo.js
when we attempt to resolve the location of the source file we will hit this block of code: https://github.com/istanbuljs/v8-to-istanbul/blob/master/lib/v8-to-istanbul.js#L79 we will end up creating a path that is:[somepath]/rootdir/subdir/subdir/foo.ts
which is invalid.Taking a look at this for a PR.
The text was updated successfully, but these errors were encountered: