Skip to content

Commit

Permalink
build: build 2.6.13
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jun 1, 2021
1 parent f038000 commit f34f6bb
Show file tree
Hide file tree
Showing 19 changed files with 1,025 additions and 631 deletions.
201 changes: 125 additions & 76 deletions dist/vue.common.dev.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/vue.common.prod.js

Large diffs are not rendered by default.

195 changes: 119 additions & 76 deletions dist/vue.esm.browser.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/vue.esm.browser.min.js

Large diffs are not rendered by default.

201 changes: 125 additions & 76 deletions dist/vue.esm.js

Large diffs are not rendered by default.

201 changes: 125 additions & 76 deletions dist/vue.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/vue.min.js

Large diffs are not rendered by default.

180 changes: 112 additions & 68 deletions dist/vue.runtime.common.dev.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/vue.runtime.common.prod.js

Large diffs are not rendered by default.

180 changes: 112 additions & 68 deletions dist/vue.runtime.esm.js

Large diffs are not rendered by default.

180 changes: 112 additions & 68 deletions dist/vue.runtime.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/vue.runtime.min.js

Large diffs are not rendered by default.

113 changes: 71 additions & 42 deletions packages/vue-server-renderer/basic.js
Expand Up @@ -465,7 +465,7 @@
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
'required,reversed,scoped,seamless,selected,sortable,translate,' +
'required,reversed,scoped,seamless,selected,sortable,' +
'truespeed,typemustmatch,visible'
);

Expand All @@ -483,6 +483,10 @@
if (isUndef(opts) || opts.Ctor.options.inheritAttrs !== false) {
var parent = node.parent;
while (isDef(parent)) {
// Stop fallthrough in case parent has inheritAttrs option set to false
if (parent.componentOptions && parent.componentOptions.Ctor.options.inheritAttrs === false) {
break;
}
if (isDef(parent.data) && isDef(parent.data.attrs)) {
attrs = extend(extend({}, attrs), parent.data.attrs);
}
Expand Down Expand Up @@ -635,7 +639,7 @@
} else if (key === 'textContent') {
setText(node, props[key], false);
} else if (key === 'value' && node.tag === 'textarea') {
setText(node, props[key], false);
setText(node, toString(props[key]), false);
} else {
// $flow-disable-line (WTF?)
var attr = propsToAttrMap[key] || key.toLowerCase();
Expand Down Expand Up @@ -1849,13 +1853,14 @@
type = [type];
}
for (var i = 0; i < type.length && !valid; i++) {
var assertedType = assertType(value, type[i]);
var assertedType = assertType(value, type[i], vm);
expectedTypes.push(assertedType.expectedType || '');
valid = assertedType.valid;
}
}

if (!valid) {
var haveExpectedTypes = expectedTypes.some(function (t) { return t; });
if (!valid && haveExpectedTypes) {
warn(
getInvalidTypeMessage(name, value, expectedTypes),
vm
Expand All @@ -1873,9 +1878,9 @@
}
}

var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;

function assertType (value, type) {
function assertType (value, type, vm) {
var valid;
var expectedType = getType(type);
if (simpleCheckRE.test(expectedType)) {
Expand All @@ -1890,21 +1895,28 @@
} else if (expectedType === 'Array') {
valid = Array.isArray(value);
} else {
valid = value instanceof type;
try {
valid = value instanceof type;
} catch (e) {
warn('Invalid prop type: "' + String(type) + '" is not a constructor', vm);
valid = false;
}
}
return {
valid: valid,
expectedType: expectedType
}
}

var functionTypeCheckRE = /^\s*function (\w+)/;

/**
* Use function string name to check built-in types,
* because a simple equality check will fail when running
* across different vms / iframes.
*/
function getType (fn) {
var match = fn && fn.toString().match(/^\s*function (\w+)/);
var match = fn && fn.toString().match(functionTypeCheckRE);
return match ? match[1] : ''
}

Expand All @@ -1929,18 +1941,19 @@
" Expected " + (expectedTypes.map(capitalize).join(', '));
var expectedType = expectedTypes[0];
var receivedType = toRawType(value);
var expectedValue = styleValue(value, expectedType);
var receivedValue = styleValue(value, receivedType);
// check if we need to specify expected value
if (expectedTypes.length === 1 &&
isExplicable(expectedType) &&
!isBoolean(expectedType, receivedType)) {
message += " with value " + expectedValue;
if (
expectedTypes.length === 1 &&
isExplicable(expectedType) &&
isExplicable(typeof value) &&
!isBoolean(expectedType, receivedType)
) {
message += " with value " + (styleValue(value, expectedType));
}
message += ", got " + receivedType + " ";
// check if we need to specify received value
if (isExplicable(receivedType)) {
message += "with value " + receivedValue + ".";
message += "with value " + (styleValue(value, receivedType)) + ".";
}
return message
}
Expand All @@ -1955,9 +1968,9 @@
}
}

var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];
function isExplicable (value) {
var explicitTypes = ['string', 'number', 'boolean'];
return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; })
}

