fix: remove work-around from istanbul-lib-instrument (#2121)

This commit is contained in:
Ari Perkkiö 2022-10-10 17:30:08 +03:00 committed by GitHub
parent 052bc02133
commit a24c87344c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -78,8 +78,7 @@ export class IstanbulCoverageProvider implements CoverageProvider {
if (!this.testExclude.shouldInstrument(id))
return
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- ignoreRestSiblings should be enabled
const { sourcesContent, ...sourceMap } = pluginCtx.getCombinedSourcemap()
const sourceMap = pluginCtx.getCombinedSourcemap()
const code = this.instrumenter.instrumentSync(sourceCode, id, sourceMap as any)
const map = this.instrumenter.lastSourceMap() as any
@ -203,10 +202,7 @@ export class IstanbulCoverageProvider implements CoverageProvider {
this.instrumenter.instrumentSync(
transformResult.code,
filename,
{
...sourceMap,
version: sourceMap.version.toString(),
},
sourceMap as any,
)
const lastCoverage = this.instrumenter.lastFileCoverage()

1
pnpm-lock.yaml generated
View File

@ -12887,6 +12887,7 @@ packages:
semver: 6.3.0
transitivePeerDependencies:
- supports-color
dev: false
/istanbul-lib-report/3.0.0:
resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==}