Socket
Socket
Sign inDemoInstall

ast-kit

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-kit - npm Package Compare versions

Comparing version 0.6.5 to 0.6.6

dist/index.d.cts

6

./dist/index.js

@@ -451,4 +451,3 @@ // src/check.ts

for (const specifier of node.specifiers) {
if (specifier.type === "ImportSpecifier" && specifier.importKind === "type")
continue;
const isType = specifier.type === "ImportSpecifier" && specifier.importKind === "type";
const local = specifier.local.name;

@@ -460,3 +459,4 @@ const imported = specifier.type === "ImportSpecifier" ? resolveString(specifier.imported) : specifier.type === "ImportNamespaceSpecifier" ? "*" : "default";

imported,
specifier
specifier,
isType
};

@@ -463,0 +463,0 @@ }

@@ -37,2 +37,4 @@ import { Function, Literal, Node, CallExpression, Identifier, Program, Expression, PrivateName, ThisExpression, Super, TemplateLiteral, MemberExpression, ImportSpecifier, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportDeclaration } from '@babel/types';

type LiteralUnion<LiteralType, BaseType extends null | undefined | string | number | boolean | symbol | bigint = string> = LiteralType | (BaseType & Record<never, never>);
declare const TS_NODE_TYPES: readonly ["TSAsExpression", "TSTypeAssertion", "TSNonNullExpression", "TSInstantiationExpression", "TSSatisfiesExpression"];

@@ -58,8 +60,9 @@ declare function unwrapTSNode(node: Node): Node;

local: string;
imported: string;
imported: LiteralUnion<'*' | 'default'>;
source: string;
specifier: ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier;
isType: boolean;
}
declare function walkImportDeclaration(imports: Record<string, ImportBinding>, node: ImportDeclaration): void;
export { GetNode, ImportBinding, REGEX_DTS, REGEX_LANG_JSX, REGEX_LANG_TS, TS_NODE_TYPES, WithScope, attachScopes, babelParse, babelParseExpression, escapeKey, getLang, isCallOf, isDts, isFunctionType, isIdentifierOf, isLiteralType, isTs, isTypeOf, resolveIdentifier, resolveLiteral, resolveString, resolveTemplateLiteral, unwrapTSNode, walkAST, walkASTAsync, walkImportDeclaration };
export { GetNode, ImportBinding, LiteralUnion, REGEX_DTS, REGEX_LANG_JSX, REGEX_LANG_TS, TS_NODE_TYPES, WithScope, attachScopes, babelParse, babelParseExpression, escapeKey, getLang, isCallOf, isDts, isFunctionType, isIdentifierOf, isLiteralType, isTs, isTypeOf, resolveIdentifier, resolveLiteral, resolveString, resolveTemplateLiteral, unwrapTSNode, walkAST, walkASTAsync, walkImportDeclaration };

@@ -451,4 +451,3 @@ // src/check.ts

for (const specifier of node.specifiers) {
if (specifier.type === "ImportSpecifier" && specifier.importKind === "type")
continue;
const isType = specifier.type === "ImportSpecifier" && specifier.importKind === "type";
const local = specifier.local.name;

@@ -460,3 +459,4 @@ const imported = specifier.type === "ImportSpecifier" ? resolveString(specifier.imported) : specifier.type === "ImportNamespaceSpecifier" ? "*" : "default";

imported,
specifier
specifier,
isType
};

@@ -463,0 +463,0 @@ }

{
"name": "ast-kit",
"version": "0.6.5",
"version": "0.6.6",
"packageManager": "pnpm@8.6.0",

@@ -24,3 +24,6 @@ "description": "AST Toolkit.",

".": {
"types": "./dist/index.d.ts",
"types": {
"import": "./dist/index.d.ts",
"require": "./dist/index.d.cts"
},
"import": "./dist/index.js",

@@ -35,22 +38,23 @@ "require": "./dist/index.cjs"

"dependencies": {
"@babel/parser": "^7.22.4",
"@babel/parser": "^7.22.7",
"@rollup/pluginutils": "^5.0.2",
"pathe": "^1.1.0"
"pathe": "^1.1.1"
},
"devDependencies": {
"@babel/types": "^7.22.4",
"@sxzz/eslint-config": "^3.0.0-beta.12",
"@types/node": "^18.16.16",
"@vitest/coverage-c8": "^0.31.4",
"@vitest/ui": "^0.32.0",
"bumpp": "^9.1.0",
"eslint": "^8.41.0",
"eslint-define-config": "^1.20.0",
"@babel/types": "^7.22.5",
"@sxzz/eslint-config": "^3.1.2",
"@sxzz/prettier-config": "^1.0.3",
"@types/node": "^20.4.0",
"@vitest/coverage-c8": "^0.33.0",
"@vitest/ui": "^0.33.0",
"bumpp": "^9.1.1",
"eslint": "^8.44.0",
"eslint-define-config": "^1.21.0",
"estree-walker": "^3.0.3",
"fast-glob": "^3.2.12",
"prettier": "^2.8.8",
"tsup": "^6.7.0",
"fast-glob": "^3.3.0",
"prettier": "^3.0.0",
"tsup": "^7.1.0",
"tsx": "^3.12.7",
"typescript": "^5.0.4",
"vitest": "^0.31.1"
"typescript": "^5.1.6",
"vitest": "^0.33.0"
},

@@ -60,2 +64,3 @@ "engines": {

},
"prettier": "@sxzz/prettier-config",
"scripts": {

@@ -62,0 +67,0 @@ "lint": "eslint .",

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