Skip to content

Commit

Permalink
build: build 2.5.22
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 11, 2019
1 parent 7ac8f63 commit 06dbb2a
Show file tree
Hide file tree
Showing 14 changed files with 329 additions and 339 deletions.
79 changes: 36 additions & 43 deletions dist/vue.common.js
@@ -1,6 +1,6 @@
/*!
* Vue.js v2.5.21
* (c) 2014-2018 Evan You
* Vue.js v2.5.22
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/
'use strict';
Expand Down Expand Up @@ -629,7 +629,7 @@ if (process.env.NODE_ENV !== 'production') {
? vm.options
: vm._isVue
? vm.$options || vm.constructor.options
: vm || {};
: vm;
var name = options.name || options._componentTag;
var file = options.__file;
if (!name && file) {
Expand Down Expand Up @@ -724,9 +724,9 @@ Dep.prototype.notify = function notify () {
}
};

// the current target watcher being evaluated.
// this is globally unique because there could be only one
// watcher being evaluated at any time.
// The current target watcher being evaluated.
// This is globally unique because only one watcher
// can be evaluated at a time.
Dep.target = null;
var targetStack = [];

Expand Down Expand Up @@ -1254,13 +1254,26 @@ function mergeHook (
parentVal,
childVal
) {
return childVal
var res = childVal
? parentVal
? parentVal.concat(childVal)
: Array.isArray(childVal)
? childVal
: [childVal]
: parentVal
: parentVal;
return res
? dedupeHooks(res)
: res
}

function dedupeHooks (hooks) {
var res = [];
for (var i = 0; i < hooks.length; i++) {
if (res.indexOf(hooks[i]) === -1) {
res.push(hooks[i]);
}
}
return res
}

LIFECYCLE_HOOKS.forEach(function (hook) {
Expand Down Expand Up @@ -1496,7 +1509,7 @@ function mergeOptions (
normalizeProps(child, vm);
normalizeInject(child, vm);
normalizeDirectives(child);

// Apply extends and mixins on the child options,
// but only if it is a raw options object that isn't
// the result of another mergeOptions call.
Expand Down Expand Up @@ -2431,6 +2444,8 @@ function resolveAsyncComponent (
// (async resolves are shimmed as synchronous during SSR)
if (!sync) {
forceRender(true);
} else {
contexts.length = 0;
}
});

Expand Down Expand Up @@ -2598,8 +2613,8 @@ function eventsMixin (Vue) {
}
// array of events
if (Array.isArray(event)) {
for (var i = 0, l = event.length; i < l; i++) {
vm.$off(event[i], fn);
for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
vm.$off(event[i$1], fn);
}
return vm
}
Expand All @@ -2612,16 +2627,14 @@ function eventsMixin (Vue) {
vm._events[event] = null;
return vm
}
if (fn) {
// specific handler
var cb;
var i$1 = cbs.length;
while (i$1--) {
cb = cbs[i$1];
if (cb === fn || cb.fn === fn) {
cbs.splice(i$1, 1);
break
}
// specific handler
var cb;
var i = cbs.length;
while (i--) {
cb = cbs[i];
if (cb === fn || cb.fn === fn) {
cbs.splice(i, 1);
break
}
}
return vm
Expand Down Expand Up @@ -4791,36 +4804,16 @@ function resolveConstructorOptions (Ctor) {
function resolveModifiedOptions (Ctor) {
var modified;
var latest = Ctor.options;
var extended = Ctor.extendOptions;
var sealed = Ctor.sealedOptions;
for (var key in latest) {
if (latest[key] !== sealed[key]) {
if (!modified) { modified = {}; }
modified[key] = dedupe(latest[key], extended[key], sealed[key]);
modified[key] = latest[key];
}
}
return modified
}

function dedupe (latest, extended, sealed) {
// compare latest and sealed to ensure lifecycle hooks won't be duplicated
// between merges
if (Array.isArray(latest)) {
var res = [];
sealed = Array.isArray(sealed) ? sealed : [sealed];
extended = Array.isArray(extended) ? extended : [extended];
for (var i = 0; i < latest.length; i++) {
// push original options and not sealed options to exclude duplicated options
if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
res.push(latest[i]);
}
}
return res
} else {
return latest
}
}

function Vue (options) {
if (process.env.NODE_ENV !== 'production' &&
!(this instanceof Vue)
Expand Down Expand Up @@ -5189,7 +5182,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: FunctionalRenderContext
});

Vue.version = '2.5.21';
Vue.version = '2.5.22';

/* */

