update
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-present, Yuxi (Evan) You
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+7096
-5761
File diff suppressed because one or more lines are too long
+6582
-5339
File diff suppressed because it is too large
Load Diff
+17
-5
@@ -9,11 +9,23 @@ if (vueVersion && vueVersion !== packageVersion) {
|
||||
var packagePath = require.resolve('./package.json')
|
||||
throw new Error(
|
||||
'\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'
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+20
-14
@@ -1,32 +1,34 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"vue-template-compiler@2.6.11",
|
||||
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
|
||||
"vue-template-compiler@2.7.7",
|
||||
"/home/node/nuxt"
|
||||
]
|
||||
],
|
||||
"_from": "vue-template-compiler@2.6.11",
|
||||
"_id": "vue-template-compiler@2.6.11",
|
||||
"_from": "vue-template-compiler@2.7.7",
|
||||
"_id": "vue-template-compiler@2.7.7",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-KIq15bvQDrcCjpGjrAhx4mUlyyHfdmTaoNfeoATHLAiWB+MU3cx4lOzMwrnUh9cCxy0Lt1T11hAFY6TQgroUAA==",
|
||||
"_integrity": "sha512-vxOsjWhvDPyMW7QwXPecNmTNwKyXiF+j4KjBFjDxYPuY0xvqCT5o9WrapVItR/Nrh0XThfBaL19kXFSNYtbKmw==",
|
||||
"_location": "/vue-template-compiler",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "vue-template-compiler@2.6.11",
|
||||
"raw": "vue-template-compiler@2.7.7",
|
||||
"name": "vue-template-compiler",
|
||||
"escapedName": "vue-template-compiler",
|
||||
"rawSpec": "2.6.11",
|
||||
"rawSpec": "2.7.7",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.6.11"
|
||||
"fetchSpec": "2.7.7"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@nuxt/vue-app"
|
||||
"/@nuxt/components",
|
||||
"/@nuxt/vue-app",
|
||||
"/@nuxt/webpack"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz",
|
||||
"_spec": "2.6.11",
|
||||
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
|
||||
"_resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.7.tgz",
|
||||
"_spec": "2.7.7",
|
||||
"_where": "/home/node/nuxt",
|
||||
"author": {
|
||||
"name": "Evan You"
|
||||
},
|
||||
@@ -36,12 +38,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"de-indent": "^1.0.2",
|
||||
"he": "^1.1.0"
|
||||
"he": "^1.2.0"
|
||||
},
|
||||
"description": "template compiler for Vue 2.0",
|
||||
"devDependencies": {
|
||||
"vue": "file:../.."
|
||||
},
|
||||
"files": [
|
||||
"types/*.d.ts",
|
||||
"*.js"
|
||||
],
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler#readme",
|
||||
"jsdelivr": "browser.js",
|
||||
"keywords": [
|
||||
@@ -57,5 +63,5 @@
|
||||
},
|
||||
"types": "types/index.d.ts",
|
||||
"unpkg": "browser.js",
|
||||
"version": "2.6.11"
|
||||
"version": "2.7.7"
|
||||
}
|
||||
|
||||
+124
-127
@@ -1,13 +1,13 @@
|
||||
import Vue, { VNode } from "vue"
|
||||
import { VNode } from 'vue'
|
||||
|
||||
/*
|
||||
* Template compilation options / results
|
||||
*/
|
||||
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
|
||||
}
|
||||
|
||||
@@ -16,34 +16,34 @@ interface CompilerOptionsWithSourceRange extends CompilerOptions {
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
/*
|
||||
* AST Types
|
||||
@@ -59,156 +59,153 @@ type DirectiveFunction = (node: ASTElement, directiveMeta: ASTDirective) => void
|
||||
export type SSROptimizability = 0 | 1 | 2 | 3 | 4
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
/*
|
||||
* SFC parser related types
|
||||
*/
|
||||
interface SFCParserOptions {
|
||||
pad?: true | 'line' | 'space';
|
||||
pad?: true | 'line' | 'space'
|
||||
deindent?: boolean
|
||||
}
|
||||
|
||||
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[]
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -222,29 +219,29 @@ export function compile(
|
||||
export function compile(
|
||||
template: string,
|
||||
options?: CompilerOptions
|
||||
): CompiledResult<string>;
|
||||
): CompiledResult<string>
|
||||
|
||||
export function compileToFunctions(template: string): CompiledResultFunctions;
|
||||
export function compileToFunctions(template: string): CompiledResultFunctions
|
||||
|
||||
export function ssrCompile(
|
||||
template: string,
|
||||
options: CompilerOptionsWithSourceRange
|
||||
): CompiledResult<ErrorWithRange>;
|
||||
): CompiledResult<ErrorWithRange>
|
||||
|
||||
export function ssrCompile(
|
||||
template: string,
|
||||
options?: CompilerOptions
|
||||
): CompiledResult<string>;
|
||||
): CompiledResult<string>
|
||||
|
||||
export function ssrCompileToFunctions(template: string): CompiledResultFunctions;
|
||||
export function ssrCompileToFunctions(template: string): CompiledResultFunctions
|
||||
|
||||
export function parseComponent(
|
||||
file: string,
|
||||
options?: SFCParserOptions
|
||||
): SFCDescriptor;
|
||||
): SFCDescriptor
|
||||
|
||||
export function generateCodeFrame(
|
||||
template: string,
|
||||
start: number,
|
||||
end: number
|
||||
): string;
|
||||
): string
|
||||
|
||||
Reference in New Issue
Block a user