Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

type-coverage

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-coverage - npm Package Compare versions

Comparing version 2.17.5 to 2.18.0

25

dist/index.js

@@ -36,2 +36,3 @@ "use strict";

--show-relative-path boolean? show relative path in detail message
--history-file string? file name where history is saved
`);

@@ -50,3 +51,3 @@ }

}
const { atLeast, debug, detail, enableCache, ignoreCatch, ignoreFiles, ignoreUnread, is, project, strict, update, ignoreNested, ignoreAsAssertion, ignoreTypeAssertion, ignoreNonNullAssertion, showRelativePath, } = await getTarget(argv);
const { atLeast, debug, detail, enableCache, ignoreCatch, ignoreFiles, ignoreUnread, is, project, strict, update, ignoreNested, ignoreAsAssertion, ignoreTypeAssertion, ignoreNonNullAssertion, showRelativePath, historyFile, } = await getTarget(argv);
const { correctCount, totalCount, anys } = await type_coverage_core_1.lint(project, {

@@ -78,2 +79,5 @@ debug,

}
if (historyFile) {
await saveHistory(+percentString, historyFile);
}
if (atLeastFailed) {

@@ -126,2 +130,3 @@ throw new Error(`The type coverage rate(${percentString}%) is lower than the target(${atLeast}%).`);

const showRelativePath = getArgOrCfgVal(['show-relative-path', 'showRelativePath']);
const historyFile = getArgOrCfgVal(['history-file', 'historyFile']);
return {

@@ -144,2 +149,3 @@ atLeast,

showRelativePath,
historyFile,
};

@@ -162,2 +168,19 @@ }

}
async function saveHistory(percentage, historyFile) {
if (historyFile) {
const historyFilePath = path.resolve(process.cwd(), historyFile);
if (await existsAsync(historyFilePath)) {
const date = new Date().toISOString();
const historyFile = JSON.parse((await readFileAsync(historyFilePath)).toString());
historyFile[date] = percentage;
await writeFileAsync(historyFilePath, JSON.stringify(historyFile, null, 2) + '\n');
}
else {
const date = new Date().toISOString();
const historyFile = {};
historyFile[date] = percentage;
await writeFileAsync(historyFilePath, JSON.stringify(historyFile, null, 2) + '\n');
}
}
}
executeCommandLine().then(() => {

@@ -164,0 +187,0 @@ console.log('type-coverage success.');

2

package.json
{
"name": "type-coverage",
"version": "2.17.5",
"version": "2.18.0",
"description": "A CLI tool to check type coverage for typescript code",

@@ -5,0 +5,0 @@ "repository": "https://github.com/plantain-00/type-coverage.git",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc