Socket
Socket
Sign inDemoInstall

@vitest/coverage-istanbul

Package Overview
Dependencies
555
Maintainers
4
Versions
92
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.1 to 1.4.0

12

dist/provider.js

@@ -275,10 +275,12 @@ import { promises, existsSync, writeFileSync } from 'node:fs';

async getCoverageMapForUncoveredFiles(coveredFiles) {
const includedFiles = await this.testExclude.glob(this.ctx.config.root);
const uncoveredFiles = includedFiles.map((file) => resolve(this.ctx.config.root, file)).filter((file) => !coveredFiles.includes(file));
const allFiles = await this.testExclude.glob(this.ctx.config.root);
let includedFiles = allFiles.map((file) => resolve(this.ctx.config.root, file));
if (this.ctx.config.changed)
includedFiles = (this.ctx.config.related || []).filter((file) => includedFiles.includes(file));
const uncoveredFiles = includedFiles.filter((file) => !coveredFiles.includes(file));
const cacheKey = (/* @__PURE__ */ new Date()).getTime();
const coverageMap = libCoverage.createCoverageMap({});
for (const [index, filename] of uncoveredFiles.entries()) {
debug("Uncovered file %s %d/%d", filename, index, uncoveredFiles.length);
if (this.ctx.vitenode.fetchCache.has(filename))
this.ctx.vitenode.fetchCache.delete(filename);
await this.ctx.vitenode.transformRequest(filename);
await this.ctx.vitenode.transformRequest(`${filename}?v=${cacheKey}`);
const lastCoverage = this.instrumenter.lastFileCoverage();

@@ -285,0 +287,0 @@ coverageMap.addFileCoverage(lastCoverage);

{
"name": "@vitest/coverage-istanbul",
"type": "module",
"version": "1.3.1",
"version": "1.4.0",
"description": "Istanbul coverage provider for Vitest",

@@ -40,3 +40,3 @@ "author": "Anthony Fu <anthonyfu117@hotmail.com>",

"peerDependencies": {
"vitest": "1.3.1"
"vitest": "1.4.0"
},

@@ -48,3 +48,3 @@ "dependencies": {

"istanbul-lib-report": "^3.0.1",
"istanbul-lib-source-maps": "^4.0.1",
"istanbul-lib-source-maps": "^5.0.4",
"istanbul-reports": "^3.1.6",

@@ -63,3 +63,3 @@ "magicast": "^0.3.3",

"pathe": "^1.1.1",
"vitest": "1.3.1"
"vitest": "1.4.0"
},

@@ -66,0 +66,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc