Skip to content

Commit a98048f

Browse files
committed
build: build 2.6.11
1 parent fc41f91 commit a98048f

21 files changed

+4178
-3100
lines changed

Diff for: dist/vue.common.dev.js

+38-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vue.js v2.6.10
2+
* Vue.js v2.6.11
33
* (c) 2014-2019 Evan You
44
* Released under the MIT License.
55
*/
@@ -1965,7 +1965,7 @@ if (typeof Promise !== 'undefined' && isNative(Promise)) {
19651965
isUsingMicroTask = true;
19661966
} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
19671967
// Fallback to setImmediate.
1968-
// Techinically it leverages the (macro) task queue,
1968+
// Technically it leverages the (macro) task queue,
19691969
// but it is still a better choice than setTimeout.
19701970
timerFunc = function () {
19711971
setImmediate(flushCallbacks);
@@ -2054,7 +2054,7 @@ var initProxy;
20542054
warn(
20552055
"Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
20562056
'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
2057-
'prevent conflicts with Vue internals' +
2057+
'prevent conflicts with Vue internals. ' +
20582058
'See: https://vuejs.org/v2/api/#data',
20592059
target
20602060
);
@@ -2914,7 +2914,7 @@ function bindDynamicKeys (baseObj, values) {
29142914
if (typeof key === 'string' && key) {
29152915
baseObj[values[i]] = values[i + 1];
29162916
} else if (key !== '' && key !== null) {
2917-
// null is a speical value for explicitly removing a binding
2917+
// null is a special value for explicitly removing a binding
29182918
warn(
29192919
("Invalid value for dynamic directive argument (expected string or null): " + key),
29202920
this
@@ -3409,6 +3409,12 @@ function _createElement (
34093409
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
34103410
if (config.isReservedTag(tag)) {
34113411
// platform built-in elements
3412+
if (isDef(data) && isDef(data.nativeOn)) {
3413+
warn(
3414+
("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
3415+
context
3416+
);
3417+
}
34123418
vnode = new VNode(
34133419
config.parsePlatformTagName(tag), data, children,
34143420
undefined, undefined, context
@@ -3534,7 +3540,7 @@ function renderMixin (Vue) {
35343540
// render self
35353541
var vnode;
35363542
try {
3537-
// There's no need to maintain a stack becaues all render fns are called
3543+
// There's no need to maintain a stack because all render fns are called
35383544
// separately from one another. Nested component's render fns are called
35393545
// when parent component is patched.
35403546
currentRenderingInstance = vm;
@@ -5433,7 +5439,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
54335439
value: FunctionalRenderContext
54345440
});
54355441

5436-
Vue.version = '2.6.10';
5442+
Vue.version = '2.6.11';
54375443

54385444
/* */
54395445

@@ -6106,7 +6112,7 @@ function createPatchFunction (backend) {
61066112
}
61076113
}
61086114

6109-
function removeVnodes (parentElm, vnodes, startIdx, endIdx) {
6115+
function removeVnodes (vnodes, startIdx, endIdx) {
61106116
for (; startIdx <= endIdx; ++startIdx) {
61116117
var ch = vnodes[startIdx];
61126118
if (isDef(ch)) {
@@ -6217,7 +6223,7 @@ function createPatchFunction (backend) {
62176223
refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
62186224
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
62196225
} else if (newStartIdx > newEndIdx) {
6220-
removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
6226+
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
62216227
}
62226228
}
62236229

@@ -6309,7 +6315,7 @@ function createPatchFunction (backend) {
63096315
if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
63106316
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
63116317
} else if (isDef(oldCh)) {
6312-
removeVnodes(elm, oldCh, 0, oldCh.length - 1);
6318+
removeVnodes(oldCh, 0, oldCh.length - 1);
63136319
} else if (isDef(oldVnode.text)) {
63146320
nodeOps.setTextContent(elm, '');
63156321
}
@@ -6538,7 +6544,7 @@ function createPatchFunction (backend) {
65386544

65396545
// destroy old node
65406546
if (isDef(parentElm)) {
6541-
removeVnodes(parentElm, [oldVnode], 0, 0);
6547+
removeVnodes([oldVnode], 0, 0);
65426548
} else if (isDef(oldVnode.tag)) {
65436549
invokeDestroyHook(oldVnode);
65446550
}
@@ -9244,7 +9250,7 @@ var startTagOpen = new RegExp(("^<" + qnameCapture));
92449250
var startTagClose = /^\s*(\/?)>/;
92459251
var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
92469252
var doctype = /^<!DOCTYPE [^>]+>/i;
9247-
// #7298: escape - to avoid being pased as HTML comment when inlined in page
9253+
// #7298: escape - to avoid being passed as HTML comment when inlined in page
92489254
var comment = /^<!\--/;
92499255
var conditionalComment = /^<!\[/;
92509256

@@ -9529,7 +9535,7 @@ function parseHTML (html, options) {
95299535
/* */
95309536

95319537
var onRE = /^@|^v-on:/;
9532-
var dirRE = /^v-|^@|^:/;
9538+
var dirRE = /^v-|^@|^:|^#/;
95339539
var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
95349540
var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
95359541
var stripParensRE = /^\(|\)$/g;
@@ -10153,7 +10159,7 @@ function processSlotContent (el) {
1015310159
if (el.parent && !maybeComponent(el.parent)) {
1015410160
warn$2(
1015510161
"<template v-slot> can only appear at the root level inside " +
10156-
"the receiving the component",
10162+
"the receiving component",
1015710163
el
1015810164
);
1015910165
}
@@ -10716,7 +10722,7 @@ function isDirectChildOfTemplateFor (node) {
1071610722

1071710723
/* */
1071810724

10719-
var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/;
10725+
var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/;
1072010726
var fnInvokeRE = /\([^)]*?\);*$/;
1072110727
var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
1072210728

@@ -11485,6 +11491,8 @@ function checkNode (node, warn) {
1148511491
var range = node.rawAttrsMap[name];
1148611492
if (name === 'v-for') {
1148711493
checkFor(node, ("v-for=\"" + value + "\""), warn, range);
11494+
} else if (name === 'v-slot' || name[0] === '#') {
11495+
checkFunctionParameterExpression(value, (name + "=\"" + value + "\""), warn, range);
1148811496
} else if (onRE.test(name)) {
1148911497
checkEvent(value, (name + "=\"" + value + "\""), warn, range);
1149011498
} else {
@@ -11504,9 +11512,9 @@ function checkNode (node, warn) {
1150411512
}
1150511513

1150611514
function checkEvent (exp, text, warn, range) {
11507-
var stipped = exp.replace(stripStringRE, '');
11508-
var keywordMatch = stipped.match(unaryOperatorsRE);
11509-
if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {
11515+
var stripped = exp.replace(stripStringRE, '');
11516+
var keywordMatch = stripped.match(unaryOperatorsRE);
11517+
if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
1151011518
warn(
1151111519
"avoid using JavaScript unary operator as property name: " +
1151211520
"\"" + (keywordMatch[0]) + "\" in expression " + (text.trim()),
@@ -11561,6 +11569,19 @@ function checkExpression (exp, text, warn, range) {
1156111569
}
1156211570
}
1156311571

11572+
function checkFunctionParameterExpression (exp, text, warn, range) {
11573+
try {
11574+
new Function(exp, '');
11575+
} catch (e) {
11576+
warn(
11577+
"invalid function parameter expression: " + (e.message) + " in\n\n" +
11578+
" " + exp + "\n\n" +
11579+
" Raw expression: " + (text.trim()) + "\n",
11580+
range
11581+
);
11582+
}
11583+
}
11584+
1156411585
/* */
1156511586

1156611587
var range = 2;

Diff for: dist/vue.common.prod.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/vue.esm.browser.js

+38-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vue.js v2.6.10
2+
* Vue.js v2.6.11
33
* (c) 2014-2019 Evan You
44
* Released under the MIT License.
55
*/
@@ -1996,7 +1996,7 @@ if (typeof Promise !== 'undefined' && isNative(Promise)) {
19961996
isUsingMicroTask = true;
19971997
} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
19981998
// Fallback to setImmediate.
1999-
// Techinically it leverages the (macro) task queue,
1999+
// Technically it leverages the (macro) task queue,
20002000
// but it is still a better choice than setTimeout.
20012001
timerFunc = () => {
20022002
setImmediate(flushCallbacks);
@@ -2085,7 +2085,7 @@ let initProxy;
20852085
warn(
20862086
`Property "${key}" must be accessed with "$data.${key}" because ` +
20872087
'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
2088-
'prevent conflicts with Vue internals' +
2088+
'prevent conflicts with Vue internals. ' +
20892089
'See: https://vuejs.org/v2/api/#data',
20902090
target
20912091
);
@@ -2940,7 +2940,7 @@ function bindDynamicKeys (baseObj, values) {
29402940
if (typeof key === 'string' && key) {
29412941
baseObj[values[i]] = values[i + 1];
29422942
} else if (key !== '' && key !== null) {
2943-
// null is a speical value for explicitly removing a binding
2943+
// null is a special value for explicitly removing a binding
29442944
warn(
29452945
`Invalid value for dynamic directive argument (expected string or null): ${key}`,
29462946
this
@@ -3432,6 +3432,12 @@ function _createElement (
34323432
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
34333433
if (config.isReservedTag(tag)) {
34343434
// platform built-in elements
3435+
if (isDef(data) && isDef(data.nativeOn)) {
3436+
warn(
3437+
`The .native modifier for v-on is only valid on components but it was used on <${tag}>.`,
3438+
context
3439+
);
3440+
}
34353441
vnode = new VNode(
34363442
config.parsePlatformTagName(tag), data, children,
34373443
undefined, undefined, context
@@ -3555,7 +3561,7 @@ function renderMixin (Vue) {
35553561
// render self
35563562
let vnode;
35573563
try {
3558-
// There's no need to maintain a stack becaues all render fns are called
3564+
// There's no need to maintain a stack because all render fns are called
35593565
// separately from one another. Nested component's render fns are called
35603566
// when parent component is patched.
35613567
currentRenderingInstance = vm;
@@ -5464,7 +5470,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
54645470
value: FunctionalRenderContext
54655471
});
54665472

5467-
Vue.version = '2.6.10';
5473+
Vue.version = '2.6.11';
54685474

54695475
/* */
54705476

@@ -6136,7 +6142,7 @@ function createPatchFunction (backend) {
61366142
}
61376143
}
61386144

6139-
function removeVnodes (parentElm, vnodes, startIdx, endIdx) {
6145+
function removeVnodes (vnodes, startIdx, endIdx) {
61406146
for (; startIdx <= endIdx; ++startIdx) {
61416147
const ch = vnodes[startIdx];
61426148
if (isDef(ch)) {
@@ -6247,7 +6253,7 @@ function createPatchFunction (backend) {
62476253
refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
62486254
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
62496255
} else if (newStartIdx > newEndIdx) {
6250-
removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
6256+
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
62516257
}
62526258
}
62536259

@@ -6339,7 +6345,7 @@ function createPatchFunction (backend) {
63396345
if (isDef(oldVnode.text)) nodeOps.setTextContent(elm, '');
63406346
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
63416347
} else if (isDef(oldCh)) {
6342-
removeVnodes(elm, oldCh, 0, oldCh.length - 1);
6348+
removeVnodes(oldCh, 0, oldCh.length - 1);
63436349
} else if (isDef(oldVnode.text)) {
63446350
nodeOps.setTextContent(elm, '');
63456351
}
@@ -6566,7 +6572,7 @@ function createPatchFunction (backend) {
65666572

65676573
// destroy old node
65686574
if (isDef(parentElm)) {
6569-
removeVnodes(parentElm, [oldVnode], 0, 0);
6575+
removeVnodes([oldVnode], 0, 0);
65706576
} else if (isDef(oldVnode.tag)) {
65716577
invokeDestroyHook(oldVnode);
65726578
}
@@ -9261,7 +9267,7 @@ const startTagOpen = new RegExp(`^<${qnameCapture}`);
92619267
const startTagClose = /^\s*(\/?)>/;
92629268
const endTag = new RegExp(`^<\\/${qnameCapture}[^>]*>`);
92639269
const doctype = /^<!DOCTYPE [^>]+>/i;
9264-
// #7298: escape - to avoid being pased as HTML comment when inlined in page
9270+
// #7298: escape - to avoid being passed as HTML comment when inlined in page
92659271
const comment = /^<!\--/;
92669272
const conditionalComment = /^<!\[/;
92679273

@@ -9546,7 +9552,7 @@ function parseHTML (html, options) {
95469552
/* */
95479553

95489554
const onRE = /^@|^v-on:/;
9549-
const dirRE = /^v-|^@|^:/;
9555+
const dirRE = /^v-|^@|^:|^#/;
95509556
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
95519557
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
95529558
const stripParensRE = /^\(|\)$/g;
@@ -10170,7 +10176,7 @@ function processSlotContent (el) {
1017010176
if (el.parent && !maybeComponent(el.parent)) {
1017110177
warn$2(
1017210178
`<template v-slot> can only appear at the root level inside ` +
10173-
`the receiving the component`,
10179+
`the receiving component`,
1017410180
el
1017510181
);
1017610182
}
@@ -10729,7 +10735,7 @@ function isDirectChildOfTemplateFor (node) {
1072910735

1073010736
/* */
1073110737

10732-
const fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/;
10738+
const fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/;
1073310739
const fnInvokeRE = /\([^)]*?\);*$/;
1073410740
const simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
1073510741

@@ -11554,6 +11560,8 @@ function checkNode (node, warn) {
1155411560
const range = node.rawAttrsMap[name];
1155511561
if (name === 'v-for') {
1155611562
checkFor(node, `v-for="${value}"`, warn, range);
11563+
} else if (name === 'v-slot' || name[0] === '#') {
11564+
checkFunctionParameterExpression(value, `${name}="${value}"`, warn, range);
1155711565
} else if (onRE.test(name)) {
1155811566
checkEvent(value, `${name}="${value}"`, warn, range);
1155911567
} else {
@@ -11573,9 +11581,9 @@ function checkNode (node, warn) {
1157311581
}
1157411582

1157511583
function checkEvent (exp, text, warn, range) {
11576-
const stipped = exp.replace(stripStringRE, '');
11577-
const keywordMatch = stipped.match(unaryOperatorsRE);
11578-
if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {
11584+
const stripped = exp.replace(stripStringRE, '');
11585+
const keywordMatch = stripped.match(unaryOperatorsRE);
11586+
if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
1157911587
warn(
1158011588
`avoid using JavaScript unary operator as property name: ` +
1158111589
`"${keywordMatch[0]}" in expression ${text.trim()}`,
@@ -11630,6 +11638,19 @@ function checkExpression (exp, text, warn, range) {
1163011638
}
1163111639
}
1163211640

11641+
function checkFunctionParameterExpression (exp, text, warn, range) {
11642+
try {
11643+
new Function(exp, '');
11644+
} catch (e) {
11645+
warn(
11646+
`invalid function parameter expression: ${e.message} in\n\n` +
11647+
` ${exp}\n\n` +
11648+
` Raw expression: ${text.trim()}\n`,
11649+
range
11650+
);
11651+
}
11652+
}
11653+
1163311654
/* */
1163411655

1163511656
const range = 2;

Diff for: dist/vue.esm.browser.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)