@macro-plugin/core
Advanced tools
Comparing version 1.1.4 to 1.2.0
# @macro-plugin/core | ||
## 1.2.0 | ||
### Minor Changes | ||
- [#33](https://github.com/macro-plugin/macros/pull/33) [`8c94045`](https://github.com/macro-plugin/macros/commit/8c9404545d207b708ed433328bd383488a3ed0d4) Thanks [@voorjaar](https://github.com/voorjaar)! - feat: new cursor context method | ||
- [#33](https://github.com/macro-plugin/macros/pull/33) [`b45063f`](https://github.com/macro-plugin/macros/commit/b45063ff784e513380f43bf8425c4f72eaa5c0b4) Thanks [@voorjaar](https://github.com/voorjaar)! - refactor: rename span to dummySpan | ||
## 1.1.4 | ||
@@ -4,0 +12,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { Identifier, StringLiteral, NumericLiteral, BigIntLiteral, BooleanLiteral, NullLiteral, RegExpLiteral, CallExpression, ClassProperty, PrivateProperty, Param, Constructor, ClassMethod, PrivateMethod, StaticBlock, Decorator, FunctionDeclaration, ClassDeclaration, VariableDeclaration, VariableDeclarator, OptionalChainingExpression, OptionalChainingCall, ThisExpression, ArrayExpression, ObjectExpression, SpreadElement, UnaryExpression, UpdateExpression, BinaryExpression, FunctionExpression, ClassExpression, AssignmentExpression, MemberExpression, SuperPropExpression, ConditionalExpression, Super, Import, NewExpression, SequenceExpression, ArrowFunctionExpression, YieldExpression, MetaProperty, AwaitExpression, TemplateLiteral, TaggedTemplateExpression, TemplateElement, ParenthesisExpression, PrivateName, JSXMemberExpression, JSXNamespacedName, JSXEmptyExpression, JSXExpressionContainer, JSXSpreadChild, JSXOpeningElement, JSXClosingElement, JSXAttribute, JSXText, JSXElement, JSXFragment, JSXOpeningFragment, JSXClosingFragment, ExportDefaultExpression, ExportDeclaration, ImportDeclaration, ExportAllDeclaration, ExportNamedDeclaration, ExportDefaultDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, NamedImportSpecifier, ExportNamespaceSpecifier, ExportDefaultSpecifier, NamedExportSpecifier, Module, Script, ArrayPattern, ObjectPattern, AssignmentPattern, RestElement, KeyValuePatternProperty, AssignmentPatternProperty, KeyValueProperty, AssignmentProperty, GetterProperty, SetterProperty, MethodProperty, ComputedPropName, BlockStatement, ExpressionStatement, EmptyStatement, DebuggerStatement, WithStatement, ReturnStatement, LabeledStatement, BreakStatement, ContinueStatement, IfStatement, SwitchStatement, ThrowStatement, TryStatement, WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, SwitchCase, CatchClause, TsTypeAnnotation, TsTypeParameterDeclaration, TsTypeParameter, TsTypeParameterInstantiation, TsParameterProperty, TsQualifiedName, TsCallSignatureDeclaration, TsConstructSignatureDeclaration, TsPropertySignature, TsGetterSignature, TsSetterSignature, TsMethodSignature, TsIndexSignature, TsKeywordType, TsThisType, TsFunctionType, TsConstructorType, TsTypeReference, TsTypePredicate, TsImportType, TsTypeQuery, TsTypeLiteral, TsArrayType, TsTupleType, TsTupleElement, TsOptionalType, TsRestType, TsUnionType, TsIntersectionType, TsConditionalType, TsInferType, TsParenthesizedType, TsTypeOperator, TsIndexedAccessType, TsMappedType, TsLiteralType, TsTemplateLiteralType, TsInterfaceDeclaration, TsInterfaceBody, TsExpressionWithTypeArguments, TsTypeAliasDeclaration, TsEnumDeclaration, TsEnumMember, TsModuleDeclaration, TsModuleBlock, TsNamespaceDeclaration, TsImportEqualsDeclaration, TsExternalModuleReference, TsExportAssignment, TsNamespaceExportDeclaration, TsAsExpression, TsInstantiation, TsTypeAssertion, TsConstAssertion, TsNonNullExpression, Invalid, Node, Declaration, Expression, Statement, ModuleItem, TsType, ParseOptions, Options, Plugin, Program, Pattern, Argument, ImportSpecifier, ExportSpecifier } from '@swc/core'; | ||
import { Identifier, StringLiteral, NumericLiteral, BigIntLiteral, BooleanLiteral, NullLiteral, RegExpLiteral, CallExpression, ClassProperty, PrivateProperty, Param, Constructor, ClassMethod, PrivateMethod, StaticBlock, Decorator, FunctionDeclaration, ClassDeclaration, VariableDeclaration, VariableDeclarator, OptionalChainingExpression, OptionalChainingCall, ThisExpression, ArrayExpression, ObjectExpression, SpreadElement, UnaryExpression, UpdateExpression, BinaryExpression, FunctionExpression, ClassExpression, AssignmentExpression, MemberExpression, SuperPropExpression, ConditionalExpression, Super, Import, NewExpression, SequenceExpression, ArrowFunctionExpression, YieldExpression, MetaProperty, AwaitExpression, TemplateLiteral, TaggedTemplateExpression, TemplateElement, ParenthesisExpression, PrivateName, JSXMemberExpression, JSXNamespacedName, JSXEmptyExpression, JSXExpressionContainer, JSXSpreadChild, JSXOpeningElement, JSXClosingElement, JSXAttribute, JSXText, JSXElement, JSXFragment, JSXOpeningFragment, JSXClosingFragment, ExportDefaultExpression, ExportDeclaration, ImportDeclaration, ExportAllDeclaration, ExportNamedDeclaration, ExportDefaultDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, NamedImportSpecifier, ExportNamespaceSpecifier, ExportDefaultSpecifier, NamedExportSpecifier, Module, Script, ArrayPattern, ObjectPattern, AssignmentPattern, RestElement, KeyValuePatternProperty, AssignmentPatternProperty, KeyValueProperty, AssignmentProperty, GetterProperty, SetterProperty, MethodProperty, ComputedPropName, BlockStatement, ExpressionStatement, EmptyStatement, DebuggerStatement, WithStatement, ReturnStatement, LabeledStatement, BreakStatement, ContinueStatement, IfStatement, SwitchStatement, ThrowStatement, TryStatement, WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, SwitchCase, CatchClause, TsTypeAnnotation, TsTypeParameterDeclaration, TsTypeParameter, TsTypeParameterInstantiation, TsParameterProperty, TsQualifiedName, TsCallSignatureDeclaration, TsConstructSignatureDeclaration, TsPropertySignature, TsGetterSignature, TsSetterSignature, TsMethodSignature, TsIndexSignature, TsKeywordType, TsThisType, TsFunctionType, TsConstructorType, TsTypeReference, TsTypePredicate, TsImportType, TsTypeQuery, TsTypeLiteral, TsArrayType, TsTupleType, TsTupleElement, TsOptionalType, TsRestType, TsUnionType, TsIntersectionType, TsConditionalType, TsInferType, TsParenthesizedType, TsTypeOperator, TsIndexedAccessType, TsMappedType, TsLiteralType, TsTemplateLiteralType, TsInterfaceDeclaration, TsInterfaceBody, TsExpressionWithTypeArguments, TsTypeAliasDeclaration, TsEnumDeclaration, TsEnumMember, TsModuleDeclaration, TsModuleBlock, TsNamespaceDeclaration, TsImportEqualsDeclaration, TsExternalModuleReference, TsExportAssignment, TsNamespaceExportDeclaration, TsAsExpression, TsInstantiation, TsTypeAssertion, TsConstAssertion, TsNonNullExpression, Invalid, Node, Declaration, Expression, Statement, ModuleItem, Span, TsType, ParseOptions, Options, Plugin, Program, Pattern, Argument, ImportSpecifier, ExportSpecifier } from '@swc/core'; | ||
export { Node, parseSync as parse, parse as parseAsync } from '@swc/core'; | ||
@@ -182,4 +182,6 @@ | ||
config: Config; | ||
/** Get current walking cursor */ | ||
cursor(): [number, number]; | ||
/** Get current walking node's span */ | ||
span(): [number, number]; | ||
span(ctxt?: number): Span; | ||
/** Save data to current plugin cache */ | ||
@@ -397,3 +399,8 @@ set<T>(key: string, data: T): void; | ||
defaultContext: { | ||
span: () => [number, number]; | ||
cursor: () => [number, number]; | ||
span: (ctxt?: undefined) => { | ||
start: number; | ||
end: number; | ||
ctxt: number; | ||
}; | ||
set: <T>(key: string, value: T) => void; | ||
@@ -546,2 +553,8 @@ get: <T_1>(key: string, defaultValue?: T_1 | undefined) => T_1; | ||
declare const dummySpan: { | ||
start: number; | ||
end: number; | ||
ctxt: number; | ||
}; | ||
declare function isMacroPlugin(v: unknown): boolean; | ||
@@ -555,7 +568,2 @@ declare function isMacroProxy(v: unknown): boolean; | ||
declare const noop: () => void; | ||
declare const span: { | ||
start: number; | ||
end: number; | ||
ctxt: number; | ||
}; | ||
declare function markedNode<T extends object>(marker: string, node: T): T; | ||
@@ -575,2 +583,2 @@ declare function unMarkNode<T extends object>(node: T): T; | ||
export { $Ast, $Column, $Concat, $Env, $Eval, $Expr, $ExprMacro, $ID, $Include, $IncludeJSON, $IncludeStr, $LabeledMacro, $Line, $LitMacro, $Macro, $Quote, $Span, $Stringify, $TmplMacro, $Todo, $TypeMacro, $UnImplemented, $UnReachable, $WriteFile, AST, BaseNode, Config, ExprMacro, GlobalMacro, GlobalMacroPlugin, LabeledMacro, MacroOptions, MacroPlugin, MacroPluginWithProxy, ScopeVar, TmplMacro, TrackFunc, TypeMacro, WalkContext, WalkFunc, WalkPlugin, Walker, createExprMacro, createLabeledBlock, createLabeledExpr, createLabeledMacro, createLit, createLitMacro, createMacro, createProxyMacro, createSwcPlugin, createTmplMacro, createTypeMacro, createWalkPlugin, decorator, defineConfig, evalAst, evalExpr, flatExpr, genConstType, genExportSpecifier, genImportSpecifier, genTsRef, genTypeImport, getSpanOffset, guessType, hash, hashMap, isMacroPlugin, isMacroProxy, isNode, isRegExp, macro, markedNode, noop, paramsToArgs, parseExpr, parseType, patternToExpr, print, printAst, printAsync, printExpr, printExprAsync, printRawTmpl, printTmpl, printType, printTypeAsync, span, transform, transformAst, transformAsync, unMarkNode, walk }; | ||
export { $Ast, $Column, $Concat, $Env, $Eval, $Expr, $ExprMacro, $ID, $Include, $IncludeJSON, $IncludeStr, $LabeledMacro, $Line, $LitMacro, $Macro, $Quote, $Span, $Stringify, $TmplMacro, $Todo, $TypeMacro, $UnImplemented, $UnReachable, $WriteFile, AST, BaseNode, Config, ExprMacro, GlobalMacro, GlobalMacroPlugin, LabeledMacro, MacroOptions, MacroPlugin, MacroPluginWithProxy, ScopeVar, TmplMacro, TrackFunc, TypeMacro, WalkContext, WalkFunc, WalkPlugin, Walker, createExprMacro, createLabeledBlock, createLabeledExpr, createLabeledMacro, createLit, createLitMacro, createMacro, createProxyMacro, createSwcPlugin, createTmplMacro, createTypeMacro, createWalkPlugin, decorator, defineConfig, dummySpan, evalAst, evalExpr, flatExpr, genConstType, genExportSpecifier, genImportSpecifier, genTsRef, genTypeImport, getSpanOffset, guessType, hash, hashMap, isMacroPlugin, isMacroProxy, isNode, isRegExp, macro, markedNode, noop, paramsToArgs, parseExpr, parseType, patternToExpr, print, printAst, printAsync, printExpr, printExprAsync, printRawTmpl, printTmpl, printType, printTypeAsync, transform, transformAst, transformAsync, unMarkNode, walk }; |
{ | ||
"name": "@macro-plugin/core", | ||
"version": "1.1.4", | ||
"version": "1.2.0", | ||
"description": "Macro system for JavaScript and TypeScript.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
293262
5083
19