2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-25 13:30:33 +03:00

chore(release): 2.2.2

This commit is contained in:
pimlie
2019-08-30 16:19:52 +00:00
parent 00c0939abe
commit d0baf34180
8 changed files with 523 additions and 483 deletions
+8
View File
@@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [2.2.2](https://github.com/nuxt/vue-meta/compare/v2.2.1...v2.2.2) (2019-08-30)
### Bug Fixes
* workaround for memoryleak in destroyed hook ([ec7b1fb](https://github.com/nuxt/vue-meta/commit/ec7b1fb))
* **types:** add "content" property to MetaPropertyEquiv and remove "name" ([#436](https://github.com/nuxt/vue-meta/issues/436)) ([4384f44](https://github.com/nuxt/vue-meta/commit/4384f44))
### [2.2.1](https://github.com/nuxt/vue-meta/compare/v2.2.0...v2.2.1) (2019-08-04)
+29 -21
View File
@@ -1,5 +1,5 @@
/**
* vue-meta v2.2.1
* vue-meta v2.2.2
* (c) 2019
* - Declan de Wet
* - Sébastien Chopin (@Atinux)
@@ -13,7 +13,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
var deepmerge = _interopDefault(require('deepmerge'));
var version = "2.2.1";
var version = "2.2.2";
// store an id to keep track of DOM updates
var batchId = null;
@@ -240,7 +240,10 @@ function createMixin(Vue, options) {
// _vnode is used to know that it's attached to a real component
// useful if we use some mixin to add some meta tags (like nuxt-i18n)
if (!isUndefined(this.$options[options.keyName]) && this.$options[options.keyName] !== null) {
if (isUndefined(this.$options[options.keyName]) || this.$options[options.keyName] === null) {
return;
}
if (!this.$root._vueMeta) {
this.$root._vueMeta = {
appId: appId
@@ -278,7 +281,8 @@ function createMixin(Vue, options) {
// credit for this suggestion goes to [Sébastien Chopin](https://github.com/Atinux)
ensuredPush(this.$options, 'created', function () {
_this.$watch('$metaInfo', function () {
triggerUpdate(this, 'watcher');
_this.__metaInfo = undefined;
triggerUpdate(_this, 'watcher');
});
});
}
@@ -343,34 +347,38 @@ function createMixin(Vue, options) {
} // do not trigger refresh on the server side
if (!this.$isServer) {
// no need to add this hooks on server side
if (this.$isServer) {
return;
} // no need to add this hooks on server side
updateOnLifecycleHook.forEach(function (lifecycleHook) {
ensuredPush(_this.$options, lifecycleHook, function () {
return triggerUpdate(_this, lifecycleHook);
});
}); // re-render meta data when returning from a child component to parent
});
},
// TODO: move back into beforeCreate when Vue issue is resolved
destroyed: function destroyed() {
var _this3 = this;
// do not trigger refresh:
// - on the server side
// - when the component doesnt have a parent
// - doesnt have metaInfo defined
if (this.$isServer || !this.$parent || !hasMetaInfo(this)) {
return;
} // Wait that element is hidden before refreshing meta tags (to support animations)
ensuredPush(this.$options, 'destroyed', function () {
// Wait that element is hidden before refreshing meta tags (to support animations)
var interval = setInterval(function () {
if (_this.$el && _this.$el.offsetParent !== null) {
/* istanbul ignore next line */
if (_this3.$el && _this3.$el.offsetParent !== null) {
return;
}
clearInterval(interval);
if (!_this.$parent) {
/* istanbul ignore next line */
return;
}
triggerUpdate(_this, 'destroyed');
triggerUpdate(_this3, 'destroyed');
}, 50);
});
}
}
}
};
}
+29 -21
View File
@@ -1,5 +1,5 @@
/**
* vue-meta v2.2.1
* vue-meta v2.2.2
* (c) 2019
* - Declan de Wet
* - Sébastien Chopin (@Atinux)
@@ -9,7 +9,7 @@
import deepmerge from 'deepmerge';
var version = "2.2.1";
var version = "2.2.2";
// store an id to keep track of DOM updates
var batchId = null;
@@ -219,7 +219,10 @@ function createMixin(Vue, options) {
// _vnode is used to know that it's attached to a real component
// useful if we use some mixin to add some meta tags (like nuxt-i18n)
if (!isUndefined(this.$options[options.keyName]) && this.$options[options.keyName] !== null) {
if (isUndefined(this.$options[options.keyName]) || this.$options[options.keyName] === null) {
return;
}
if (!this.$root._vueMeta) {
this.$root._vueMeta = {
appId: appId
@@ -257,7 +260,8 @@ function createMixin(Vue, options) {
// credit for this suggestion goes to [Sébastien Chopin](https://github.com/Atinux)
ensuredPush(this.$options, 'created', function () {
_this.$watch('$metaInfo', function () {
triggerUpdate(this, 'watcher');
_this.__metaInfo = undefined;
triggerUpdate(_this, 'watcher');
});
});
}
@@ -322,34 +326,38 @@ function createMixin(Vue, options) {
} // do not trigger refresh on the server side
if (!this.$isServer) {
// no need to add this hooks on server side
if (this.$isServer) {
return;
} // no need to add this hooks on server side
updateOnLifecycleHook.forEach(function (lifecycleHook) {
ensuredPush(_this.$options, lifecycleHook, function () {
return triggerUpdate(_this, lifecycleHook);
});
}); // re-render meta data when returning from a child component to parent
});
},
// TODO: move back into beforeCreate when Vue issue is resolved
destroyed: function destroyed() {
var _this3 = this;
// do not trigger refresh:
// - on the server side
// - when the component doesnt have a parent
// - doesnt have metaInfo defined
if (this.$isServer || !this.$parent || !hasMetaInfo(this)) {
return;
} // Wait that element is hidden before refreshing meta tags (to support animations)
ensuredPush(this.$options, 'destroyed', function () {
// Wait that element is hidden before refreshing meta tags (to support animations)
var interval = setInterval(function () {
if (_this.$el && _this.$el.offsetParent !== null) {
/* istanbul ignore next line */
if (_this3.$el && _this3.$el.offsetParent !== null) {
return;
}
clearInterval(interval);
if (!_this.$parent) {
/* istanbul ignore next line */
return;
}
triggerUpdate(_this, 'destroyed');
triggerUpdate(_this3, 'destroyed');
}, 50);
});
}
}
}
};
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+29 -21
View File
@@ -1,5 +1,5 @@
/**
* vue-meta v2.2.1
* vue-meta v2.2.2
* (c) 2019
* - Declan de Wet
* - Sébastien Chopin (@Atinux)
@@ -9,7 +9,7 @@
import deepmerge from 'deepmerge';
var version = "2.2.1";
var version = "2.2.2";
// store an id to keep track of DOM updates
var batchId = null;
@@ -236,7 +236,10 @@ function createMixin(Vue, options) {
// _vnode is used to know that it's attached to a real component
// useful if we use some mixin to add some meta tags (like nuxt-i18n)
if (!isUndefined(this.$options[options.keyName]) && this.$options[options.keyName] !== null) {
if (isUndefined(this.$options[options.keyName]) || this.$options[options.keyName] === null) {
return;
}
if (!this.$root._vueMeta) {
this.$root._vueMeta = {
appId: appId
@@ -274,7 +277,8 @@ function createMixin(Vue, options) {
// credit for this suggestion goes to [Sébastien Chopin](https://github.com/Atinux)
ensuredPush(this.$options, 'created', function () {
_this.$watch('$metaInfo', function () {
triggerUpdate(this, 'watcher');
_this.__metaInfo = undefined;
triggerUpdate(_this, 'watcher');
});
});
}
@@ -339,34 +343,38 @@ function createMixin(Vue, options) {
} // do not trigger refresh on the server side
if (!this.$isServer) {
// no need to add this hooks on server side
if (this.$isServer) {
return;
} // no need to add this hooks on server side
updateOnLifecycleHook.forEach(function (lifecycleHook) {
ensuredPush(_this.$options, lifecycleHook, function () {
return triggerUpdate(_this, lifecycleHook);
});
}); // re-render meta data when returning from a child component to parent
});
},
// TODO: move back into beforeCreate when Vue issue is resolved
destroyed: function destroyed() {
var _this3 = this;
// do not trigger refresh:
// - on the server side
// - when the component doesnt have a parent
// - doesnt have metaInfo defined
if (this.$isServer || !this.$parent || !hasMetaInfo(this)) {
return;
} // Wait that element is hidden before refreshing meta tags (to support animations)
ensuredPush(this.$options, 'destroyed', function () {
// Wait that element is hidden before refreshing meta tags (to support animations)
var interval = setInterval(function () {
if (_this.$el && _this.$el.offsetParent !== null) {
/* istanbul ignore next line */
if (_this3.$el && _this3.$el.offsetParent !== null) {
return;
}
clearInterval(interval);
if (!_this.$parent) {
/* istanbul ignore next line */
return;
}
triggerUpdate(_this, 'destroyed');
triggerUpdate(_this3, 'destroyed');
}, 50);
});
}
}
}
};
}
+29 -21
View File
@@ -1,5 +1,5 @@
/**
* vue-meta v2.2.1
* vue-meta v2.2.2
* (c) 2019
* - Declan de Wet
* - Sébastien Chopin (@Atinux)
@@ -13,7 +13,7 @@
(global = global || self, global.VueMeta = factory());
}(this, function () { 'use strict';
var version = "2.2.1";
var version = "2.2.2";
// store an id to keep track of DOM updates
var batchId = null;
@@ -223,7 +223,10 @@
// _vnode is used to know that it's attached to a real component
// useful if we use some mixin to add some meta tags (like nuxt-i18n)
if (!isUndefined(this.$options[options.keyName]) && this.$options[options.keyName] !== null) {
if (isUndefined(this.$options[options.keyName]) || this.$options[options.keyName] === null) {
return;
}
if (!this.$root._vueMeta) {
this.$root._vueMeta = {
appId: appId
@@ -261,7 +264,8 @@
// credit for this suggestion goes to [Sébastien Chopin](https://github.com/Atinux)
ensuredPush(this.$options, 'created', function () {
_this.$watch('$metaInfo', function () {
triggerUpdate(this, 'watcher');
_this.__metaInfo = undefined;
triggerUpdate(_this, 'watcher');
});
});
}
@@ -326,34 +330,38 @@
} // do not trigger refresh on the server side
if (!this.$isServer) {
// no need to add this hooks on server side
if (this.$isServer) {
return;
} // no need to add this hooks on server side
updateOnLifecycleHook.forEach(function (lifecycleHook) {
ensuredPush(_this.$options, lifecycleHook, function () {
return triggerUpdate(_this, lifecycleHook);
});
}); // re-render meta data when returning from a child component to parent
});
},
// TODO: move back into beforeCreate when Vue issue is resolved
destroyed: function destroyed() {
var _this3 = this;
// do not trigger refresh:
// - on the server side
// - when the component doesnt have a parent
// - doesnt have metaInfo defined
if (this.$isServer || !this.$parent || !hasMetaInfo(this)) {
return;
} // Wait that element is hidden before refreshing meta tags (to support animations)
ensuredPush(this.$options, 'destroyed', function () {
// Wait that element is hidden before refreshing meta tags (to support animations)
var interval = setInterval(function () {
if (_this.$el && _this.$el.offsetParent !== null) {
/* istanbul ignore next line */
if (_this3.$el && _this3.$el.offsetParent !== null) {
return;
}
clearInterval(interval);
if (!_this.$parent) {
/* istanbul ignore next line */
return;
}
triggerUpdate(_this, 'destroyed');
triggerUpdate(_this3, 'destroyed');
}, 50);
});
}
}
}
};
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "vue-meta",
"version": "2.2.1",
"version": "2.2.2",
"description": "Manage HTML metadata in Vue.js components with ssr support",
"keywords": [
"attribute",