Skip to content

Commit 877f765

Browse files
committed
chore(release): 2.0.4
1 parent 24d7fee commit 877f765

8 files changed

+161
-108
lines changed

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
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.
44

5+
### [2.0.4](https://github.com/nuxt/vue-meta/compare/v2.0.3...v2.0.4) (2019-06-22)
6+
7+
8+
### Bug Fixes
9+
10+
* add warning for v1 boolean attribute syntax ([bfeab17](https://github.com/nuxt/vue-meta/commit/bfeab17))
11+
* 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))
12+
13+
14+
### Tests
15+
16+
* enable all getMetaInfo tests again ([24d7fee](https://github.com/nuxt/vue-meta/commit/24d7fee))
17+
18+
19+
520
### [2.0.3](https://github.com/nuxt/vue-meta/compare/v2.0.2...v2.0.3) (2019-06-11)
621

722

dist/vue-meta.common.js

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vue-meta v2.0.3
2+
* vue-meta v2.0.4
33
* (c) 2019
44
* - Declan de Wet
55
* - Sébastien Chopin (@Atinux)
@@ -13,7 +13,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
1313

1414
var deepmerge = _interopDefault(require('deepmerge'));
1515

16-
var version = "2.0.3";
16+
var version = "2.0.4";
1717

1818
// store an id to keep track of DOM updates
1919
var batchId = null;
@@ -297,7 +297,7 @@ function createMixin(Vue, options) {
297297

298298
// set some sane defaults
299299
var defaultInfo = {
300-
title: '',
300+
title: undefined,
301301
titleChunk: '',
302302
titleTemplate: '%s',
303303
htmlAttrs: {},
@@ -501,7 +501,7 @@ function applyTemplate(ref, headObject, template, chunk) {
501501
function findIndex(array, predicate) {
502502
var arguments$1 = arguments;
503503

504-
if (!Array.prototype.findIndex) {
504+
if ( !Array.prototype.findIndex) {
505505
// idx needs to be a Number, for..in returns string
506506
for (var idx = 0; idx < array.length; idx++) {
507507
if (predicate.call(arguments$1[2], array[idx], idx, array)) {
@@ -514,14 +514,14 @@ function findIndex(array, predicate) {
514514
}
515515

516516
function toArray(arg) {
517-
if (!Array.from) {
517+
if ( !Array.from) {
518518
return Array.prototype.slice.call(arg)
519519
}
520520
return Array.from(arg)
521521
}
522522

523523
function includes(array, value) {
524-
if (!Array.prototype.includes) {
524+
if ( !Array.prototype.includes) {
525525
for (var idx in array) {
526526
if (array[idx] === value) {
527527
return true
@@ -684,6 +684,10 @@ function merge(target, source, options) {
684684

685685
for (var key in source[attrKey]) {
686686
if (source[attrKey].hasOwnProperty(key) && source[attrKey][key] === undefined) {
687+
if (booleanHtmlAttributes.includes(key)) {
688+
// eslint-disable-next-line no-console
689+
console.warn('VueMeta: Please note that since v2 the value undefined is not used to indicate boolean attributes anymore, see migration guide for details');
690+
}
687691
delete source[attrKey][key];
688692
}
689693
}
@@ -882,7 +886,9 @@ function updateAttribute(ref, attrs, tag) {
882886
* @param {String} title - the new title of the document
883887
*/
884888
function updateTitle(title) {
885-
if ( title === void 0 ) title = document.title;
889+
if (title === undefined) {
890+
return
891+
}
886892

887893
document.title = title;
888894
}

dist/vue-meta.esm.browser.js

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vue-meta v2.0.3
2+
* vue-meta v2.0.4
33
* (c) 2019
44
* - Declan de Wet
55
* - Sébastien Chopin (@Atinux)
@@ -9,7 +9,7 @@
99

1010
import deepmerge from 'deepmerge';
1111

12-
var version = "2.0.3";
12+
var version = "2.0.4";
1313

1414
// store an id to keep track of DOM updates
1515
let batchId = null;
@@ -280,7 +280,7 @@ function createMixin(Vue, options) {
280280

281281
// set some sane defaults
282282
const defaultInfo = {
283-
title: '',
283+
title: undefined,
284284
titleChunk: '',
285285
titleTemplate: '%s',
286286
htmlAttrs: {},
@@ -614,6 +614,10 @@ function merge(target, source, options = {}) {
614614

615615
for (const key in source[attrKey]) {
616616
if (source[attrKey].hasOwnProperty(key) && source[attrKey][key] === undefined) {
617+
if (booleanHtmlAttributes.includes(key)) {
618+
// eslint-disable-next-line no-console
619+
console.warn('VueMeta: Please note that since v2 the value undefined is not used to indicate boolean attributes anymore, see migration guide for details');
620+
}
617621
delete source[attrKey][key];
618622
}
619623
}
@@ -794,7 +798,11 @@ function updateAttribute({ attribute } = {}, attrs, tag) {
794798
*
795799
* @param {String} title - the new title of the document
796800
*/
797-
function updateTitle(title = document.title) {
801+
function updateTitle(title) {
802+
if (title === undefined) {
803+
return
804+
}
805+
798806
document.title = title;
799807
}
800808

dist/vue-meta.esm.browser.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-meta.esm.js

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vue-meta v2.0.3
2+
* vue-meta v2.0.4
33
* (c) 2019
44
* - Declan de Wet
55
* - Sébastien Chopin (@Atinux)
@@ -9,7 +9,7 @@
99

1010
import deepmerge from 'deepmerge';
1111

12-
var version = "2.0.3";
12+
var version = "2.0.4";
1313

1414
// store an id to keep track of DOM updates
1515
var batchId = null;
@@ -293,7 +293,7 @@ function createMixin(Vue, options) {
293293

294294
// set some sane defaults
295295
var defaultInfo = {
296-
title: '',
296+
title: undefined,
297297
titleChunk: '',
298298
titleTemplate: '%s',
299299
htmlAttrs: {},
@@ -497,7 +497,7 @@ function applyTemplate(ref, headObject, template, chunk) {
497497
function findIndex(array, predicate) {
498498
var arguments$1 = arguments;
499499

500-
if (!Array.prototype.findIndex) {
500+
if ( !Array.prototype.findIndex) {
501501
// idx needs to be a Number, for..in returns string
502502
for (var idx = 0; idx < array.length; idx++) {
503503
if (predicate.call(arguments$1[2], array[idx], idx, array)) {
@@ -510,14 +510,14 @@ function findIndex(array, predicate) {
510510
}
511511

512512
function toArray(arg) {
513-
if (!Array.from) {
513+
if ( !Array.from) {
514514
return Array.prototype.slice.call(arg)
515515
}
516516
return Array.from(arg)
517517
}
518518

519519
function includes(array, value) {
520-
if (!Array.prototype.includes) {
520+
if ( !Array.prototype.includes) {
521521
for (var idx in array) {
522522
if (array[idx] === value) {
523523
return true
@@ -680,6 +680,10 @@ function merge(target, source, options) {
680680

681681
for (var key in source[attrKey]) {
682682
if (source[attrKey].hasOwnProperty(key) && source[attrKey][key] === undefined) {
683+
if (booleanHtmlAttributes.includes(key)) {
684+
// eslint-disable-next-line no-console
685+
console.warn('VueMeta: Please note that since v2 the value undefined is not used to indicate boolean attributes anymore, see migration guide for details');
686+
}
683687
delete source[attrKey][key];
684688
}
685689
}
@@ -878,7 +882,9 @@ function updateAttribute(ref, attrs, tag) {
878882
* @param {String} title - the new title of the document
879883
*/
880884
function updateTitle(title) {
881-
if ( title === void 0 ) title = document.title;
885+
if (title === undefined) {
886+
return
887+
}
882888

883889
document.title = title;
884890
}

0 commit comments

Comments
 (0)