Socket
Socket
Sign inDemoInstall

@vue/compiler-core

Package Overview
Dependencies
5
Maintainers
1
Versions
206
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.4.0-alpha.1 to 3.4.0-alpha.2

188

dist/compiler-core.d.ts

@@ -6,23 +6,47 @@ import { ParserPlugin } from '@babel/parser';

type OptionalOptions = 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | keyof CompilerCompatOptions;
export declare const FRAGMENT: unique symbol;
export declare const TELEPORT: unique symbol;
export declare const SUSPENSE: unique symbol;
export declare const KEEP_ALIVE: unique symbol;
export declare const BASE_TRANSITION: unique symbol;
export declare const OPEN_BLOCK: unique symbol;
export declare const CREATE_BLOCK: unique symbol;
export declare const CREATE_ELEMENT_BLOCK: unique symbol;
export declare const CREATE_VNODE: unique symbol;
export declare const CREATE_ELEMENT_VNODE: unique symbol;
export declare const CREATE_COMMENT: unique symbol;
export declare const CREATE_TEXT: unique symbol;
export declare const CREATE_STATIC: unique symbol;
export declare const RESOLVE_COMPONENT: unique symbol;
export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol;
export declare const RESOLVE_DIRECTIVE: unique symbol;
export declare const RESOLVE_FILTER: unique symbol;
export declare const WITH_DIRECTIVES: unique symbol;
export declare const RENDER_LIST: unique symbol;
export declare const RENDER_SLOT: unique symbol;
export declare const CREATE_SLOTS: unique symbol;
export declare const TO_DISPLAY_STRING: unique symbol;
export declare const MERGE_PROPS: unique symbol;
export declare const NORMALIZE_CLASS: unique symbol;
export declare const NORMALIZE_STYLE: unique symbol;
export declare const NORMALIZE_PROPS: unique symbol;
export declare const GUARD_REACTIVE_PROPS: unique symbol;
export declare const TO_HANDLERS: unique symbol;
export declare const CAMELIZE: unique symbol;
export declare const CAPITALIZE: unique symbol;
export declare const TO_HANDLER_KEY: unique symbol;
export declare const SET_BLOCK_TRACKING: unique symbol;
export declare const PUSH_SCOPE_ID: unique symbol;
export declare const POP_SCOPE_ID: unique symbol;
export declare const WITH_CTX: unique symbol;
export declare const UNREF: unique symbol;
export declare const IS_REF: unique symbol;
export declare const WITH_MEMO: unique symbol;
export declare const IS_MEMO_SAME: unique symbol;
export declare const helperNameMap: Record<symbol, string>;
export declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void;
type OptionalOptions = 'decodeEntities' | 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | keyof CompilerCompatOptions;
type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> & Pick<ParserOptions, OptionalOptions>;
export declare const enum TextModes {
DATA = 0,
RCDATA = 1,
RAWTEXT = 2,
CDATA = 3,
ATTRIBUTE_VALUE = 4
}
interface ParserContext {
options: MergedParserOptions;
readonly originalSource: string;
source: string;
offset: number;
line: number;
column: number;
inPre: boolean;
inVPre: boolean;
onWarn: NonNullable<ErrorHandlingOptions['onWarn']>;
}
export declare function baseParse(content: string, options?: ParserOptions): RootNode;
export declare function baseParse(input: string, options?: ParserOptions): RootNode;

@@ -38,3 +62,2 @@ type CompilerCompatConfig = Partial<Record<CompilerDeprecationTypes, boolean | 'suppress-warning'>> & {

COMPILER_V_BIND_SYNC = "COMPILER_V_BIND_SYNC",
COMPILER_V_BIND_PROP = "COMPILER_V_BIND_PROP",
COMPILER_V_BIND_OBJECT_ORDER = "COMPILER_V_BIND_OBJECT_ORDER",

@@ -47,4 +70,4 @@ COMPILER_V_ON_NATIVE = "COMPILER_V_ON_NATIVE",

}
export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: ParserContext | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean;
export declare function warnDeprecation(key: CompilerDeprecationTypes, context: ParserContext | TransformContext, loc: SourceLocation | null, ...args: any[]): void;
export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean;
export declare function warnDeprecation(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): void;

@@ -104,53 +127,2 @@ export type NodeTransform = (node: RootNode | TemplateChildNode, context: TransformContext) => void | (() => void) | (() => void)[];

