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

type-coverage-core

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-coverage-core - npm Package Compare versions

Comparing version 2.17.5 to 2.18.1

8

dist/cache.js

@@ -8,5 +8,5 @@ "use strict";

const crypto_1 = require("crypto");
const readFileAsync = util_1.promisify(fs.readFile);
const writeFileAsync = util_1.promisify(fs.writeFile);
const mkdirAsync = util_1.promisify(fs.mkdir);
const readFileAsync = (0, util_1.promisify)(fs.readFile);
const writeFileAsync = (0, util_1.promisify)(fs.writeFile);
const mkdirAsync = (0, util_1.promisify)(fs.mkdir);
async function getFileHash(file, enableCache) {

@@ -17,3 +17,3 @@ return enableCache ? calculateHash((await readFileAsync(file)).toString()) : '';

function calculateHash(str) {
return crypto_1.createHash('sha1').update(str).digest('hex');
return (0, crypto_1.createHash)('sha1').update(str).digest('hex');
}

@@ -20,0 +20,0 @@ async function saveCache(typeCheckResult) {

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

ts.SyntaxKind.BigIntKeyword,
ts.SyntaxKind.OverrideKeyword,
ts.SyntaxKind.OfKeyword,

@@ -778,0 +779,0 @@ ts.SyntaxKind.OptionalType,

@@ -17,3 +17,3 @@ "use strict";

const lintOptions = { ...defaultLintOptions, ...options };
const { rootNames, compilerOptions } = await tsconfig_1.getProjectRootNamesAndCompilerOptions(project);
const { rootNames, compilerOptions } = await (0, tsconfig_1.getProjectRootNamesAndCompilerOptions)(project);
const program = ts.createProgram(rootNames, compilerOptions, undefined, lintOptions.oldProgram);

@@ -23,3 +23,3 @@ const checker = program.getTypeChecker();

const sourceFileInfos = [];
const typeCheckResult = await cache_1.readCache(lintOptions.enableCache);
const typeCheckResult = await (0, cache_1.readCache)(lintOptions.enableCache);
const ignoreFileGlobs = lintOptions.ignoreFiles

@@ -43,3 +43,3 @@ ? (typeof lintOptions.ignoreFiles === 'string'

allFiles.add(file);
const hash = await cache_1.getFileHash(file, lintOptions.enableCache);
const hash = await (0, cache_1.getFileHash)(file, lintOptions.enableCache);
const cache = typeCheckResult.cache[file];

@@ -69,6 +69,6 @@ if (cache) {

if (lintOptions.enableCache) {
const dependencies = dependencies_1.collectDependencies(sourceFileInfos, allFiles);
const dependencies = (0, dependencies_1.collectDependencies)(sourceFileInfos, allFiles);
for (const sourceFileInfo of sourceFileInfos) {
if (!sourceFileInfo.cache) {
dependencies_1.clearCacheOfDependencies(sourceFileInfo, dependencies, sourceFileInfos);
(0, dependencies_1.clearCacheOfDependencies)(sourceFileInfo, dependencies, sourceFileInfos);
}

@@ -94,3 +94,3 @@ }

}
const ingoreMap = ignore_1.collectIgnoreMap(sourceFile, file);
const ingoreMap = (0, ignore_1.collectIgnoreMap)(sourceFile, file);
const context = {

@@ -118,3 +118,3 @@ file,

sourceFile.forEachChild(node => {
checker_1.checkNode(node, context);
(0, checker_1.checkNode)(node, context);
});

@@ -147,3 +147,3 @@ correctCount += context.typeCheckResult.correctCount;

if (lintOptions.enableCache) {
await cache_1.saveCache(typeCheckResult);
await (0, cache_1.saveCache)(typeCheckResult);
}

@@ -206,3 +206,3 @@ return { correctCount, totalCount, anys, program, fileCounts };

for (const { sourceFile, file } of sourceFileInfos) {
const ingoreMap = ignore_1.collectIgnoreMap(sourceFile, file);
const ingoreMap = (0, ignore_1.collectIgnoreMap)(sourceFile, file);
const context = {

@@ -230,3 +230,3 @@ file,

sourceFile.forEachChild(node => {
checker_1.checkNode(node, context);
(0, checker_1.checkNode)(node, context);
});

@@ -233,0 +233,0 @@ correctCount += context.typeCheckResult.correctCount;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./core"), exports);
tslib_1.__exportStar(require("./interfaces"), exports);
(0, tslib_1.__exportStar)(require("./core"), exports);
(0, tslib_1.__exportStar)(require("./interfaces"), exports);
{
"name": "type-coverage-core",
"version": "2.17.5",
"version": "2.18.1",
"description": "A library to check type coverage for typescript code",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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