function isBoolean () {
Expand Down Expand Up @@ -2172,7 +2185,7 @@
// contain child elements.
var isSVG = makeMap(
'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
true
);
Expand Down Expand Up @@ -3366,7 +3379,7 @@

// Regular Expressions for parsing tags and attributes
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*";
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
var startTagOpen = new RegExp(("^<" + qnameCapture));
Expand Down Expand Up @@ -3819,7 +3832,7 @@
var slotRE = /^v-slot(:|$)|^#/;

var lineBreakRE = /[\r\n]/;
var whitespaceRE = /\s+/g;
var whitespaceRE = /[ \f\t\r\n]+/g;

var invalidAttributeRE = /[\s"'<>\/=]/;

Expand Down Expand Up @@ -3867,8 +3880,12 @@
platformMustUseProp = options.mustUseProp || no;
platformGetTagNamespace = options.getTagNamespace || no;
var isReservedTag = options.isReservedTag || no;
maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); };

maybeComponent = function (el) { return !!(
el.component ||
el.attrsMap[':is'] ||
el.attrsMap['v-bind:is'] ||
!(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag))
); };
transforms = pluckModuleFunction(options.modules, 'transformNode');
preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
Expand Down Expand Up @@ -5156,9 +5173,9 @@
code += genModifierCode;
}
var handlerCode = isMethodPath
? ("return " + (handler.value) + "($event)")
? ("return " + (handler.value) + ".apply(null, arguments)")
: isFunctionExpression
? ("return (" + (handler.value) + ")($event)")
? ("return (" + (handler.value) + ").apply(null, arguments)")
: isFunctionInvocation
? ("return " + (handler.value))
: handler.value;
Expand Down Expand Up @@ -5244,7 +5261,8 @@
options
) {
var state = new CodegenState(options);
var code = ast ? genElement(ast, state) : '_c("div")';
// fix #11483, Root level <script> tags should not be rendered.
var code = ast ? (ast.tag === 'script' ? 'null' : genElement(ast, state)) : '_c("div")';
return {
render: ("with(this){return " + code + "}"),
staticRenderFns: state.staticRenderFns
Expand Down Expand Up @@ -5706,7 +5724,7 @@
function genSlot (el, state) {
var slotName = el.slotName || '"default"';
var children = genChildren(el, state);
var res = "_t(" + slotName + (children ? ("," + children) : '');
var res = "_t(" + slotName + (children ? (",function(){return " + children + "}") : '');
var attrs = el.attrs || el.dynamicAttrs
? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
// slot props are camelized
Expand Down Expand Up @@ -6840,7 +6858,7 @@
var allowedGlobals = makeMap(
'Infinity,undefined,NaN,isFinite,isNaN,' +
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +
'require' // for Webpack/Browserify
);

Expand Down Expand Up @@ -7243,26 +7261,28 @@
*/
function renderSlot (
name,
fallback,
fallbackRender,
props,
bindObject
) {
var scopedSlotFn = this.$scopedSlots[name];
var nodes;
if (scopedSlotFn) { // scoped slot
if (scopedSlotFn) {
// scoped slot
props = props || {};
if (bindObject) {
if (!isObject(bindObject)) {
warn(
'slot v-bind without argument expects an Object',
this
);
warn('slot v-bind without argument expects an Object', this);
}
props = extend(extend({}, bindObject), props);
}
nodes = scopedSlotFn(props) || fallback;
nodes =
scopedSlotFn(props) ||
(typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender);
} else {
nodes = this.$slots[name] || fallback;
nodes =
this.$slots[name] ||
(typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender);
}

var target = props && props.slot;
Expand Down Expand Up @@ -7312,6 +7332,7 @@
} else if (eventKeyName) {
return hyphenate(eventKeyName) !== key
}
return eventKeyCode === undefined
}

/* */
Expand Down Expand Up @@ -7580,6 +7601,12 @@

/* */

function isAsyncPlaceholder (node) {
return node.isComment && node.asyncFactory
}

/* */

function normalizeScopedSlots (
slots,
normalSlots,
Expand Down Expand Up @@ -7636,9 +7663,10 @@
res = res && typeof res === 'object' && !Array.isArray(res)
? [res] // single vnode
: normalizeChildren(res);
var vnode = res && res[0];
return res && (
res.length === 0 ||
(res.length === 1 && res[0].isComment) // #9658
!vnode ||
(vnode.isComment && !isAsyncPlaceholder(vnode)) // #9658, #10391
) ? undefined
: res
};
Expand Down Expand Up @@ -7818,8 +7846,6 @@

/* */

/* */

var target;

function add (event, fn) {
Expand Down Expand Up @@ -7873,7 +7899,8 @@
var hasDynamicScopedSlot = !!(
(newScopedSlots && !newScopedSlots.$stable) ||
(oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||
(!newScopedSlots && vm.$scopedSlots.$key)
);

// Any static slot children from the parent may have changed during parent's
Expand Down Expand Up @@ -8417,8 +8444,10 @@
}

function createComponentInstanceForVnode (
vnode, // we know it's MountedComponentVNode but flow doesn't
parent // activeInstance in lifecycle state
// we know it's MountedComponentVNode but flow doesn't
vnode,
// activeInstance in lifecycle state
parent
) {
var options = {
_isComponent: true,
Expand Down

0 comments on commit f34f6bb

Please sign in to comment.