mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-09 15:42:26 +03:00
chore(release): 2.0.4
This commit is contained in:
@@ -2,6 +2,21 @@
|
||||
|
||||
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.0.4](https://github.com/nuxt/vue-meta/compare/v2.0.3...v2.0.4) (2019-06-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add warning for v1 boolean attribute syntax ([bfeab17](https://github.com/nuxt/vue-meta/commit/bfeab17))
|
||||
* dont change title when value is undefined (fix [#396](https://github.com/nuxt/vue-meta/issues/396)) ([90f9710](https://github.com/nuxt/vue-meta/commit/90f9710))
|
||||
|
||||
|
||||
### Tests
|
||||
|
||||
* enable all getMetaInfo tests again ([24d7fee](https://github.com/nuxt/vue-meta/commit/24d7fee))
|
||||
|
||||
|
||||
|
||||
### [2.0.3](https://github.com/nuxt/vue-meta/compare/v2.0.2...v2.0.3) (2019-06-11)
|
||||
|
||||
|
||||
|
||||
Vendored
+13
-7
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* vue-meta v2.0.3
|
||||
* vue-meta v2.0.4
|
||||
* (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.0.3";
|
||||
var version = "2.0.4";
|
||||
|
||||
// store an id to keep track of DOM updates
|
||||
var batchId = null;
|
||||
@@ -297,7 +297,7 @@ function createMixin(Vue, options) {
|
||||
|
||||
// set some sane defaults
|
||||
var defaultInfo = {
|
||||
title: '',
|
||||
title: undefined,
|
||||
titleChunk: '',
|
||||
titleTemplate: '%s',
|
||||
htmlAttrs: {},
|
||||
@@ -501,7 +501,7 @@ function applyTemplate(ref, headObject, template, chunk) {
|
||||
function findIndex(array, predicate) {
|
||||
var arguments$1 = arguments;
|
||||
|
||||
if (!Array.prototype.findIndex) {
|
||||
if ( !Array.prototype.findIndex) {
|
||||
// idx needs to be a Number, for..in returns string
|
||||
for (var idx = 0; idx < array.length; idx++) {
|
||||
if (predicate.call(arguments$1[2], array[idx], idx, array)) {
|
||||
@@ -514,14 +514,14 @@ function findIndex(array, predicate) {
|
||||
}
|
||||
|
||||
function toArray(arg) {
|
||||
if (!Array.from) {
|
||||
if ( !Array.from) {
|
||||
return Array.prototype.slice.call(arg)
|
||||
}
|
||||
return Array.from(arg)
|
||||
}
|
||||
|
||||
function includes(array, value) {
|
||||
if (!Array.prototype.includes) {
|
||||
if ( !Array.prototype.includes) {
|
||||
for (var idx in array) {
|
||||
if (array[idx] === value) {
|
||||
return true
|
||||
@@ -684,6 +684,10 @@ function merge(target, source, options) {
|
||||
|
||||
for (var key in source[attrKey]) {
|
||||
if (source[attrKey].hasOwnProperty(key) && source[attrKey][key] === undefined) {
|
||||
if (booleanHtmlAttributes.includes(key)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn('VueMeta: Please note that since v2 the value undefined is not used to indicate boolean attributes anymore, see migration guide for details');
|
||||
}
|
||||
delete source[attrKey][key];
|
||||
}
|
||||
}
|
||||
@@ -882,7 +886,9 @@ function updateAttribute(ref, attrs, tag) {
|
||||
* @param {String} title - the new title of the document
|
||||
*/
|
||||
function updateTitle(title) {
|
||||
if ( title === void 0 ) title = document.title;
|
||||
if (title === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
document.title = title;
|
||||
}
|
||||
|
||||
Vendored
+12
-4
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* vue-meta v2.0.3
|
||||
* vue-meta v2.0.4
|
||||
* (c) 2019
|
||||
* - Declan de Wet
|
||||
* - Sébastien Chopin (@Atinux)
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
import deepmerge from 'deepmerge';
|
||||
|
||||
var version = "2.0.3";
|
||||
var version = "2.0.4";
|
||||
|
||||
// store an id to keep track of DOM updates
|
||||
let batchId = null;
|
||||
@@ -280,7 +280,7 @@ function createMixin(Vue, options) {
|
||||
|
||||
// set some sane defaults
|
||||
const defaultInfo = {
|
||||
title: '',
|
||||
title: undefined,
|
||||
titleChunk: '',
|
||||
titleTemplate: '%s',
|
||||
htmlAttrs: {},
|
||||
@@ -614,6 +614,10 @@ function merge(target, source, options = {}) {
|
||||
|
||||
for (const key in source[attrKey]) {
|
||||
if (source[attrKey].hasOwnProperty(key) && source[attrKey][key] === undefined) {
|
||||
if (booleanHtmlAttributes.includes(key)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn('VueMeta: Please note that since v2 the value undefined is not used to indicate boolean attributes anymore, see migration guide for details');
|
||||
}
|
||||
delete source[attrKey][key];
|
||||
}
|
||||
}
|
||||
@@ -794,7 +798,11 @@ function updateAttribute({ attribute } = {}, attrs, tag) {
|
||||
*
|
||||
* @param {String} title - the new title of the document
|
||||
*/
|
||||
function updateTitle(title = document.title) {
|
||||
function updateTitle(title) {
|
||||
if (title === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
document.title = title;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+13
-7
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* vue-meta v2.0.3
|
||||
* vue-meta v2.0.4
|
||||
* (c) 2019
|
||||
* - Declan de Wet
|
||||
* - Sébastien Chopin (@Atinux)
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
import deepmerge from 'deepmerge';
|
||||
|
||||
var version = "2.0.3";
|
||||
var version = "2.0.4";
|
||||
|
||||
// store an id to keep track of DOM updates
|
||||
var batchId = null;
|
||||
@@ -293,7 +293,7 @@ function createMixin(Vue, options) {
|
||||
|
||||
// set some sane defaults
|
||||
var defaultInfo = {
|
||||
title: '',
|
||||
title: undefined,
|
||||
titleChunk: '',
|
||||
titleTemplate: '%s',
|
||||
htmlAttrs: {},
|
||||
@@ -497,7 +497,7 @@ function applyTemplate(ref, headObject, template, chunk) {
|
||||
function findIndex(array, predicate) {
|
||||
var arguments$1 = arguments;
|
||||
|
||||
if (!Array.prototype.findIndex) {
|
||||
if ( !Array.prototype.findIndex) {
|
||||
// idx needs to be a Number, for..in returns string
|
||||
for (var idx = 0; idx < array.length; idx++) {
|
||||
if (predicate.call(arguments$1[2], array[idx], idx, array)) {
|
||||
@@ -510,14 +510,14 @@ function findIndex(array, predicate) {
|
||||
}
|
||||
|
||||
function toArray(arg) {
|
||||
if (!Array.from) {
|
||||
if ( !Array.from) {
|
||||
return Array.prototype.slice.call(arg)
|
||||
}
|
||||
return Array.from(arg)
|
||||
}
|
||||
|
||||
function includes(array, value) {
|
||||
if (!Array.prototype.includes) {
|
||||
if ( !Array.prototype.includes) {
|
||||
for (var idx in array) {
|
||||
if (array[idx] === value) {
|
||||
return true
|
||||
@@ -680,6 +680,10 @@ function merge(target, source, options) {
|
||||
|
||||
for (var key in source[attrKey]) {
|
||||
if (source[attrKey].hasOwnProperty(key) && source[attrKey][key] === undefined) {
|
||||
if (booleanHtmlAttributes.includes(key)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn('VueMeta: Please note that since v2 the value undefined is not used to indicate boolean attributes anymore, see migration guide for details');
|
||||
}
|
||||
delete source[attrKey][key];
|
||||
}
|
||||
}
|
||||
@@ -878,7 +882,9 @@ function updateAttribute(ref, attrs, tag) {
|
||||
* @param {String} title - the new title of the document
|
||||
*/
|
||||
function updateTitle(title) {
|
||||
if ( title === void 0 ) title = document.title;
|
||||
if (title === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
document.title = title;
|
||||
}
|
||||
|
||||
Vendored
+116
-98
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* vue-meta v2.0.3
|
||||
* vue-meta v2.0.4
|
||||
* (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.0.3";
|
||||
var version = "2.0.4";
|
||||
|
||||
// store an id to keep track of DOM updates
|
||||
var batchId = null;
|
||||
@@ -297,7 +297,7 @@
|
||||
|
||||
// set some sane defaults
|
||||
var defaultInfo = {
|
||||
title: '',
|
||||
title: undefined,
|
||||
titleChunk: '',
|
||||
titleTemplate: '%s',
|
||||
htmlAttrs: {},
|
||||
@@ -494,7 +494,7 @@
|
||||
function findIndex(array, predicate) {
|
||||
var arguments$1 = arguments;
|
||||
|
||||
if (!Array.prototype.findIndex) {
|
||||
if ( !Array.prototype.findIndex) {
|
||||
// idx needs to be a Number, for..in returns string
|
||||
for (var idx = 0; idx < array.length; idx++) {
|
||||
if (predicate.call(arguments$1[2], array[idx], idx, array)) {
|
||||
@@ -507,14 +507,14 @@
|
||||
}
|
||||
|
||||
function toArray(arg) {
|
||||
if (!Array.from) {
|
||||
if ( !Array.from) {
|
||||
return Array.prototype.slice.call(arg)
|
||||
}
|
||||
return Array.from(arg)
|
||||
}
|
||||
|
||||
function includes(array, value) {
|
||||
if (!Array.prototype.includes) {
|
||||
if ( !Array.prototype.includes) {
|
||||
for (var idx in array) {
|
||||
if (array[idx] === value) {
|
||||
return true
|
||||
@@ -593,107 +593,119 @@
|
||||
|
||||
var umd = createCommonjsModule(function (module, exports) {
|
||||
(function (global, factory) {
|
||||
module.exports = factory();
|
||||
}(commonjsGlobal, (function () {
|
||||
var isMergeableObject = function isMergeableObject(value) {
|
||||
return isNonNullObject(value)
|
||||
&& !isSpecial(value)
|
||||
};
|
||||
module.exports = factory() ;
|
||||
}(commonjsGlobal, function () {
|
||||
var isMergeableObject = function isMergeableObject(value) {
|
||||
return isNonNullObject(value)
|
||||
&& !isSpecial(value)
|
||||
};
|
||||
|
||||
function isNonNullObject(value) {
|
||||
return !!value && typeof value === 'object'
|
||||
}
|
||||
|
||||
function isSpecial(value) {
|
||||
var stringValue = Object.prototype.toString.call(value);
|
||||
|
||||
return stringValue === '[object RegExp]'
|
||||
|| stringValue === '[object Date]'
|
||||
|| isReactElement(value)
|
||||
}
|
||||
|
||||
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
||||
var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
|
||||
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
|
||||
|
||||
function isReactElement(value) {
|
||||
return value.$$typeof === REACT_ELEMENT_TYPE
|
||||
}
|
||||
|
||||
function emptyTarget(val) {
|
||||
return Array.isArray(val) ? [] : {}
|
||||
}
|
||||
|
||||
function cloneUnlessOtherwiseSpecified(value, options) {
|
||||
return (options.clone !== false && options.isMergeableObject(value))
|
||||
? deepmerge(emptyTarget(value), value, options)
|
||||
: value
|
||||
}
|
||||
|
||||
function defaultArrayMerge(target, source, options) {
|
||||
return target.concat(source).map(function(element) {
|
||||
return cloneUnlessOtherwiseSpecified(element, options)
|
||||
})
|
||||
}
|
||||
|
||||
function getMergeFunction(key, options) {
|
||||
if (!options.customMerge) {
|
||||
return deepmerge
|
||||
function isNonNullObject(value) {
|
||||
return !!value && typeof value === 'object'
|
||||
}
|
||||
var customMerge = options.customMerge(key);
|
||||
return typeof customMerge === 'function' ? customMerge : deepmerge
|
||||
}
|
||||
|
||||
function mergeObject(target, source, options) {
|
||||
var destination = {};
|
||||
if (options.isMergeableObject(target)) {
|
||||
Object.keys(target).forEach(function(key) {
|
||||
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
||||
});
|
||||
function isSpecial(value) {
|
||||
var stringValue = Object.prototype.toString.call(value);
|
||||
|
||||
return stringValue === '[object RegExp]'
|
||||
|| stringValue === '[object Date]'
|
||||
|| isReactElement(value)
|
||||
}
|
||||
Object.keys(source).forEach(function(key) {
|
||||
if (!options.isMergeableObject(source[key]) || !target[key]) {
|
||||
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
||||
} else {
|
||||
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
||||
|
||||
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
||||
var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
|
||||
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
|
||||
|
||||
function isReactElement(value) {
|
||||
return value.$$typeof === REACT_ELEMENT_TYPE
|
||||
}
|
||||
|
||||
function emptyTarget(val) {
|
||||
return Array.isArray(val) ? [] : {}
|
||||
}
|
||||
|
||||
function cloneUnlessOtherwiseSpecified(value, options) {
|
||||
return (options.clone !== false && options.isMergeableObject(value))
|
||||
? deepmerge(emptyTarget(value), value, options)
|
||||
: value
|
||||
}
|
||||
|
||||
function defaultArrayMerge(target, source, options) {
|
||||
return target.concat(source).map(function(element) {
|
||||
return cloneUnlessOtherwiseSpecified(element, options)
|
||||
})
|
||||
}
|
||||
|
||||
function getMergeFunction(key, options) {
|
||||
if (!options.customMerge) {
|
||||
return deepmerge
|
||||
}
|
||||
});
|
||||
return destination
|
||||
}
|
||||
|
||||
function deepmerge(target, source, options) {
|
||||
options = options || {};
|
||||
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
||||
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
||||
|
||||
var sourceIsArray = Array.isArray(source);
|
||||
var targetIsArray = Array.isArray(target);
|
||||
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
||||
|
||||
if (!sourceAndTargetTypesMatch) {
|
||||
return cloneUnlessOtherwiseSpecified(source, options)
|
||||
} else if (sourceIsArray) {
|
||||
return options.arrayMerge(target, source, options)
|
||||
} else {
|
||||
return mergeObject(target, source, options)
|
||||
}
|
||||
}
|
||||
|
||||
deepmerge.all = function deepmergeAll(array, options) {
|
||||
if (!Array.isArray(array)) {
|
||||
throw new Error('first argument should be an array')
|
||||
var customMerge = options.customMerge(key);
|
||||
return typeof customMerge === 'function' ? customMerge : deepmerge
|
||||
}
|
||||
|
||||
return array.reduce(function(prev, next) {
|
||||
return deepmerge(prev, next, options)
|
||||
}, {})
|
||||
};
|
||||
function getEnumerableOwnPropertySymbols(target) {
|
||||
return Object.getOwnPropertySymbols
|
||||
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
||||
return target.propertyIsEnumerable(symbol)
|
||||
})
|
||||
: []
|
||||
}
|
||||
|
||||
var deepmerge_1 = deepmerge;
|
||||
function getKeys(target) {
|
||||
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
|
||||
}
|
||||
|
||||
return deepmerge_1;
|
||||
function mergeObject(target, source, options) {
|
||||
var destination = {};
|
||||
if (options.isMergeableObject(target)) {
|
||||
getKeys(target).forEach(function(key) {
|
||||
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
||||
});
|
||||
}
|
||||
getKeys(source).forEach(function(key) {
|
||||
if (!options.isMergeableObject(source[key]) || !target[key]) {
|
||||
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
||||
} else {
|
||||
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
||||
}
|
||||
});
|
||||
return destination
|
||||
}
|
||||
|
||||
})));
|
||||
function deepmerge(target, source, options) {
|
||||
options = options || {};
|
||||
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
||||
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
||||
|
||||
var sourceIsArray = Array.isArray(source);
|
||||
var targetIsArray = Array.isArray(target);
|
||||
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
||||
|
||||
if (!sourceAndTargetTypesMatch) {
|
||||
return cloneUnlessOtherwiseSpecified(source, options)
|
||||
} else if (sourceIsArray) {
|
||||
return options.arrayMerge(target, source, options)
|
||||
} else {
|
||||
return mergeObject(target, source, options)
|
||||
}
|
||||
}
|
||||
|
||||
deepmerge.all = function deepmergeAll(array, options) {
|
||||
if (!Array.isArray(array)) {
|
||||
throw new Error('first argument should be an array')
|
||||
}
|
||||
|
||||
return array.reduce(function(prev, next) {
|
||||
return deepmerge(prev, next, options)
|
||||
}, {})
|
||||
};
|
||||
|
||||
var deepmerge_1 = deepmerge;
|
||||
|
||||
return deepmerge_1;
|
||||
|
||||
}));
|
||||
});
|
||||
|
||||
function arrayMerge(ref, target, source) {
|
||||
@@ -780,6 +792,10 @@
|
||||
|
||||
for (var key in source[attrKey]) {
|
||||
if (source[attrKey].hasOwnProperty(key) && source[attrKey][key] === undefined) {
|
||||
if (booleanHtmlAttributes.includes(key)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn('VueMeta: Please note that since v2 the value undefined is not used to indicate boolean attributes anymore, see migration guide for details');
|
||||
}
|
||||
delete source[attrKey][key];
|
||||
}
|
||||
}
|
||||
@@ -978,7 +994,9 @@
|
||||
* @param {String} title - the new title of the document
|
||||
*/
|
||||
function updateTitle(title) {
|
||||
if ( title === void 0 ) title = document.title;
|
||||
if (title === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
document.title = title;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-meta",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"description": "Manage HTML metadata in Vue.js components with ssr support",
|
||||
"keywords": [
|
||||
"attribute",
|
||||
|
||||
Reference in New Issue
Block a user