vue-template-compiler
Advanced tools
Comparing version 2.6.14 to 2.7.0-alpha.1
22
index.js
@@ -12,7 +12,19 @@ try { | ||
'\n\nVue packages version mismatch:\n\n' + | ||
'- vue@' + vueVersion + ' (' + vuePath + ')\n' + | ||
'- ' + packageName + '@' + packageVersion + ' (' + packagePath + ')\n\n' + | ||
'This may cause things to work incorrectly. Make sure to use the same version for both.\n' + | ||
'If you are using vue-loader@>=10.0, simply update vue-template-compiler.\n' + | ||
'If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump ' + packageName + ' to the latest.\n' | ||
'- vue@' + | ||
vueVersion + | ||
' (' + | ||
vuePath + | ||
')\n' + | ||
'- ' + | ||
packageName + | ||
'@' + | ||
packageVersion + | ||
' (' + | ||
packagePath + | ||
')\n\n' + | ||
'This may cause things to work incorrectly. Make sure to use the same version for both.\n' + | ||
'If you are using vue-loader@>=10.0, simply update vue-template-compiler.\n' + | ||
'If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump ' + | ||
packageName + | ||
' to the latest.\n' | ||
) | ||
@@ -19,0 +31,0 @@ } |
{ | ||
"name": "vue-template-compiler", | ||
"version": "2.6.14", | ||
"version": "2.7.0-alpha.1", | ||
"description": "template compiler for Vue 2.0", | ||
@@ -10,2 +10,6 @@ "main": "index.js", | ||
"types": "types/index.d.ts", | ||
"files": [ | ||
"types/*.d.ts", | ||
"*.js" | ||
], | ||
"repository": { | ||
@@ -26,3 +30,3 @@ "type": "git", | ||
"dependencies": { | ||
"he": "^1.1.0", | ||
"he": "^1.2.0", | ||
"de-indent": "^1.0.2" | ||
@@ -33,2 +37,2 @@ }, | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import Vue, { VNode } from "vue" | ||
import { VNode } from 'vue' | ||
@@ -7,6 +7,6 @@ /* | ||
interface CompilerOptions { | ||
modules?: ModuleOptions[]; | ||
directives?: Record<string, DirectiveFunction>; | ||
preserveWhitespace?: boolean; | ||
whitespace?: 'preserve' | 'condense'; | ||
modules?: ModuleOptions[] | ||
directives?: Record<string, DirectiveFunction> | ||
preserveWhitespace?: boolean | ||
whitespace?: 'preserve' | 'condense' | ||
outputSourceRange?: any | ||
@@ -20,30 +20,30 @@ } | ||
interface ErrorWithRange { | ||
msg: string; | ||
start: number; | ||
end: number; | ||
msg: string | ||
start: number | ||
end: number | ||
} | ||
interface CompiledResult<ErrorType> { | ||
ast: ASTElement | undefined; | ||
render: string; | ||
staticRenderFns: string[]; | ||
errors: ErrorType[]; | ||
tips: ErrorType[]; | ||
ast: ASTElement | undefined | ||
render: string | ||
staticRenderFns: string[] | ||
errors: ErrorType[] | ||
tips: ErrorType[] | ||
} | ||
interface CompiledResultFunctions { | ||
render: () => VNode; | ||
staticRenderFns: (() => VNode)[]; | ||
render: () => VNode | ||
staticRenderFns: (() => VNode)[] | ||
} | ||
interface ModuleOptions { | ||
preTransformNode: (el: ASTElement) => ASTElement | undefined; | ||
transformNode: (el: ASTElement) => ASTElement | undefined; | ||
postTransformNode: (el: ASTElement) => void; | ||
genData: (el: ASTElement) => string; | ||
transformCode?: (el: ASTElement, code: string) => string; | ||
staticKeys?: string[]; | ||
preTransformNode: (el: ASTElement) => ASTElement | undefined | ||
transformNode: (el: ASTElement) => ASTElement | undefined | ||
postTransformNode: (el: ASTElement) => void | ||
genData: (el: ASTElement) => string | ||
transformCode?: (el: ASTElement, code: string) => string | ||
staticKeys?: string[] | ||
} | ||
type DirectiveFunction = (node: ASTElement, directiveMeta: ASTDirective) => void; | ||
type DirectiveFunction = (node: ASTElement, directiveMeta: ASTDirective) => void | ||
@@ -64,125 +64,122 @@ /* | ||
export interface ASTModifiers { | ||
[key: string]: boolean; | ||
[key: string]: boolean | ||
} | ||
export interface ASTIfCondition { | ||
exp: string | undefined; | ||
block: ASTElement; | ||
exp: string | undefined | ||
block: ASTElement | ||
} | ||
export interface ASTElementHandler { | ||
value: string; | ||
params?: any[]; | ||
modifiers: ASTModifiers | undefined; | ||
value: string | ||
params?: any[] | ||
modifiers: ASTModifiers | undefined | ||
} | ||
export interface ASTElementHandlers { | ||
[key: string]: ASTElementHandler | ASTElementHandler[]; | ||
[key: string]: ASTElementHandler | ASTElementHandler[] | ||
} | ||
export interface ASTDirective { | ||
name: string; | ||
rawName: string; | ||
value: string; | ||
arg: string | undefined; | ||
modifiers: ASTModifiers | undefined; | ||
name: string | ||
rawName: string | ||
value: string | ||
arg: string | undefined | ||
modifiers: ASTModifiers | undefined | ||
} | ||
export type ASTNode = ASTElement | ASTText | ASTExpression; | ||
export type ASTNode = ASTElement | ASTText | ASTExpression | ||
export interface ASTElement { | ||
type: 1; | ||
tag: string; | ||
attrsList: { name: string; value: any }[]; | ||
attrsMap: Record<string, any>; | ||
parent: ASTElement | undefined; | ||
children: ASTNode[]; | ||
type: 1 | ||
tag: string | ||
attrsList: { name: string; value: any }[] | ||
attrsMap: Record<string, any> | ||
parent: ASTElement | undefined | ||
children: ASTNode[] | ||
processed?: true; | ||
processed?: true | ||
static?: boolean; | ||
staticRoot?: boolean; | ||
staticInFor?: boolean; | ||
staticProcessed?: boolean; | ||
hasBindings?: boolean; | ||
static?: boolean | ||
staticRoot?: boolean | ||
staticInFor?: boolean | ||
staticProcessed?: boolean | ||
hasBindings?: boolean | ||
text?: string; | ||
attrs?: { name: string; value: any }[]; | ||
props?: { name: string; value: string }[]; | ||
plain?: boolean; | ||
pre?: true; | ||
ns?: string; | ||
text?: string | ||
attrs?: { name: string; value: any }[] | ||
props?: { name: string; value: string }[] | ||
plain?: boolean | ||
pre?: true | ||
ns?: string | ||
component?: string; | ||
inlineTemplate?: true; | ||
transitionMode?: string | null; | ||
slotName?: string; | ||
slotTarget?: string; | ||
slotScope?: string; | ||
scopedSlots?: Record<string, ASTElement>; | ||
component?: string | ||
inlineTemplate?: true | ||
transitionMode?: string | null | ||
slotName?: string | ||
slotTarget?: string | ||
slotScope?: string | ||
scopedSlots?: Record<string, ASTElement> | ||
ref?: string; | ||
refInFor?: boolean; | ||
ref?: string | ||
refInFor?: boolean | ||
if?: string; | ||
ifProcessed?: boolean; | ||
elseif?: string; | ||
else?: true; | ||
ifConditions?: ASTIfCondition[]; | ||
if?: string | ||
ifProcessed?: boolean | ||
elseif?: string | ||
else?: true | ||
ifConditions?: ASTIfCondition[] | ||
for?: string; | ||
forProcessed?: boolean; | ||
key?: string; | ||
alias?: string; | ||
iterator1?: string; | ||
iterator2?: string; | ||
for?: string | ||
forProcessed?: boolean | ||
key?: string | ||
alias?: string | ||
iterator1?: string | ||
iterator2?: string | ||
staticClass?: string; | ||
classBinding?: string; | ||
staticStyle?: string; | ||
styleBinding?: string; | ||
events?: ASTElementHandlers; | ||
nativeEvents?: ASTElementHandlers; | ||
staticClass?: string | ||
classBinding?: string | ||
staticStyle?: string | ||
styleBinding?: string | ||
events?: ASTElementHandlers | ||
nativeEvents?: ASTElementHandlers | ||
transition?: string | true; | ||
transitionOnAppear?: boolean; | ||
transition?: string | true | ||
transitionOnAppear?: boolean | ||
model?: { | ||
value: string; | ||
callback: string; | ||
expression: string; | ||
}; | ||
value: string | ||
callback: string | ||
expression: string | ||
} | ||
directives?: ASTDirective[]; | ||
directives?: ASTDirective[] | ||
forbidden?: true; | ||
once?: true; | ||
onceProcessed?: boolean; | ||
wrapData?: (code: string) => string; | ||
wrapListeners?: (code: string) => string; | ||
forbidden?: true | ||
once?: true | ||
onceProcessed?: boolean | ||
wrapData?: (code: string) => string | ||
wrapListeners?: (code: string) => string | ||
// 2.4 ssr optimization | ||
ssrOptimizability?: SSROptimizability; | ||
// weex specific | ||
appendAsTree?: boolean; | ||
ssrOptimizability?: SSROptimizability | ||
} | ||
export interface ASTExpression { | ||
type: 2; | ||
expression: string; | ||
text: string; | ||
tokens: (string | Record<string, any>)[]; | ||
static?: boolean; | ||
type: 2 | ||
expression: string | ||
text: string | ||
tokens: (string | Record<string, any>)[] | ||
static?: boolean | ||
// 2.4 ssr optimization | ||
ssrOptimizability?: SSROptimizability; | ||
ssrOptimizability?: SSROptimizability | ||
} | ||
export interface ASTText { | ||
type: 3; | ||
text: string; | ||
static?: boolean; | ||
isComment?: boolean; | ||
type: 3 | ||
text: string | ||
static?: boolean | ||
isComment?: boolean | ||
// 2.4 ssr optimization | ||
ssrOptimizability?: SSROptimizability; | ||
ssrOptimizability?: SSROptimizability | ||
} | ||
@@ -194,3 +191,3 @@ | ||
interface SFCParserOptions { | ||
pad?: true | 'line' | 'space'; | ||
pad?: true | 'line' | 'space' | ||
deindent?: boolean | ||
@@ -200,18 +197,18 @@ } | ||
export interface SFCBlock { | ||
type: string; | ||
content: string; | ||
attrs: Record<string, string>; | ||
start?: number; | ||
end?: number; | ||
lang?: string; | ||
src?: string; | ||
scoped?: boolean; | ||
module?: string | boolean; | ||
type: string | ||
content: string | ||
attrs: Record<string, string> | ||
start?: number | ||
end?: number | ||
lang?: string | ||
src?: string | ||
scoped?: boolean | ||
module?: string | boolean | ||
} | ||
export interface SFCDescriptor { | ||
template: SFCBlock | undefined; | ||
script: SFCBlock | undefined; | ||
styles: SFCBlock[]; | ||
customBlocks: SFCBlock[]; | ||
template: SFCBlock | undefined | ||
script: SFCBlock | undefined | ||
styles: SFCBlock[] | ||
customBlocks: SFCBlock[] | ||
} | ||
@@ -230,5 +227,5 @@ | ||
options?: CompilerOptions | ||
): CompiledResult<string>; | ||
): CompiledResult<string> | ||
export function compileToFunctions(template: string): CompiledResultFunctions; | ||
export function compileToFunctions(template: string): CompiledResultFunctions | ||
@@ -238,3 +235,3 @@ export function ssrCompile( | ||
options: CompilerOptionsWithSourceRange | ||
): CompiledResult<ErrorWithRange>; | ||
): CompiledResult<ErrorWithRange> | ||
@@ -244,5 +241,5 @@ export function ssrCompile( | ||
options?: CompilerOptions | ||
): CompiledResult<string>; | ||
): CompiledResult<string> | ||
export function ssrCompileToFunctions(template: string): CompiledResultFunctions; | ||
export function ssrCompileToFunctions(template: string): CompiledResultFunctions | ||
@@ -252,3 +249,3 @@ export function parseComponent( | ||
options?: SFCParserOptions | ||
): SFCDescriptor; | ||
): SFCDescriptor | ||
@@ -259,2 +256,2 @@ export function generateCodeFrame( | ||
end: number | ||
): string; | ||
): string |
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
596286
14112
7
1
83
Updatedhe@^1.2.0