export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined;
interface ForParseResult {
source: ExpressionNode;
value: ExpressionNode | undefined;
key: ExpressionNode | undefined;
index: ExpressionNode | undefined;
}
export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[];
export declare const FRAGMENT: unique symbol;
export declare const TELEPORT: unique symbol;
export declare const SUSPENSE: unique symbol;
export declare const KEEP_ALIVE: unique symbol;
export declare const BASE_TRANSITION: unique symbol;
export declare const OPEN_BLOCK: unique symbol;
export declare const CREATE_BLOCK: unique symbol;
export declare const CREATE_ELEMENT_BLOCK: unique symbol;
export declare const CREATE_VNODE: unique symbol;
export declare const CREATE_ELEMENT_VNODE: unique symbol;
export declare const CREATE_COMMENT: unique symbol;
export declare const CREATE_TEXT: unique symbol;
export declare const CREATE_STATIC: unique symbol;
export declare const RESOLVE_COMPONENT: unique symbol;
export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol;
export declare const RESOLVE_DIRECTIVE: unique symbol;
export declare const RESOLVE_FILTER: unique symbol;
export declare const WITH_DIRECTIVES: unique symbol;
export declare const RENDER_LIST: unique symbol;
export declare const RENDER_SLOT: unique symbol;
export declare const CREATE_SLOTS: unique symbol;
export declare const TO_DISPLAY_STRING: unique symbol;
export declare const MERGE_PROPS: unique symbol;
export declare const NORMALIZE_CLASS: unique symbol;
export declare const NORMALIZE_STYLE: unique symbol;
export declare const NORMALIZE_PROPS: unique symbol;
export declare const GUARD_REACTIVE_PROPS: unique symbol;
export declare const TO_HANDLERS: unique symbol;
export declare const CAMELIZE: unique symbol;
export declare const CAPITALIZE: unique symbol;
export declare const TO_HANDLER_KEY: unique symbol;
export declare const SET_BLOCK_TRACKING: unique symbol;
export declare const PUSH_SCOPE_ID: unique symbol;
export declare const POP_SCOPE_ID: unique symbol;
export declare const WITH_CTX: unique symbol;
export declare const UNREF: unique symbol;
export declare const IS_REF: unique symbol;
export declare const WITH_MEMO: unique symbol;
export declare const IS_MEMO_SAME: unique symbol;
export declare const helperNameMap: Record<symbol, string>;
export declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void;
export declare const transformElement: NodeTransform;

@@ -170,3 +142,5 @@ export declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression;

export declare const enum Namespaces {
HTML = 0
HTML = 0,
SVG = 1,
MATH_ML = 2
}

@@ -227,2 +201,3 @@ export declare const enum NodeTypes {

type: NodeTypes.ROOT;
source: string;
children: TemplateChildNode[];

@@ -238,2 +213,3 @@ helpers: Set<symbol>;

codegenNode?: TemplateChildNode | JSChildNode | BlockStatement;
transformed?: boolean;
filters?: string[];

@@ -247,5 +223,6 @@ }

tagType: ElementTypes;
isSelfClosing: boolean;
props: Array<AttributeNode | DirectiveNode>;
children: TemplateChildNode[];
isSelfClosing?: boolean;
innerLoc?: SourceLocation;
}

@@ -282,2 +259,3 @@ export interface PlainElementNode extends BaseElementNode {

name: string;
nameLoc: SourceLocation;
value: TextNode | undefined;

@@ -287,3 +265,11 @@ }

type: NodeTypes.DIRECTIVE;
/**
* the normalized name without prefix or shorthands, e.g. "bind", "on"
*/
name: string;
/**
* the raw attribute name, preserving shorthand, and including arg & modifiers
* this is only used during parse.
*/
rawName?: string;
exp: ExpressionNode | undefined;

@@ -295,3 +281,3 @@ arg: ExpressionNode | undefined;

*/
parseResult?: ForParseResult;
forParseResult?: ForParseResult;
}

