Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

detective-typescript

Package Overview
Dependencies
Maintainers
3
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 5.4.0 to 5.5.0

14

index.js

@@ -13,5 +13,13 @@ 'use strict';

module.exports = function(src, options = {}) {
options.parser = Parser;
const walker = new Walker(options);
const walkerOptions = Object.assign({}, options, {parser: Parser});
// Determine whether to skip "type-only" imports
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#import-types
const skipTypeImports = Boolean(options.skipTypeImports);
// Remove skipTypeImports option, as this option may not be recognized by the walker/parser
delete walkerOptions.skipTypeImports;
const walker = new Walker(walkerOptions);
const dependencies = [];

@@ -51,3 +59,3 @@

case 'TSImportType':
if (node.parameter.type === 'TSLiteralType') {
if (!skipTypeImports && node.parameter.type === 'TSLiteralType') {
dependencies.push(node.parameter.literal.value);

@@ -54,0 +62,0 @@ }

{
"name": "detective-typescript",
"version": "5.4.0",
"version": "5.5.0",
"author": "Patrik Henningsson <patrik.henningsson@gmail.com>",

@@ -5,0 +5,0 @@ "description": "Get the dependencies of a TypeScript module",

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