type-coverage-core
Advanced tools
Comparing version 2.0.4 to 2.1.0
@@ -60,3 +60,2 @@ "use strict"; | ||
} | ||
// tslint:disable-next-line:no-big-function | ||
function checkNode(node, context) { | ||
@@ -72,3 +71,2 @@ if (node === undefined) { | ||
checkNodes(node.modifiers, context); | ||
// tslint:disable-next-line:max-switch-cases | ||
switch (node.kind) { | ||
@@ -75,0 +73,0 @@ case typescript_1.default.SyntaxKind.Unknown: |
@@ -7,3 +7,3 @@ "use strict"; | ||
const minimatch_1 = tslib_1.__importDefault(require("minimatch")); | ||
const tsconfig_1 = require("./tsconfig"); | ||
const ts_lib_utils_1 = require("ts-lib-utils"); | ||
const checker_1 = require("./checker"); | ||
@@ -16,12 +16,5 @@ const dependencies_1 = require("./dependencies"); | ||
*/ | ||
// tslint:disable-next-line:no-big-function cognitive-complexity | ||
async function lint(project, options) { | ||
const lintOptions = { ...defaultLintOptions, ...options }; | ||
const { configFilePath, dirname } = tsconfig_1.getTsConfigFilePath(project); | ||
const config = tsconfig_1.getTsConfig(configFilePath, dirname); | ||
const { options: compilerOptions, errors } = typescript_1.default.convertCompilerOptionsFromJson(config.compilerOptions, dirname); | ||
if (errors && errors.length > 0) { | ||
throw errors; | ||
} | ||
const rootNames = await tsconfig_1.getRootNames(config, dirname); | ||
const { rootNames, compilerOptions } = await ts_lib_utils_1.getProjectRootNamesAndCompilerOptions(project); | ||
const program = typescript_1.default.createProgram(rootNames, compilerOptions, undefined, lintOptions.oldProgram); | ||
@@ -65,3 +58,3 @@ const checker = program.getTypeChecker(); | ||
let totalCount = 0; | ||
let anys = []; | ||
const anys = []; | ||
for (const { sourceFile, file, hash, cache } of sourceFileInfos) { | ||
@@ -68,0 +61,0 @@ if (cache) { |
{ | ||
"name": "type-coverage-core", | ||
"version": "2.0.4", | ||
"version": "2.1.0", | ||
"description": "A library to check type coverage for typescript code", | ||
@@ -11,4 +11,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"glob": "7.1.4", | ||
"minimatch": "3.0.4", | ||
"minimatch": "3", | ||
"ts-lib-utils": "^2.1.0", | ||
"tslib": "1", | ||
@@ -23,3 +23,3 @@ "tsutils": "3" | ||
}, | ||
"gitHead": "10be616aa6cd84cd26be0f32bbab158180501901" | ||
"gitHead": "51790ee62d6bf009a9eb5628e8e4eb181a75dba5" | ||
} |
2
61161
17
1269
+ Addedts-lib-utils@^2.1.0
+ Addedminimatch@3.1.2(transitive)
+ Addedts-lib-utils@2.18.0(transitive)
- Removedglob@7.1.4
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.1.4(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimatch@3.0.4(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedminimatch@3