Skip to content

Commit

Permalink
build: bundle 3.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jan 14, 2020
1 parent 6ac6ca5 commit ecc8579
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 56 deletions.
33 changes: 20 additions & 13 deletions dist/vue-router.common.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* vue-router v3.1.3
* (c) 2019 Evan You
* vue-router v3.1.4
* (c) 2020 Evan You
* @license MIT
*/
'use strict';
Expand Down Expand Up @@ -924,7 +924,8 @@ function fillParams (
return filler(params, { pretty: true })
} catch (e) {
if (process.env.NODE_ENV !== 'production') {
warn(false, ("missing param for " + routeMsg + ": " + (e.message)));
// Fix #3072 no warn if `pathMatch` is string
warn(typeof params.pathMatch === 'string', ("missing param for " + routeMsg + ": " + (e.message)));
}
return ''
} finally {
Expand All @@ -946,20 +947,25 @@ function normalizeLocation (
if (next._normalized) {
return next
} else if (next.name) {
return extend({}, raw)
next = extend({}, raw);
var params = next.params;
if (params && typeof params === 'object') {
next.params = extend({}, params);
}
return next
}

// relative params
if (!next.path && next.params && current) {
next = extend({}, next);
next._normalized = true;
var params = extend(extend({}, current.params), next.params);
var params$1 = extend(extend({}, current.params), next.params);
if (current.name) {
next.name = current.name;
next.params = params;
next.params = params$1;
} else if (current.matched.length) {
var rawPath = current.matched[current.matched.length - 1].path;
next.path = fillParams(rawPath, params, ("path " + (current.path)));
next.path = fillParams(rawPath, params$1, ("path " + (current.path)));
} else if (process.env.NODE_ENV !== 'production') {
warn(false, "relative params navigation requires a current route.");
}
Expand Down Expand Up @@ -1099,7 +1105,7 @@ var Link = {
if (process.env.NODE_ENV !== 'production') {
warn(
false,
("RouterLink with to=\"" + (this.props.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child.")
("RouterLink with to=\"" + (this.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.")
);
}
return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
Expand Down Expand Up @@ -1824,7 +1830,10 @@ function pushState (url, replace) {
var history = window.history;
try {
if (replace) {
history.replaceState({ key: getStateKey() }, '', url);
// preserve existing history state as it could be overriden by the user
var stateCopy = extend({}, history.state);
stateCopy.key = getStateKey();
history.replaceState(stateCopy, '', url);
} else {
history.pushState({ key: setStateKey(genStateKey()) }, '', url);
}
Expand Down Expand Up @@ -2539,9 +2548,7 @@ function getHash () {
href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex);
} else { href = decodeURI(href); }
} else {
if (searchIndex > -1) {
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
}
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
}

return href
Expand Down Expand Up @@ -2875,7 +2882,7 @@ function createHref (base, fullPath, mode) {
}

VueRouter.install = install;
VueRouter.version = '3.1.3';
VueRouter.version = '3.1.4';

if (inBrowser && window.Vue) {
window.Vue.use(VueRouter);
Expand Down
29 changes: 18 additions & 11 deletions dist/vue-router.esm.browser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* vue-router v3.1.3
* (c) 2019 Evan You
* vue-router v3.1.4
* (c) 2020 Evan You
* @license MIT
*/
/* */
Expand Down Expand Up @@ -908,7 +908,8 @@ function fillParams (
return filler(params, { pretty: true })
} catch (e) {
{
warn(false, `missing param for ${routeMsg}: ${e.message}`);
// Fix #3072 no warn if `pathMatch` is string
warn(typeof params.pathMatch === 'string', `missing param for ${routeMsg}: ${e.message}`);
}
return ''
} finally {
Expand All @@ -930,7 +931,12 @@ function normalizeLocation (
if (next._normalized) {
return next
} else if (next.name) {
return extend({}, raw)
next = extend({}, raw);
const params = next.params;
if (params && typeof params === 'object') {
next.params = extend({}, params);
}
return next
}

// relative params
Expand Down Expand Up @@ -1079,8 +1085,8 @@ var Link = {
warn(
false,
`RouterLink with to="${
this.props.to
}" is trying to use a scoped slot but it didn't provide exactly one child.`
this.to
}" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.`
);
}
return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
Expand Down Expand Up @@ -1800,7 +1806,10 @@ function pushState (url, replace) {
const history = window.history;
try {
if (replace) {
history.replaceState({ key: getStateKey() }, '', url);
// preserve existing history state as it could be overriden by the user
const stateCopy = extend({}, history.state);
stateCopy.key = getStateKey();
history.replaceState(stateCopy, '', url);
} else {
history.pushState({ key: setStateKey(genStateKey()) }, '', url);
}
Expand Down Expand Up @@ -2492,9 +2501,7 @@ function getHash () {
href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex);
} else href = decodeURI(href);
} else {
if (searchIndex > -1) {
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
}
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
}

return href
Expand Down Expand Up @@ -2825,7 +2832,7 @@ function createHref (base, fullPath, mode) {
}

VueRouter.install = install;
VueRouter.version = '3.1.3';
VueRouter.version = '3.1.4';

if (inBrowser && window.Vue) {
window.Vue.use(VueRouter);
Expand Down
6 changes: 3 additions & 3 deletions dist/vue-router.esm.browser.min.js

Large diffs are not rendered by default.

33 changes: 20 additions & 13 deletions dist/vue-router.esm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* vue-router v3.1.3
* (c) 2019 Evan You
* vue-router v3.1.4
* (c) 2020 Evan You
* @license MIT
*/
/* */
Expand Down Expand Up @@ -922,7 +922,8 @@ function fillParams (
return filler(params, { pretty: true })
} catch (e) {
if (process.env.NODE_ENV !== 'production') {
warn(false, ("missing param for " + routeMsg + ": " + (e.message)));
// Fix #3072 no warn if `pathMatch` is string
warn(typeof params.pathMatch === 'string', ("missing param for " + routeMsg + ": " + (e.message)));
}
return ''
} finally {
Expand All @@ -944,20 +945,25 @@ function normalizeLocation (
if (next._normalized) {
return next
} else if (next.name) {
return extend({}, raw)
next = extend({}, raw);
var params = next.params;
if (params && typeof params === 'object') {
next.params = extend({}, params);
}
return next
}

// relative params
if (!next.path && next.params && current) {
next = extend({}, next);
next._normalized = true;
var params = extend(extend({}, current.params), next.params);
var params$1 = extend(extend({}, current.params), next.params);
if (current.name) {
next.name = current.name;
next.params = params;
next.params = params$1;
} else if (current.matched.length) {
var rawPath = current.matched[current.matched.length - 1].path;
next.path = fillParams(rawPath, params, ("path " + (current.path)));
next.path = fillParams(rawPath, params$1, ("path " + (current.path)));
} else if (process.env.NODE_ENV !== 'production') {
warn(false, "relative params navigation requires a current route.");
}
Expand Down Expand Up @@ -1097,7 +1103,7 @@ var Link = {
if (process.env.NODE_ENV !== 'production') {
warn(
false,
("RouterLink with to=\"" + (this.props.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child.")
("RouterLink with to=\"" + (this.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.")
);
}
return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
Expand Down Expand Up @@ -1822,7 +1828,10 @@ function pushState (url, replace) {
var history = window.history;
try {
if (replace) {
history.replaceState({ key: getStateKey() }, '', url);
// preserve existing history state as it could be overriden by the user
var stateCopy = extend({}, history.state);
stateCopy.key = getStateKey();
history.replaceState(stateCopy, '', url);
} else {
history.pushState({ key: setStateKey(genStateKey()) }, '', url);
}
Expand Down Expand Up @@ -2537,9 +2546,7 @@ function getHash () {
href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex);
} else { href = decodeURI(href); }
} else {
if (searchIndex > -1) {
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
}
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
}

return href
Expand Down Expand Up @@ -2873,7 +2880,7 @@ function createHref (base, fullPath, mode) {
}

VueRouter.install = install;
VueRouter.version = '3.1.3';
VueRouter.version = '3.1.4';

if (inBrowser && window.Vue) {
window.Vue.use(VueRouter);
Expand Down
33 changes: 20 additions & 13 deletions dist/vue-router.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* vue-router v3.1.3
* (c) 2019 Evan You
* vue-router v3.1.4
* (c) 2020 Evan You
* @license MIT
*/
(function (global, factory) {
Expand Down Expand Up @@ -928,7 +928,8 @@
return filler(params, { pretty: true })
} catch (e) {
{
warn(false, ("missing param for " + routeMsg + ": " + (e.message)));
// Fix #3072 no warn if `pathMatch` is string
warn(typeof params.pathMatch === 'string', ("missing param for " + routeMsg + ": " + (e.message)));
}
return ''
} finally {
Expand All @@ -950,20 +951,25 @@
if (next._normalized) {
return next
} else if (next.name) {
return extend({}, raw)
next = extend({}, raw);
var params = next.params;
if (params && typeof params === 'object') {
next.params = extend({}, params);
}
return next
}

// relative params
if (!next.path && next.params && current) {
next = extend({}, next);
next._normalized = true;
var params = extend(extend({}, current.params), next.params);
var params$1 = extend(extend({}, current.params), next.params);
if (current.name) {
next.name = current.name;
next.params = params;
next.params = params$1;
} else if (current.matched.length) {
var rawPath = current.matched[current.matched.length - 1].path;
next.path = fillParams(rawPath, params, ("path " + (current.path)));
next.path = fillParams(rawPath, params$1, ("path " + (current.path)));
} else {
warn(false, "relative params navigation requires a current route.");
}
Expand Down Expand Up @@ -1103,7 +1109,7 @@
{
warn(
false,
("RouterLink with to=\"" + (this.props.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child.")
("RouterLink with to=\"" + (this.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.")
);
}
return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
Expand Down Expand Up @@ -1828,7 +1834,10 @@
var history = window.history;
try {
if (replace) {
history.replaceState({ key: getStateKey() }, '', url);
// preserve existing history state as it could be overriden by the user
var stateCopy = extend({}, history.state);
stateCopy.key = getStateKey();
history.replaceState(stateCopy, '', url);
} else {
history.pushState({ key: setStateKey(genStateKey()) }, '', url);
}
Expand Down Expand Up @@ -2543,9 +2552,7 @@
href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex);
} else { href = decodeURI(href); }
} else {
if (searchIndex > -1) {
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
}
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
}

return href
Expand Down Expand Up @@ -2879,7 +2886,7 @@
}

VueRouter.install = install;
VueRouter.version = '3.1.3';
VueRouter.version = '3.1.4';

if (inBrowser && window.Vue) {
window.Vue.use(VueRouter);
Expand Down
6 changes: 3 additions & 3 deletions dist/vue-router.min.js

Large diffs are not rendered by default.

0 comments on commit ecc8579

Please sign in to comment.