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.1.3

19

index.js

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

const {createWriteStream, mkdir} = require('fs');
const {dirname, join, resolve: resolvePath} = require('path');
const {dirname, extname, join, resolve: resolvePath} = require('path');
const {promisify} = require('util');

@@ -62,5 +62,16 @@ const {spawn} = require('child_process');

const prepareArgs = (async () => {
try {
await promisifiedWhich(command);
} catch {
const ext = extname(command).slice(1).toLowerCase();
let isJavaScriptFile = false;
if (ext === 'cjs' || ext === 'js' || ext === 'mjs') {
isJavaScriptFile = true;
} else {
try {
await promisifiedWhich(command);
} catch {
isJavaScriptFile = true;
}
}
if (isJavaScriptFile) {
let entryPath = resolvePath(cwd, command);

@@ -67,0 +78,0 @@

{
"name": "coverage",
"version": "0.1.2",
"version": "0.1.3",
"description": "A command-line tool to collect and report code coverage of a JavaScript program",

@@ -5,0 +5,0 @@ "author": "Shinnosuke Watanabe (https://github.com/shinnn)",