@vue/compiler-core
Advanced tools
Comparing version 3.1.5 to 3.2.0-beta.1
@@ -12,3 +12,3 @@ import { generateCodeFrame } from '@vue/shared'; | ||
type: NodeTypes.JS_ARRAY_EXPRESSION; | ||
elements: Array<string | JSChildNode>; | ||
elements: Array<string | Node_2>; | ||
} | ||
@@ -222,3 +222,3 @@ | ||
tagType: ElementTypes.COMPONENT; | ||
codegenNode: VNodeCall | CacheExpression | undefined; | ||
codegenNode: VNodeCall | CacheExpression | MemoExpression | undefined; | ||
ssrCodegenNode?: CallExpression; | ||
@@ -235,2 +235,3 @@ } | ||
identifiers?: string[]; | ||
isHandlerKey?: boolean; | ||
} | ||
@@ -271,2 +272,6 @@ | ||
export declare const CREATE_ELEMENT_BLOCK: unique symbol; | ||
export declare const CREATE_ELEMENT_VNODE: unique symbol; | ||
export declare const CREATE_SLOTS: unique symbol; | ||
@@ -298,3 +303,3 @@ | ||
export declare function createForLoopParams({ value, key, index }: ForParseResult): ExpressionNode[]; | ||
export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[]; | ||
@@ -317,3 +322,3 @@ export declare function createFunctionExpression(params: FunctionExpression['params'], returns?: FunctionExpression['returns'], newline?: boolean, isSlot?: boolean, loc?: SourceLocation): FunctionExpression; | ||
export declare function createSimpleExpression(content: SimpleExpressionNode['content'], isStatic: SimpleExpressionNode['isStatic'], loc?: SourceLocation, constType?: ConstantTypes): SimpleExpressionNode; | ||
export declare function createSimpleExpression(content: SimpleExpressionNode['content'], isStatic?: SimpleExpressionNode['isStatic'], loc?: SourceLocation, constType?: ConstantTypes): SimpleExpressionNode; | ||
@@ -324,5 +329,5 @@ export declare function createStructuralDirectiveTransform(name: string | RegExp, fn: StructuralDirectiveTransform): NodeTransform; | ||
export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig }: TransformOptions): TransformContext; | ||
export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig }: TransformOptions): TransformContext; | ||
export declare function createVNodeCall(context: TransformContext | null, tag: VNodeCall['tag'], props?: VNodeCall['props'], children?: VNodeCall['children'], patchFlag?: VNodeCall['patchFlag'], dynamicProps?: VNodeCall['dynamicProps'], directives?: VNodeCall['directives'], isBlock?: VNodeCall['isBlock'], disableTracking?: VNodeCall['disableTracking'], loc?: SourceLocation): VNodeCall; | ||
export declare function createVNodeCall(context: TransformContext | null, tag: VNodeCall['tag'], props?: VNodeCall['props'], children?: VNodeCall['children'], patchFlag?: VNodeCall['patchFlag'], dynamicProps?: VNodeCall['dynamicProps'], directives?: VNodeCall['directives'], isBlock?: VNodeCall['isBlock'], disableTracking?: VNodeCall['disableTracking'], isComponent?: VNodeCall['isComponent'], loc?: SourceLocation): VNodeCall; | ||
@@ -512,2 +517,10 @@ export declare interface DirectiveArgumentNode extends ArrayExpression { | ||
export declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall; | ||
export declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK; | ||
export declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE; | ||
export declare const GUARD_REACTIVE_PROPS: unique symbol; | ||
export declare function hasDynamicKeyVBind(node: ElementNode): boolean; | ||
@@ -529,4 +542,4 @@ | ||
export declare interface IfConditionalExpression extends ConditionalExpression { | ||
consequent: BlockCodegenNode; | ||
alternate: BlockCodegenNode | IfConditionalExpression; | ||
consequent: BlockCodegenNode | MemoExpression; | ||
alternate: BlockCodegenNode | IfConditionalExpression | MemoExpression; | ||
} | ||
@@ -561,2 +574,4 @@ | ||
export declare const IS_MEMO_SAME: unique symbol; | ||
export declare const IS_REF: unique symbol; | ||
@@ -605,2 +620,13 @@ | ||
export declare function makeBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void; | ||
export declare interface MemoExpression extends CallExpression { | ||
callee: typeof WITH_MEMO; | ||
arguments: [ExpressionNode, MemoFactory, string, string]; | ||
} | ||
declare interface MemoFactory extends FunctionExpression { | ||
returns: BlockCodegenNode; | ||
} | ||
export declare const MERGE_PROPS: unique symbol; | ||
@@ -656,2 +682,8 @@ | ||
export declare const NORMALIZE_CLASS: unique symbol; | ||
export declare const NORMALIZE_PROPS: unique symbol; | ||
export declare const NORMALIZE_STYLE: unique symbol; | ||
export declare interface ObjectExpression extends Node_2 { | ||
@@ -730,3 +762,3 @@ type: NodeTypes.JS_OBJECT_EXPRESSION; | ||
tagType: ElementTypes.ELEMENT; | ||
codegenNode: VNodeCall | SimpleExpressionNode | CacheExpression | undefined; | ||
codegenNode: VNodeCall | SimpleExpressionNode | CacheExpression | MemoExpression | undefined; | ||
ssrCodegenNode?: TemplateLiteral; | ||
@@ -825,8 +857,22 @@ } | ||
/** | ||
* Generate SSR-optimized render functions instead. | ||
* Control whether generate SSR-optimized render functions instead. | ||
* The resulting function must be attached to the component via the | ||
* `ssrRender` option instead of `render`. | ||
* | ||
* When compiler generates code for SSR's fallback branch, we need to set it to false: | ||
* - context.ssr = false | ||
* | ||
* see `subTransform` in `ssrTransformCompoent.ts` | ||
*/ | ||
ssr?: boolean; | ||
/** | ||
* Indicates whether the compiler generates code for SSR, | ||
* it is always true when generating code for SSR, | ||
* regardless of whether we are generating code for SSR's fallback branch, | ||
* this means that when the compiler generates code for SSR's fallback branch: | ||
* - context.ssr = false | ||
* - context.inSSR = true | ||
*/ | ||
inSSR?: boolean; | ||
/** | ||
* Optional binding metadata analyzed from script - used to optimize | ||
@@ -868,2 +914,3 @@ * binding access when `prefixIdentifiers` is enabled. | ||
identifiers?: string[]; | ||
isHandlerKey?: boolean; | ||
} | ||
@@ -983,2 +1030,3 @@ | ||
currentNode: RootNode | TemplateChildNode | null; | ||
inVOnce: boolean; | ||
helper<T extends symbol>(name: T): T; | ||
@@ -992,3 +1040,3 @@ removeHelper<T extends symbol>(name: T): void; | ||
removeIdentifiers(exp: ExpressionNode | string): void; | ||
hoist(exp: JSChildNode): SimpleExpressionNode; | ||
hoist(exp: string | JSChildNode | ArrayExpression): SimpleExpressionNode; | ||
cache<T extends JSChildNode>(exp: T, isVNode?: boolean): CacheExpression | T; | ||
@@ -1097,8 +1145,9 @@ constantCache: Map<TemplateChildNode, ConstantTypes>; | ||
props: PropsExpression | undefined; | ||
children: TemplateChildNode[] | TemplateTextChildNode | SlotsExpression | ForRenderListExpression | undefined; | ||
children: TemplateChildNode[] | TemplateTextChildNode | SlotsExpression | ForRenderListExpression | SimpleExpressionNode | undefined; | ||
patchFlag: string | undefined; | ||
dynamicProps: string | undefined; | ||
dynamicProps: string | SimpleExpressionNode | undefined; | ||
directives: DirectiveArguments | undefined; | ||
isBlock: boolean; | ||
disableTracking: boolean; | ||
isComponent: boolean; | ||
} | ||
@@ -1112,4 +1161,6 @@ | ||
export declare const WITH_MEMO: unique symbol; | ||
export declare const WITH_SCOPE_ID: unique symbol; | ||
export { } |
{ | ||
"name": "@vue/compiler-core", | ||
"version": "3.1.5", | ||
"version": "3.2.0-beta.1", | ||
"description": "@vue/compiler-core", | ||
@@ -35,3 +35,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@vue/shared": "3.1.5", | ||
"@vue/shared": "3.2.0-beta.1", | ||
"@babel/parser": "^7.12.0", | ||
@@ -38,0 +38,0 @@ "@babel/types": "^7.12.0", |
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 too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
663807
16487
1
85
+ Added@vue/shared@3.2.0-beta.1(transitive)
- Removed@vue/shared@3.1.5(transitive)
Updated@vue/shared@3.2.0-beta.1