Socket
Socket
Sign inDemoInstall

tsutils

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsutils - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 3.2.0
**Features:**
* added utility `findImportLikeNodes` that works similar to `findImports` but returns the import statement or expression instead of the module specifier and doesn't filter non-string module specifiers
# 3.1.0

@@ -2,0 +8,0 @@

8

package.json
{
"name": "tsutils",
"version": "3.1.0",
"version": "3.2.0",
"description": "utilities for working with typescript's AST",

@@ -34,4 +34,4 @@ "scripts": {

"devDependencies": {
"@fimbul/valtyr": "^0.12.0",
"@fimbul/wotan": "^0.12.0",
"@fimbul/valtyr": "^0.15.0",
"@fimbul/wotan": "^0.15.0",
"@types/chai": "^4.0.10",

@@ -51,3 +51,3 @@ "@types/mocha": "^5.0.0",

"peerDependencies": {
"typescript": ">=2.8.0 || >= 3.2.0-dev"
"typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev"
},

@@ -54,0 +54,0 @@ "dependencies": {

@@ -133,3 +133,3 @@ import * as ts from 'typescript';

export declare function isTemplateLiteral(node: ts.Node): node is ts.TemplateLiteral;
export declare function isTextualLiteral(node: ts.Node): node is ts.LiteralExpression;
export declare function isTextualLiteral(node: ts.Node): node is ts.StringLiteral | ts.NoSubstitutionTemplateLiteral;
export declare function isThrowStatement(node: ts.Node): node is ts.ThrowStatement;

@@ -136,0 +136,0 @@ export declare function isTryStatement(node: ts.Node): node is ts.TryStatement;

@@ -106,3 +106,14 @@ import * as ts from 'typescript';

}
export declare function findImports(sourceFile: ts.SourceFile, kinds: ImportKind): ts.LiteralExpression[];
export declare function findImports(sourceFile: ts.SourceFile, kinds: ImportKind): (ts.StringLiteral | ts.NoSubstitutionTemplateLiteral)[];
export declare type ImportLike = ts.ImportDeclaration | (ts.ImportEqualsDeclaration & {
moduleReference: ts.ExternalModuleReference;
}) | (ts.ExportDeclaration & {
moduleSpecifier: {};
}) | (ts.CallExpression & {
expression: ts.Token<ts.SyntaxKind.ImportKeyword> | (ts.Identifier & {
text: 'require';
});
arguments: [ts.Expression];
}) | ts.ImportTypeNode;
export declare function findImportLikeNodes(sourceFile: ts.SourceFile, kinds: ImportKind): ImportLike[];
export declare function isStatementInAmbientContext(node: ts.Statement): boolean;

@@ -109,0 +120,0 @@ export declare function isAmbientModuleBlock(node: ts.Node): node is ts.ModuleBlock;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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