Socket
Socket
Sign inDemoInstall

knip

Package Overview
Dependencies
Maintainers
1
Versions
407
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knip - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

19

dist/runner.js

@@ -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": {

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