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.23.0 to 2.24.0

4

dist/cache.d.ts
import { TypeCheckResult } from './interfaces';
export declare function getFileHash(file: string, enableCache: boolean): Promise<string>;
export declare function saveCache(typeCheckResult: TypeCheckResult): Promise<void>;
export declare function readCache(enableCache: boolean): Promise<TypeCheckResult>;
export declare function saveCache(typeCheckResult: TypeCheckResult, dirName?: string): Promise<void>;
export declare function readCache(enableCache: boolean, dirName?: string): Promise<TypeCheckResult>;

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

}
async function saveCache(typeCheckResult) {
await mkdirIfmissing();
async function saveCache(typeCheckResult, dirName = defaultDirName) {
await mkdirIfmissing(dirName);
await writeFileAsync(path.resolve(dirName, 'result.json'), JSON.stringify(typeCheckResult, null, 2));
}
exports.saveCache = saveCache;
const dirName = '.type-coverage';
const defaultDirName = '.type-coverage';
function statAsync(p) {

@@ -37,3 +37,3 @@ return new Promise((resolve) => {

}
async function mkdirIfmissing() {
async function mkdirIfmissing(dirName = defaultDirName) {
const stats = await statAsync(dirName);

@@ -44,3 +44,3 @@ if (!stats) {

}
async function readCache(enableCache) {
async function readCache(enableCache, dirName = defaultDirName) {
if (!enableCache) {

@@ -47,0 +47,0 @@ return {

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

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

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

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

@@ -173,0 +173,0 @@ return { correctCount, totalCount, anys, program, fileCounts };

@@ -33,3 +33,3 @@ import * as ts from 'typescript';

*/
export declare type ProccessAny = (node: ts.Node, context: FileContext) => boolean;
export type ProccessAny = (node: ts.Node, context: FileContext) => boolean;
export interface LintOptions extends CommonOptions {

@@ -43,2 +43,3 @@ files?: string[];

reportSemanticError: boolean;
cacheDirectory?: string;
}

@@ -45,0 +46,0 @@ interface CommonOptions {

{
"name": "type-coverage-core",
"version": "2.23.0",
"version": "2.24.0",
"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