Expand Down
79 changes: 36 additions & 43 deletions dist/vue.esm.js
@@ -1,6 +1,6 @@
/*!
* Vue.js v2.5.21
* (c) 2014-2018 Evan You
* Vue.js v2.5.22
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/
/* */
Expand Down Expand Up @@ -627,7 +627,7 @@ if (process.env.NODE_ENV !== 'production') {
? vm.options
: vm._isVue
? vm.$options || vm.constructor.options
: vm || {};
: vm;
var name = options.name || options._componentTag;
var file = options.__file;
if (!name && file) {
Expand Down Expand Up @@ -722,9 +722,9 @@ Dep.prototype.notify = function notify () {
}
};

// the current target watcher being evaluated.
// this is globally unique because there could be only one
// watcher being evaluated at any time.
// The current target watcher being evaluated.
// This is globally unique because only one watcher
// can be evaluated at a time.
Dep.target = null;
var targetStack = [];

Expand Down Expand Up @@ -1252,13 +1252,26 @@ function mergeHook (
parentVal,
childVal
) {
return childVal
var res = childVal
? parentVal
? parentVal.concat(childVal)
: Array.isArray(childVal)
? childVal
: [childVal]
: parentVal
: parentVal;
return res
? dedupeHooks(res)
: res
}

function dedupeHooks (hooks) {
var res = [];
for (var i = 0; i < hooks.length; i++) {
if (res.indexOf(hooks[i]) === -1) {
res.push(hooks[i]);
}
}
return res
}

LIFECYCLE_HOOKS.forEach(function (hook) {
Expand Down Expand Up @@ -1494,7 +1507,7 @@ function mergeOptions (
normalizeProps(child, vm);
normalizeInject(child, vm);
normalizeDirectives(child);

// Apply extends and mixins on the child options,
// but only if it is a raw options object that isn't
// the result of another mergeOptions call.
Expand Down Expand Up @@ -2429,6 +2442,8 @@ function resolveAsyncComponent (
// (async resolves are shimmed as synchronous during SSR)
if (!sync) {
forceRender(true);
} else {
contexts.length = 0;
}
});

Expand Down Expand Up @@ -2596,8 +2611,8 @@ function eventsMixin (Vue) {
}
// array of events
if (Array.isArray(event)) {
for (var i = 0, l = event.length; i < l; i++) {
vm.$off(event[i], fn);
for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
vm.$off(event[i$1], fn);
}
return vm
}
Expand All @@ -2610,16 +2625,14 @@ function eventsMixin (Vue) {
vm._events[event] = null;
return vm
}
if (fn) {
// specific handler
var cb;
var i$1 = cbs.length;
while (i$1--) {
cb = cbs[i$1];
if (cb === fn || cb.fn === fn) {
cbs.splice(i$1, 1);
break
}
// specific handler
var cb;
var i = cbs.length;
while (i--) {
cb = cbs[i];
if (cb === fn || cb.fn === fn) {
cbs.splice(i, 1);
break
}
}
return vm
Expand Down Expand Up @@ -4789,36 +4802,16 @@ function resolveConstructorOptions (Ctor) {
function resolveModifiedOptions (Ctor) {
var modified;
var latest = Ctor.options;
var extended = Ctor.extendOptions;
var sealed = Ctor.sealedOptions;
for (var key in latest) {
if (latest[key] !== sealed[key]) {
if (!modified) { modified = {}; }
modified[key] = dedupe(latest[key], extended[key], sealed[key]);
modified[key] = latest[key];
}
}
return modified
}

function dedupe (latest, extended, sealed) {
// compare latest and sealed to ensure lifecycle hooks won't be duplicated
// between merges
if (Array.isArray(latest)) {
var res = [];
sealed = Array.isArray(sealed) ? sealed : [sealed];
extended = Array.isArray(extended) ? extended : [extended];
for (var i = 0; i < latest.length; i++) {
// push original options and not sealed options to exclude duplicated options
if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
res.push(latest[i]);
}
}
return res
} else {
return latest
}
}

function Vue (options) {
if (process.env.NODE_ENV !== 'production' &&
!(this instanceof Vue)
Expand Down Expand Up @@ -5187,7 +5180,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: FunctionalRenderContext
});

Vue.version = '2.5.21';
Vue.version = '2.5.22';

/* */

Expand Down

0 comments on commit 06dbb2a

Please sign in to comment.