Comparing version 0.8.0 to 0.8.1
@@ -22,6 +22,6 @@ "use strict"; | ||
const [usedEntryFiles, usedNonEntryFiles] = (0, project_1.partitionSourceFiles)(usedProductionFiles, entryFiles); | ||
(0, debug_1.debugLogSourceFiles)(configuration, 1, 'usedProductionFiles', usedProductionFiles); | ||
(0, debug_1.debugLogSourceFiles)(configuration, 1, 'unreferencedProductionFiles', unreferencedProductionFiles); | ||
(0, debug_1.debugLogSourceFiles)(configuration, 1, 'usedEntryFiles', usedEntryFiles); | ||
(0, debug_1.debugLogSourceFiles)(configuration, 1, 'usedNonEntryFiles', usedNonEntryFiles); | ||
(0, debug_1.debugLogSourceFiles)(configuration, 1, 'Used production files', usedProductionFiles); | ||
(0, debug_1.debugLogSourceFiles)(configuration, 1, 'Unreferenced production files', unreferencedProductionFiles); | ||
(0, debug_1.debugLogSourceFiles)(configuration, 1, 'Used entry files', usedEntryFiles); | ||
(0, debug_1.debugLogSourceFiles)(configuration, 1, 'Used non-entry files', usedNonEntryFiles); | ||
const issues = { | ||
@@ -107,3 +107,3 @@ files: new Set(unreferencedProductionFiles.map(file => file.getFilePath())), | ||
} | ||
if (!isIncludeEntryFiles && entryFiles.includes(sourceFile)) | ||
if (!isIncludeEntryFiles && usedEntryFiles.includes(sourceFile)) | ||
return; | ||
@@ -133,4 +133,9 @@ if (report.exports || report.types || report.nsExports || report.nsTypes) { | ||
else if (declaration.isKind(ts_morph_1.ts.SyntaxKind.ArrowFunction) || | ||
declaration.isKind(ts_morph_1.ts.SyntaxKind.ObjectLiteralExpression)) { | ||
fakeIdentifier = 'default'; | ||
declaration.isKind(ts_morph_1.ts.SyntaxKind.ObjectLiteralExpression) || | ||
declaration.isKind(ts_morph_1.ts.SyntaxKind.ArrayLiteralExpression) || | ||
declaration.isKind(ts_morph_1.ts.SyntaxKind.StringLiteral) || | ||
declaration.isKind(ts_morph_1.ts.SyntaxKind.NumericLiteral)) { | ||
if (!(0, ts_morph_helpers_1.hasReferencingDefaultImport)(sourceFile)) { | ||
fakeIdentifier = 'default'; | ||
} | ||
} | ||
@@ -137,0 +142,0 @@ else if (declaration.isKind(ts_morph_1.ts.SyntaxKind.FunctionDeclaration) || |
{ | ||
"name": "knip", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "Find unused files, dependencies and exports in your TypeScript and JavaScript project", | ||
@@ -48,3 +48,3 @@ "keywords": [ | ||
"ts-morph": "16.0.0", | ||
"ts-morph-helpers": "0.5.1" | ||
"ts-morph-helpers": "0.6.0" | ||
}, | ||
@@ -51,0 +51,0 @@ "devDependencies": { |
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
76230
1163
+ Addedts-morph-helpers@0.6.0(transitive)
- Removedts-morph-helpers@0.5.1(transitive)
Updatedts-morph-helpers@0.6.0