@@ -362,2 +348,9 @@ /**

}
export interface ForParseResult {
source: ExpressionNode;
value: ExpressionNode | undefined;
key: ExpressionNode | undefined;
index: ExpressionNode | undefined;
finalized: boolean;
}
export interface TextCallNode extends Node {

@@ -535,3 +528,3 @@ type: NodeTypes.TEXT_CALL;

export declare const locStub: SourceLocation;
export declare function createRoot(children: TemplateChildNode[], loc?: SourceLocation): RootNode;
export declare function createRoot(children: TemplateChildNode[], source?: string): RootNode;
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;

@@ -634,2 +627,20 @@ export declare function createArrayExpression(elements: ArrayExpression['elements'], loc?: SourceLocation): ArrayExpression;

/**
* Base mode is platform agnostic and only parses HTML-like template syntax,
* treating all tags the same way. Specific tag parsing behavior can be
* configured by higher-level compilers.
*
* HTML mode adds additional logic for handling special parsing behavior in
* `<script>`, `<style>`,`<title>` and `<textarea>`.
* The logic is handled inside compiler-core for efficiency.
*
* SFC mode treats content of all root-level tags except `<template>` as plain
* text.
*/
parseMode?: 'base' | 'html' | 'sfc';
/**
* Specify the root namepsace to use when parsing a tempalte.
* Defaults to `Namepsaces.HTML` (0).
*/
ns?: Namespaces;
/**
* e.g. platform native elements, e.g. `<div>` for browsers

@@ -657,8 +668,4 @@ */

*/
getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace;
getNamespace?: (tag: string, parent: ElementNode | undefined, rootNamespace: Namespace) => Namespace;
/**
* Get text parsing mode for this element
*/
getTextMode?: (node: ElementNode, parent: ElementNode | undefined) => TextModes;
/**
* @default ['{{', '}}']

@@ -672,3 +679,4 @@ */

/**
* Only needed for DOM compilers
* Only used for DOM compilers that runs in the browser.
* In non-browser builds, this option is ignored.
*/

@@ -929,3 +937,3 @@ decodeEntities?: (rawText: string, asAttr: boolean) => string;

helper(key: symbol): string;
push(code: string, node?: CodegenNode): void;
push(code: string, newlineIndex?: number, node?: CodegenNode): void;
indent(): void;

@@ -944,6 +952,5 @@ deindent(withoutNewLine?: boolean): void;

export declare function getBaseTransformPreset(prefixIdentifiers?: boolean): TransformPreset;
export declare function baseCompile(template: string | RootNode, options?: CompilerOptions): CodegenResult;
export declare function baseCompile(source: string | RootNode, options?: CompilerOptions): CodegenResult;
export declare const isStaticExp: (p: JSChildNode) => p is SimpleExpressionNode;
export declare const isBuiltInType: (tag: string, expected: string) => boolean;
export declare function isCoreComponent(tag: string): symbol | void;

@@ -960,3 +967,2 @@ export declare const isSimpleIdentifier: (name: string) => boolean;

export declare const isMemberExpression: (path: string, context: TransformContext) => boolean;
export declare function getInnerRange(loc: SourceLocation, offset: number, length: number): SourceLocation;
export declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position;

@@ -977,2 +983,3 @@ export declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position;

export declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall;
export declare const forAliasRE: RegExp;

@@ -1000,2 +1007,5 @@ export declare function walkIdentifiers(root: Node$1, onIdentifier: (node: Identifier, parent: Node$1, parentStack: Node$1[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node$1[], knownIds?: Record<string, number>): void;

export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined;
export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[];
export declare const transformExpression: NodeTransform;

@@ -1007,3 +1017,3 @@ export declare function processExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean, localVars?: Record<string, number>): ExpressionNode;

export declare const trackVForSlotScopes: NodeTransform;
export type SlotFnBuilder = (slotProps: ExpressionNode | undefined, vForExp: ExpressionNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression;
export type SlotFnBuilder = (slotProps: ExpressionNode | undefined, vFor: DirectiveNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression;
export declare function buildSlots(node: ElementNode, context: TransformContext, buildSlotFn?: SlotFnBuilder): {

@@ -1010,0 +1020,0 @@ slots: SlotsExpression;

{
"name": "@vue/compiler-core",
"version": "3.4.0-alpha.1",
"version": "3.4.0-alpha.2",
"description": "@vue/compiler-core",

@@ -35,10 +35,11 @@ "main": "index.js",

"dependencies": {
"@babel/parser": "^7.23.0",
"@vue/shared": "3.4.0-alpha.1",
"@babel/parser": "^7.23.3",
"entities": "^4.5.0",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
"source-map-js": "^1.0.2",
"@vue/shared": "3.4.0-alpha.2"
},
"devDependencies": {
"@babel/types": "^7.23.0"
"@babel/types": "^7.23.3"
}
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc