You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

coverage

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coverage - npm Package Compare versions

Comparing version

to
0.3.1

17

index.js

@@ -12,3 +12,2 @@ #!/usr/bin/env node

const slash = require('slash');
const uuidV4 = require('uuid/v4');
const which = require('which');

@@ -32,19 +31,5 @@ const yargsParser = require('yargs-parser');

// On Windows, write codecov-bash to a file instead of memory to avoid ENAMETOOLONG error
const codecovBashPath = process.platform === 'win32' ? join(cwd, 'coverage', uuidV4()) : null;
const codecovBashPath = process.platform === 'win32' ? join(cwd, 'coverage', Math.random().toString()) : null;
(async () => {
// Remove this workaround when https://github.com/bcoe/c8/pull/83 is merged
try {
const patchPath = require.resolve('./patch.txt');
const {readFile, unlink, writeFile} = require('fs');
const originalScriptPath = require.resolve('c8/lib/report.js');
const originalScript = await promisify(readFile)(originalScriptPath, 'utf8');
await promisify(writeFile)(originalScriptPath, originalScript.replace(
/(?<=createCoverageMap\(\{\}\)\n\n)[^9]+(?=this\._allCoverageFiles =)/u,
await promisify(readFile)(patchPath, 'utf8')
));
await promisify(unlink)(patchPath);
} catch {}
if (command === undefined) {

@@ -51,0 +36,0 @@ require(c8BinPath);

10

package.json
{
"name": "coverage",
"version": "0.3.0",
"version": "0.3.1",
"description": "A command-line tool to collect and report code coverage of a JavaScript program",

@@ -13,4 +13,3 @@ "author": "Shinnosuke Watanabe (https://github.com/shinnn)",

"files": [
"index.js",
"patch.txt"
"index.js"
],

@@ -37,8 +36,7 @@ "bin": {

"dependencies": {
"c8": "^3.5.0",
"c8": "^4.1.4",
"foreground-child": "^1.5.6",
"normalize-package-data": "^2.5.0",
"slash": "^3.0.0",
"test-exclude": "^5.2.2",
"uuid": "^3.3.2",
"test-exclude": "^5.2.3",
"which": "^1.3.1",

@@ -45,0 +43,0 @@ "yargs-parser": "^13.0.0"