detective-typescript
Advanced tools
Comparing version 11.1.0 to 11.2.0
26
index.js
@@ -51,3 +51,3 @@ 'use strict'; | ||
case 'ImportDeclaration': { | ||
if (skipTypeImports && node.importKind === 'type') { | ||
if (skipTypeImports && isTypeImports(node)) { | ||
break; | ||
@@ -65,2 +65,6 @@ } | ||
case 'ExportAllDeclaration': { | ||
if (skipTypeImports && isTypeExports(node)) { | ||
break; | ||
} | ||
if (node.source?.value) { | ||
@@ -137,1 +141,21 @@ dependencies.push(node.source.value); | ||
} | ||
function isTypeImports(node) { | ||
if (node.importKind === 'type') { | ||
return true; | ||
} | ||
if (node.specifiers?.length && node.specifiers?.every(n => n.importKind === 'type')) { | ||
return true; | ||
} | ||
} | ||
function isTypeExports(node) { | ||
if (node.exportKind === 'type') { | ||
return true; | ||
} | ||
if (node.specifiers?.length && node.specifiers?.every(n => n.exportKind === 'type')) { | ||
return true; | ||
} | ||
} |
{ | ||
"name": "detective-typescript", | ||
"version": "11.1.0", | ||
"version": "11.2.0", | ||
"author": "Patrik Henningsson <patrik.henningsson@gmail.com>", | ||
@@ -36,10 +36,10 @@ "description": "Get the dependencies of a TypeScript module", | ||
"dependencies": { | ||
"@typescript-eslint/typescript-estree": "^5.59.5", | ||
"@typescript-eslint/typescript-estree": "^5.62.0", | ||
"ast-module-types": "^5.0.0", | ||
"node-source-walk": "^6.0.1", | ||
"typescript": "^5.0.4" | ||
"node-source-walk": "^6.0.2", | ||
"typescript": "^5.4.4" | ||
}, | ||
"devDependencies": { | ||
"c8": "^7.13.0", | ||
"mocha": "^10.2.0", | ||
"c8": "^9.1.0", | ||
"mocha": "^10.4.0", | ||
"xo": "^0.54.2" | ||
@@ -46,0 +46,0 @@ }, |
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
7811
124
Updatednode-source-walk@^6.0.2
Updatedtypescript@^5.4.4