Socket
Socket
Sign inDemoInstall

detective-typescript

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detective-typescript - npm Package Compare versions

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;
}
}

12

package.json
{
"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 @@ },

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