diff --git a/apps/showcase/static/js/vue.js b/apps/showcase/static/js/vue.js index 4ef7ff1b0..919aa1251 100644 --- a/apps/showcase/static/js/vue.js +++ b/apps/showcase/static/js/vue.js @@ -1,6 +1,6 @@ /*! - * Vue.js v2.6.10 - * (c) 2014-2019 Evan You + * Vue.js v2.6.12 + * (c) 2014-2020 Evan You * Released under the MIT License. */ (function (global, factory) { @@ -1969,7 +1969,7 @@ isUsingMicroTask = true; } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { // Fallback to setImmediate. - // Techinically it leverages the (macro) task queue, + // Technically it leverages the (macro) task queue, // but it is still a better choice than setTimeout. timerFunc = function () { setImmediate(flushCallbacks); @@ -2058,7 +2058,7 @@ warn( "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " + 'properties starting with "$" or "_" are not proxied in the Vue instance to ' + - 'prevent conflicts with Vue internals' + + 'prevent conflicts with Vue internals. ' + 'See: https://vuejs.org/v2/api/#data', target ); @@ -2918,7 +2918,7 @@ if (typeof key === 'string' && key) { baseObj[values[i]] = values[i + 1]; } else if (key !== '' && key !== null) { - // null is a speical value for explicitly removing a binding + // null is a special value for explicitly removing a binding warn( ("Invalid value for dynamic directive argument (expected string or null): " + key), this @@ -3413,6 +3413,12 @@ ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag); if (config.isReservedTag(tag)) { // platform built-in elements + if (isDef(data) && isDef(data.nativeOn)) { + warn( + ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."), + context + ); + } vnode = new VNode( config.parsePlatformTagName(tag), data, children, undefined, undefined, context @@ -3538,7 +3544,7 @@ // render self var vnode; try { - // There's no need to maintain a stack becaues all render fns are called + // There's no need to maintain a stack because all render fns are called // separately from one another. Nested component's render fns are called // when parent component is patched. currentRenderingInstance = vm; @@ -5437,7 +5443,7 @@ value: FunctionalRenderContext }); - Vue.version = '2.6.10'; + Vue.version = '2.6.12'; /* */ @@ -6110,7 +6116,7 @@ } } - function removeVnodes (parentElm, vnodes, startIdx, endIdx) { + function removeVnodes (vnodes, startIdx, endIdx) { for (; startIdx <= endIdx; ++startIdx) { var ch = vnodes[startIdx]; if (isDef(ch)) { @@ -6221,7 +6227,7 @@ refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue); } else if (newStartIdx > newEndIdx) { - removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx); + removeVnodes(oldCh, oldStartIdx, oldEndIdx); } } @@ -6313,7 +6319,7 @@ if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); } addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue); } else if (isDef(oldCh)) { - removeVnodes(elm, oldCh, 0, oldCh.length - 1); + removeVnodes(oldCh, 0, oldCh.length - 1); } else if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); } @@ -6542,7 +6548,7 @@ // destroy old node if (isDef(parentElm)) { - removeVnodes(parentElm, [oldVnode], 0, 0); + removeVnodes([oldVnode], 0, 0); } else if (isDef(oldVnode.tag)) { invokeDestroyHook(oldVnode); } @@ -7643,7 +7649,7 @@ // skip the update if old and new VDOM state is the same. // `value` is handled separately because the DOM value may be temporarily // out of sync with VDOM state due to focus, composition and modifiers. - // This #4521 by skipping the unnecesarry `checked` update. + // This #4521 by skipping the unnecessary `checked` update. cur !== oldProps[key] ) { // some property updates can throw @@ -9248,7 +9254,7 @@ var startTagClose = /^\s*(\/?)>/; var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>")); var doctype = /^]+>/i; - // #7298: escape - to avoid being pased as HTML comment when inlined in page + // #7298: escape - to avoid being passed as HTML comment when inlined in page var comment = /^ can only appear at the root level inside " + - "the receiving the component", + "the receiving component", el ); } @@ -10720,7 +10726,7 @@ /* */ - var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/; + var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/; var fnInvokeRE = /\([^)]*?\);*$/; var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; @@ -11489,6 +11495,8 @@ var range = node.rawAttrsMap[name]; if (name === 'v-for') { checkFor(node, ("v-for=\"" + value + "\""), warn, range); + } else if (name === 'v-slot' || name[0] === '#') { + checkFunctionParameterExpression(value, (name + "=\"" + value + "\""), warn, range); } else if (onRE.test(name)) { checkEvent(value, (name + "=\"" + value + "\""), warn, range); } else { @@ -11508,9 +11516,9 @@ } function checkEvent (exp, text, warn, range) { - var stipped = exp.replace(stripStringRE, ''); - var keywordMatch = stipped.match(unaryOperatorsRE); - if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') { + var stripped = exp.replace(stripStringRE, ''); + var keywordMatch = stripped.match(unaryOperatorsRE); + if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') { warn( "avoid using JavaScript unary operator as property name: " + "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim()), @@ -11565,6 +11573,19 @@ } } + function checkFunctionParameterExpression (exp, text, warn, range) { + try { + new Function(exp, ''); + } catch (e) { + warn( + "invalid function parameter expression: " + (e.message) + " in\n\n" + + " " + exp + "\n\n" + + " Raw expression: " + (text.trim()) + "\n", + range + ); + } + } + /* */ var range = 2;