2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-05-17 04:29:37 +03:00

chore(release): 2.3.2

This commit is contained in:
pimlie
2020-01-12 15:05:05 +00:00
parent f872dad0e5
commit 4b80129367
8 changed files with 242 additions and 74 deletions
+7
View File
@@ -2,6 +2,13 @@
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.3.2](https://github.com/nuxt/vue-meta/compare/v2.3.1...v2.3.2) (2020-01-12)
### Bug Fixes
* call afterNavigation after nextTick ([#478](https://github.com/nuxt/vue-meta/issues/478)) ([fa12530](https://github.com/nuxt/vue-meta/commit/fa12530b3ec450338c52dea2873f6913ee3abaf0))
### [2.3.1](https://github.com/nuxt/vue-meta/compare/v2.3.0...v2.3.1) (2019-10-09)
+75 -16
View File
@@ -1,6 +1,6 @@
/**
* vue-meta v2.3.1
* (c) 2019
* vue-meta v2.3.2
* (c) 2020
* - Declan de Wet
* - Sébastien Chopin (@Atinux)
* - Pim (@pimlie)
@@ -14,7 +14,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
var deepmerge = _interopDefault(require('deepmerge'));
var version = "2.3.1";
var version = "2.3.2";
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
@@ -45,6 +45,40 @@ function _defineProperty(obj, key, value) {
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
}
@@ -205,6 +239,7 @@ function triggerUpdate(_ref, rootVm, hookName) {
if (rootVm[rootConfigKey].initialized && !rootVm[rootConfigKey].pausing) {
// batch potential DOM updates to prevent extraneous re-rendering
// eslint-disable-next-line no-void
batchUpdate(function () {
return void rootVm.$meta().refresh();
}, debounceWait);
@@ -344,12 +379,14 @@ function addNavGuards(rootVm) {
next();
});
router.afterEach(function () {
var _resume = resume(rootVm),
metaInfo = _resume.metaInfo;
rootVm.$nextTick(function () {
var _resume = resume(rootVm),
metaInfo = _resume.metaInfo;
if (metaInfo && isFunction(metaInfo.afterNavigation)) {
metaInfo.afterNavigation(metaInfo);
}
if (metaInfo && isFunction(metaInfo.afterNavigation)) {
metaInfo.afterNavigation(metaInfo);
}
});
});
}
@@ -1613,7 +1650,7 @@ function tagGenerator(options, type, tags, generatorOptions) {
}
if (attr === 'callback') {
attrs += " onload=\"this.__vm_l=1\"";
attrs += ' onload="this.__vm_l=1"';
continue;
} // these form the attribute list for this tag
@@ -1714,11 +1751,33 @@ function generateServerInjector(options, metaInfo) {
}
}
if (serverInjector.extraData) {
for (var appId in serverInjector.extraData) {
var _data = serverInjector.extraData[appId][type];
if (_data) {
for (var _attr in _data) {
attributeData[_attr] = _objectSpread2({}, attributeData[_attr], _defineProperty({}, appId, _data[_attr]));
}
}
}
}
return attributeGenerator(options, type, attributeData, arg);
}
var str = tagGenerator(options, type, serverInjector.data[type], arg);
if (serverInjector.extraData) {
for (var _appId in serverInjector.extraData) {
var _data2 = serverInjector.extraData[_appId][type];
var extraStr = tagGenerator(options, type, _data2, _objectSpread2({
appId: _appId
}, arg));
str = "".concat(str).concat(extraStr);
}
}
return str;
}
};
@@ -1778,10 +1837,10 @@ function $meta(options) {
var $root = this.$root;
return {
'getOptions': function getOptions$1() {
getOptions: function getOptions$1() {
return getOptions(options);
},
'setOptions': function setOptions(newOptions) {
setOptions: function setOptions(newOptions) {
var refreshNavKey = 'refreshOnceOnNavigation';
if (newOptions && newOptions[refreshNavKey]) {
@@ -1805,19 +1864,19 @@ function $meta(options) {
options.waitOnDestroyed = !!newOptions[waitOnDestroyedKey];
}
},
'refresh': function refresh$1() {
refresh: function refresh$1() {
return refresh($root, options);
},
'inject': function inject$1() {
inject: function inject$1() {
return inject($root, options) ;
},
'pause': function pause$1() {
pause: function pause$1() {
return pause($root);
},
'resume': function resume$1() {
resume: function resume$1() {
return resume($root);
},
'addApp': function addApp$1(appId) {
addApp: function addApp$1(appId) {
return addApp($root, appId, options);
}
};
+18 -15
View File
@@ -1,6 +1,6 @@
/**
* vue-meta v2.3.1
* (c) 2019
* vue-meta v2.3.2
* (c) 2020
* - Declan de Wet
* - Sébastien Chopin (@Atinux)
* - Pim (@pimlie)
@@ -10,7 +10,7 @@
import deepmerge from 'deepmerge';
var version = "2.3.1";
var version = "2.3.2";
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
@@ -162,6 +162,7 @@ function triggerUpdate(_ref, rootVm, hookName) {
if (rootVm[rootConfigKey].initialized && !rootVm[rootConfigKey].pausing) {
// batch potential DOM updates to prevent extraneous re-rendering
// eslint-disable-next-line no-void
batchUpdate(function () {
return void rootVm.$meta().refresh();
}, debounceWait);
@@ -301,12 +302,14 @@ function addNavGuards(rootVm) {
next();
});
router.afterEach(function () {
var _resume = resume(rootVm),
metaInfo = _resume.metaInfo;
rootVm.$nextTick(function () {
var _resume = resume(rootVm),
metaInfo = _resume.metaInfo;
if (metaInfo && isFunction(metaInfo.afterNavigation)) {
metaInfo.afterNavigation(metaInfo);
}
if (metaInfo && isFunction(metaInfo.afterNavigation)) {
metaInfo.afterNavigation(metaInfo);
}
});
});
}
@@ -1467,10 +1470,10 @@ function $meta(options) {
var $root = this.$root;
return {
'getOptions': function getOptions$1() {
getOptions: function getOptions$1() {
return getOptions(options);
},
'setOptions': function setOptions(newOptions) {
setOptions: function setOptions(newOptions) {
var refreshNavKey = 'refreshOnceOnNavigation';
if (newOptions && newOptions[refreshNavKey]) {
@@ -1494,19 +1497,19 @@ function $meta(options) {
options.waitOnDestroyed = !!newOptions[waitOnDestroyedKey];
}
},
'refresh': function refresh$1() {
refresh: function refresh$1() {
return refresh($root, options);
},
'inject': function inject() {
inject: function inject() {
return showWarningNotSupportedInBrowserBundle('inject');
},
'pause': function pause$1() {
pause: function pause$1() {
return pause($root);
},
'resume': function resume$1() {
resume: function resume$1() {
return resume($root);
},
'addApp': function addApp$1(appId) {
addApp: function addApp$1(appId) {
return addApp($root, appId, options);
}
};
+10 -1
View File
File diff suppressed because one or more lines are too long
+75 -16
View File
@@ -1,6 +1,6 @@
/**
* vue-meta v2.3.1
* (c) 2019
* vue-meta v2.3.2
* (c) 2020
* - Declan de Wet
* - Sébastien Chopin (@Atinux)
* - Pim (@pimlie)
@@ -10,7 +10,7 @@
import deepmerge from 'deepmerge';
var version = "2.3.1";
var version = "2.3.2";
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
@@ -41,6 +41,40 @@ function _defineProperty(obj, key, value) {
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
}
@@ -201,6 +235,7 @@ function triggerUpdate(_ref, rootVm, hookName) {
if (rootVm[rootConfigKey].initialized && !rootVm[rootConfigKey].pausing) {
// batch potential DOM updates to prevent extraneous re-rendering
// eslint-disable-next-line no-void
batchUpdate(function () {
return void rootVm.$meta().refresh();
}, debounceWait);
@@ -340,12 +375,14 @@ function addNavGuards(rootVm) {
next();
});
router.afterEach(function () {
var _resume = resume(rootVm),
metaInfo = _resume.metaInfo;
rootVm.$nextTick(function () {
var _resume = resume(rootVm),
metaInfo = _resume.metaInfo;
if (metaInfo && isFunction(metaInfo.afterNavigation)) {
metaInfo.afterNavigation(metaInfo);
}
if (metaInfo && isFunction(metaInfo.afterNavigation)) {
metaInfo.afterNavigation(metaInfo);
}
});
});
}
@@ -1609,7 +1646,7 @@ function tagGenerator(options, type, tags, generatorOptions) {
}
if (attr === 'callback') {
attrs += " onload=\"this.__vm_l=1\"";
attrs += ' onload="this.__vm_l=1"';
continue;
} // these form the attribute list for this tag
@@ -1710,11 +1747,33 @@ function generateServerInjector(options, metaInfo) {
}
}
if (serverInjector.extraData) {
for (var appId in serverInjector.extraData) {
var _data = serverInjector.extraData[appId][type];
if (_data) {
for (var _attr in _data) {
attributeData[_attr] = _objectSpread2({}, attributeData[_attr], _defineProperty({}, appId, _data[_attr]));
}
}
}
}
return attributeGenerator(options, type, attributeData, arg);
}
var str = tagGenerator(options, type, serverInjector.data[type], arg);
if (serverInjector.extraData) {
for (var _appId in serverInjector.extraData) {
var _data2 = serverInjector.extraData[_appId][type];
var extraStr = tagGenerator(options, type, _data2, _objectSpread2({
appId: _appId
}, arg));
str = "".concat(str).concat(extraStr);
}
}
return str;
}
};
@@ -1774,10 +1833,10 @@ function $meta(options) {
var $root = this.$root;
return {
'getOptions': function getOptions$1() {
getOptions: function getOptions$1() {
return getOptions(options);
},
'setOptions': function setOptions(newOptions) {
setOptions: function setOptions(newOptions) {
var refreshNavKey = 'refreshOnceOnNavigation';
if (newOptions && newOptions[refreshNavKey]) {
@@ -1801,19 +1860,19 @@ function $meta(options) {
options.waitOnDestroyed = !!newOptions[waitOnDestroyedKey];
}
},
'refresh': function refresh$1() {
refresh: function refresh$1() {
return refresh($root, options);
},
'inject': function inject$1() {
inject: function inject$1() {
return inject($root, options) ;
},
'pause': function pause$1() {
pause: function pause$1() {
return pause($root);
},
'resume': function resume$1() {
resume: function resume$1() {
return resume($root);
},
'addApp': function addApp$1(appId) {
addApp: function addApp$1(appId) {
return addApp($root, appId, options);
}
};
+46 -24
View File
@@ -1,6 +1,6 @@
/**
* vue-meta v2.3.1
* (c) 2019
* vue-meta v2.3.2
* (c) 2020
* - Declan de Wet
* - Sébastien Chopin (@Atinux)
* - Pim (@pimlie)
@@ -12,9 +12,9 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.VueMeta = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var version = "2.3.1";
var version = "2.3.2";
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
@@ -166,6 +166,7 @@
if (rootVm[rootConfigKey].initialized && !rootVm[rootConfigKey].pausing) {
// batch potential DOM updates to prevent extraneous re-rendering
// eslint-disable-next-line no-void
batchUpdate(function () {
return void rootVm.$meta().refresh();
}, debounceWait);
@@ -305,12 +306,14 @@
next();
});
router.afterEach(function () {
var _resume = resume(rootVm),
metaInfo = _resume.metaInfo;
rootVm.$nextTick(function () {
var _resume = resume(rootVm),
metaInfo = _resume.metaInfo;
if (metaInfo && isFunction(metaInfo.afterNavigation)) {
metaInfo.afterNavigation(metaInfo);
}
if (metaInfo && isFunction(metaInfo.afterNavigation)) {
metaInfo.afterNavigation(metaInfo);
}
});
});
}
@@ -655,15 +658,27 @@
{
return deepmerge;
}
var customMerge = false(key);
return typeof customMerge === 'function' ? customMerge : deepmerge;
}
function getKeys(target) {
return Object.keys(target);
}
function propertyIsOnObject(object, property) {
try {
return property in object;
} catch (_) {
return false;
}
} // Protects from prototype poisoning and unexpected merging up the prototype chain.
function propertyIsUnsafe(target, key) {
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
&& Object.propertyIsEnumerable.call(target, key)); // and also unsafe if they're nonenumerable.
}
function mergeObject(target, source, options) {
var destination = {};
@@ -674,10 +689,14 @@
}
getKeys(source).forEach(function (key) {
if (!options.isMergeableObject(source[key]) || !target[key]) {
destination[key] = cloneUnlessOtherwiseSpecified(source[key]);
if (propertyIsUnsafe(target, key)) {
return;
}
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
destination[key] = getMergeFunction()(target[key], source[key], options);
} else {
destination[key] = getMergeFunction(key)(target[key], source[key], options);
destination[key] = cloneUnlessOtherwiseSpecified(source[key]);
}
});
return destination;
@@ -686,7 +705,10 @@
function deepmerge(target, source, options) {
options = options || {};
options.arrayMerge = options.arrayMerge;
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
options.isMergeableObject = options.isMergeableObject || isMergeableObject; // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
// implementations can use it. The caller may not replace it.
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
var sourceIsArray = Array.isArray(source);
var targetIsArray = Array.isArray(target);
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
@@ -1539,10 +1561,10 @@
var $root = this.$root;
return {
'getOptions': function getOptions$1() {
getOptions: function getOptions$1() {
return getOptions(options);
},
'setOptions': function setOptions(newOptions) {
setOptions: function setOptions(newOptions) {
var refreshNavKey = 'refreshOnceOnNavigation';
if (newOptions && newOptions[refreshNavKey]) {
@@ -1566,19 +1588,19 @@
options.waitOnDestroyed = !!newOptions[waitOnDestroyedKey];
}
},
'refresh': function refresh$1() {
refresh: function refresh$1() {
return refresh($root, options);
},
'inject': function inject() {
inject: function inject() {
return showWarningNotSupportedInBrowserBundle('inject');
},
'pause': function pause$1() {
pause: function pause$1() {
return pause($root);
},
'resume': function resume$1() {
resume: function resume$1() {
return resume($root);
},
'addApp': function addApp$1(appId) {
addApp: function addApp$1(appId) {
return addApp($root, appId, options);
}
};
@@ -1615,4 +1637,4 @@
return index;
}));
})));
+10 -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.3.1",
"version": "2.3.2",
"description": "Manage HTML metadata in Vue.js components with ssr support",
"keywords": [
"attribute",