type-coverage
Advanced tools
Comparing version 1.4.4 to 1.4.5
@@ -5,5 +5,10 @@ "use strict"; | ||
const minimist_1 = tslib_1.__importDefault(require("minimist")); | ||
const fs = tslib_1.__importStar(require("fs")); | ||
const util = tslib_1.__importStar(require("util")); | ||
const path = tslib_1.__importStar(require("path")); | ||
const packageJson = tslib_1.__importStar(require("../package.json")); | ||
const core_1 = require("./core"); | ||
let suppressError = false; | ||
const existsAsync = util.promisify(fs.exists); | ||
const readFileAsync = util.promisify(fs.readFile); | ||
function showToolVersion() { | ||
@@ -28,4 +33,8 @@ console.log(`Version: ${packageJson.version}`); | ||
let atLeast; | ||
if (packageJson.typeCoverage && packageJson.typeCoverage.atLeast) { | ||
atLeast = packageJson.typeCoverage.atLeast; | ||
const packageJsonPath = path.resolve(process.cwd(), 'package.json'); | ||
if (await existsAsync(packageJsonPath)) { | ||
const currentPackageJson = JSON.parse((await readFileAsync(packageJsonPath)).toString()); | ||
if (currentPackageJson.typeCoverage && currentPackageJson.typeCoverage.atLeast) { | ||
atLeast = currentPackageJson.typeCoverage.atLeast; | ||
} | ||
} | ||
@@ -32,0 +41,0 @@ if (argv['at-least']) { |
{ | ||
"name": "type-coverage", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"description": "A CLI tool to check type coverage for typescript code", | ||
@@ -5,0 +5,0 @@ "main": "dist/core.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63258
1077
3