@weapp-vite/ast 6.16.11 → 6.16.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/babel.d.mts
CHANGED
|
@@ -10,8 +10,11 @@ declare const BABEL_TS_MODULE_PARSER_OPTIONS: ParserOptions;
|
|
|
10
10
|
type BabelTraverse = typeof _$_babel_traverse0.default;
|
|
11
11
|
type BabelGenerate = typeof _$_babel_generator0.default;
|
|
12
12
|
type BabelParse = typeof _$_babel_parser0.parse;
|
|
13
|
+
type BabelGeneratorOptions = Parameters<BabelGenerate>[1];
|
|
14
|
+
type BabelGeneratorInputCode = Parameters<BabelGenerate>[2];
|
|
15
|
+
type BabelGeneratorResult = ReturnType<BabelGenerate>;
|
|
13
16
|
type TraverseFn = (...args: Parameters<BabelTraverse>) => ReturnType<BabelTraverse>;
|
|
14
|
-
type GenerateFn = (
|
|
17
|
+
type GenerateFn = (ast: _$_babel_types0.Node, opts?: BabelGeneratorOptions, code?: BabelGeneratorInputCode) => BabelGeneratorResult;
|
|
15
18
|
declare const traverse: TraverseFn;
|
|
16
19
|
declare const generate: GenerateFn;
|
|
17
20
|
declare const parse: BabelParse;
|
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { parseJsLikeWithEngine } from "./engine.mjs";
|
|
|
5
5
|
import { ComponentPropMap, collectComponentPropsFromCode, collectComponentPropsWithBabel, collectComponentPropsWithOxc, extractComponentProperties, extractPropertiesObject, getStaticPropertyName, mapConstructorName, mayContainComponentPropsShape, mergeComponentPropTypes, resolveOptionsObjectExpression, resolveOptionsObjectExpressionWithBabel, resolveTypeFromNode } from "./operations/componentProps.mjs";
|
|
6
6
|
import { FeatureFlagOptions, collectFeatureFlagsFromCode, collectFeatureFlagsWithBabel, collectFeatureFlagsWithOxc, consumeNamedFeatureFlag, consumeNamespaceFeatureFlag, mayContainFeatureFlagHints, registerNamedFeatureFlagLocal, registerNamespaceFeatureFlagLocal } from "./operations/featureFlags.mjs";
|
|
7
7
|
import { JsxAutoComponentAnalysisOptions, JsxAutoComponentContext, JsxBabelModuleAnalysisOptions, JsxImportedComponent, collectJsxAutoComponentsFromCode, collectJsxAutoComponentsWithBabel, collectJsxAutoComponentsWithOxc, collectJsxImportedComponentsAndDefaultExportFromBabelAst, collectJsxTemplateTagsFromBabelExpression, collectJsxTemplateTagsFromOxc, createJsxImportedComponent, defaultIsDefineComponentSource, defaultResolveBabelComponentExpression, defaultResolveBabelRenderExpression, getJsxImportLocalName, getJsxImportedName, getJsxOxcStaticPropertyName, isJsxDefineComponentImportSpecifier, mayContainJsxAutoComponentEntry, resolveOxcComponentExpression, resolveOxcRenderExpression, unwrapOxcExpression } from "./operations/jsxAutoComponents.mjs";
|
|
8
|
-
import { _ as collectOnPageScrollWarningsWithBabel, a as getLocationFromOffset, c as getOxcCallExpressionCalleeName, d as isOnPageScrollCallee, f as isOxcFunctionLike, g as collectPageScrollInspectionWithOxc, h as collectOnPageScrollWarningsWithOxc, i as getCallExpressionCalleeName, l as getOxcMemberExpressionPropertyName, m as isStaticPropertyName, n as createLineStartOffsets, o as getMemberExpressionPropertyName, p as isOxcOnPageScrollCallee, r as createWarningPrefix, s as getOnPageScrollCallbackArgument, t as collectOnPageScrollPerformanceWarnings, u as getOxcStaticPropertyName, v as collectPageScrollInspection } from "./onPageScroll-
|
|
8
|
+
import { _ as collectOnPageScrollWarningsWithBabel, a as getLocationFromOffset, c as getOxcCallExpressionCalleeName, d as isOnPageScrollCallee, f as isOxcFunctionLike, g as collectPageScrollInspectionWithOxc, h as collectOnPageScrollWarningsWithOxc, i as getCallExpressionCalleeName, l as getOxcMemberExpressionPropertyName, m as isStaticPropertyName, n as createLineStartOffsets, o as getMemberExpressionPropertyName, p as isOxcOnPageScrollCallee, r as createWarningPrefix, s as getOnPageScrollCallbackArgument, t as collectOnPageScrollPerformanceWarnings, u as getOxcStaticPropertyName, v as collectPageScrollInspection } from "./onPageScroll-C9pqH5L1.mjs";
|
|
9
9
|
import { hasPlatformApiMemberExpression, isPlatformApiIdentifier, isPlatformApiMemberExpression, mayContainPlatformApiAccess, mayContainPlatformApiIdentifierByText, platformApiIdentifierList, platformApiIdentifiers } from "./operations/platformApi.mjs";
|
|
10
10
|
import { RequireToken, collectRequireTokens, getRequireAsyncLiteralToken, getStaticRequireLiteralValue, hasStaticRequireCall, isStaticRequireCall, mayContainRequireCallByText, mayContainStaticRequireLiteral } from "./operations/require.mjs";
|
|
11
11
|
import { ScriptSetupImport, collectScriptSetupImportsFromCode, collectScriptSetupImportsWithBabel, collectScriptSetupImportsWithOxc, createScriptSetupImport, getScriptSetupImportedName, mayContainRelevantScriptSetupImports } from "./operations/scriptSetupImports.mjs";
|
|
@@ -27,7 +27,7 @@ declare function isOnPageScrollCallee(callee: t.Expression | t.V8IntrinsicIdenti
|
|
|
27
27
|
declare function getCallExpressionCalleeName(callee: t.Expression | t.V8IntrinsicIdentifier): string | undefined;
|
|
28
28
|
declare function getOnPageScrollCallbackArgument(node: {
|
|
29
29
|
arguments?: Array<t.Expression | t.SpreadElement | t.ArgumentPlaceholder | null>;
|
|
30
|
-
}): t.
|
|
30
|
+
}): t.FunctionExpression | t.ArrowFunctionExpression | undefined;
|
|
31
31
|
declare function createWarningPrefix(filename: string, line?: number, column?: number): string;
|
|
32
32
|
declare function getOxcStaticPropertyName(node: any): string | undefined;
|
|
33
33
|
declare function getOxcMemberExpressionPropertyName(node: any): string | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as collectOnPageScrollWarningsWithBabel, a as getLocationFromOffset, c as getOxcCallExpressionCalleeName, d as isOnPageScrollCallee, f as isOxcFunctionLike, g as collectPageScrollInspectionWithOxc, h as collectOnPageScrollWarningsWithOxc, i as getCallExpressionCalleeName, l as getOxcMemberExpressionPropertyName, m as isStaticPropertyName, n as createLineStartOffsets, o as getMemberExpressionPropertyName, p as isOxcOnPageScrollCallee, r as createWarningPrefix, s as getOnPageScrollCallbackArgument, t as collectOnPageScrollPerformanceWarnings, u as getOxcStaticPropertyName, v as collectPageScrollInspection } from "../onPageScroll-
|
|
1
|
+
import { _ as collectOnPageScrollWarningsWithBabel, a as getLocationFromOffset, c as getOxcCallExpressionCalleeName, d as isOnPageScrollCallee, f as isOxcFunctionLike, g as collectPageScrollInspectionWithOxc, h as collectOnPageScrollWarningsWithOxc, i as getCallExpressionCalleeName, l as getOxcMemberExpressionPropertyName, m as isStaticPropertyName, n as createLineStartOffsets, o as getMemberExpressionPropertyName, p as isOxcOnPageScrollCallee, r as createWarningPrefix, s as getOnPageScrollCallbackArgument, t as collectOnPageScrollPerformanceWarnings, u as getOxcStaticPropertyName, v as collectPageScrollInspection } from "../onPageScroll-C9pqH5L1.mjs";
|
|
2
2
|
export { collectOnPageScrollPerformanceWarnings, collectOnPageScrollWarningsWithBabel, collectOnPageScrollWarningsWithOxc, collectPageScrollInspection, collectPageScrollInspectionWithOxc, createLineStartOffsets, createWarningPrefix, getCallExpressionCalleeName, getLocationFromOffset, getMemberExpressionPropertyName, getOnPageScrollCallbackArgument, getOxcCallExpressionCalleeName, getOxcMemberExpressionPropertyName, getOxcStaticPropertyName, isOnPageScrollCallee, isOxcFunctionLike, isOxcOnPageScrollCallee, isStaticPropertyName };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-vite/ast",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.16.
|
|
4
|
+
"version": "6.16.13",
|
|
5
5
|
"description": "weapp-vite 共享 AST 分析工具包,统一 Babel/Oxc 解析与常用分析操作",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
"@babel/parser": "^7.29.3",
|
|
107
107
|
"@babel/traverse": "^7.29.0",
|
|
108
108
|
"@babel/types": "^7.29.0",
|
|
109
|
-
"@oxc-project/types": "^0.
|
|
110
|
-
"oxc-parser": "^0.
|
|
109
|
+
"@oxc-project/types": "^0.130.0",
|
|
110
|
+
"oxc-parser": "^0.130.0",
|
|
111
111
|
"oxc-walker": "^1.0.0",
|
|
112
112
|
"@weapp-core/shared": "3.0.4"
|
|
113
113
|
},
|