Skip to content

Commit ecc8579

Browse files
committed
build: bundle 3.1.4
1 parent 6ac6ca5 commit ecc8579

6 files changed

+84
-56
lines changed

dist/vue-router.common.js

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
2-
* vue-router v3.1.3
3-
* (c) 2019 Evan You
2+
* vue-router v3.1.4
3+
* (c) 2020 Evan You
44
* @license MIT
55
*/
66
'use strict';
@@ -924,7 +924,8 @@ function fillParams (
924924
return filler(params, { pretty: true })
925925
} catch (e) {
926926
if (process.env.NODE_ENV !== 'production') {
927-
warn(false, ("missing param for " + routeMsg + ": " + (e.message)));
927+
// Fix #3072 no warn if `pathMatch` is string
928+
warn(typeof params.pathMatch === 'string', ("missing param for " + routeMsg + ": " + (e.message)));
928929
}
929930
return ''
930931
} finally {
@@ -946,20 +947,25 @@ function normalizeLocation (
946947
if (next._normalized) {
947948
return next
948949
} else if (next.name) {
949-
return extend({}, raw)
950+
next = extend({}, raw);
951+
var params = next.params;
952+
if (params && typeof params === 'object') {
953+
next.params = extend({}, params);
954+
}
955+
return next
950956
}
951957

952958
// relative params
953959
if (!next.path && next.params && current) {
954960
next = extend({}, next);
955961
next._normalized = true;
956-
var params = extend(extend({}, current.params), next.params);
962+
var params$1 = extend(extend({}, current.params), next.params);
957963
if (current.name) {
958964
next.name = current.name;
959-
next.params = params;
965+
next.params = params$1;
960966
} else if (current.matched.length) {
961967
var rawPath = current.matched[current.matched.length - 1].path;
962-
next.path = fillParams(rawPath, params, ("path " + (current.path)));
968+
next.path = fillParams(rawPath, params$1, ("path " + (current.path)));
963969
} else if (process.env.NODE_ENV !== 'production') {
964970
warn(false, "relative params navigation requires a current route.");
965971
}
@@ -1099,7 +1105,7 @@ var Link = {
10991105
if (process.env.NODE_ENV !== 'production') {
11001106
warn(
11011107
false,
1102-
("RouterLink with to=\"" + (this.props.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child.")
1108+
("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.")
11031109
);
11041110
}
11051111
return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
@@ -1824,7 +1830,10 @@ function pushState (url, replace) {
18241830
var history = window.history;
18251831
try {
18261832
if (replace) {
1827-
history.replaceState({ key: getStateKey() }, '', url);
1833+
// preserve existing history state as it could be overriden by the user
1834+
var stateCopy = extend({}, history.state);
1835+
stateCopy.key = getStateKey();
1836+
history.replaceState(stateCopy, '', url);
18281837
} else {
18291838
history.pushState({ key: setStateKey(genStateKey()) }, '', url);
18301839
}
@@ -2539,9 +2548,7 @@ function getHash () {
25392548
href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex);
25402549
} else { href = decodeURI(href); }
25412550
} else {
2542-
if (searchIndex > -1) {
2543-
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
2544-
}
2551+
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
25452552
}
25462553

25472554
return href
@@ -2875,7 +2882,7 @@ function createHref (base, fullPath, mode) {
28752882
}
28762883

28772884
VueRouter.install = install;
2878-
VueRouter.version = '3.1.3';
2885+
VueRouter.version = '3.1.4';
28792886

28802887
if (inBrowser && window.Vue) {
28812888
window.Vue.use(VueRouter);

dist/vue-router.esm.browser.js

+18-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
2-
* vue-router v3.1.3
3-
* (c) 2019 Evan You
2+
* vue-router v3.1.4
3+
* (c) 2020 Evan You
44
* @license MIT
55
*/
66
/* */
@@ -908,7 +908,8 @@ function fillParams (
908908
return filler(params, { pretty: true })
909909
} catch (e) {
910910
{
911-
warn(false, `missing param for ${routeMsg}: ${e.message}`);
911+
// Fix #3072 no warn if `pathMatch` is string
912+
warn(typeof params.pathMatch === 'string', `missing param for ${routeMsg}: ${e.message}`);
912913
}
913914
return ''
914915
} finally {
@@ -930,7 +931,12 @@ function normalizeLocation (
930931
if (next._normalized) {
931932
return next
932933
} else if (next.name) {
933-
return extend({}, raw)
934+
next = extend({}, raw);
935+
const params = next.params;
936+
if (params && typeof params === 'object') {
937+
next.params = extend({}, params);
938+
}
939+
return next
934940
}
935941

936942
// relative params
@@ -1079,8 +1085,8 @@ var Link = {
10791085
warn(
10801086
false,
10811087
`RouterLink with to="${
1082-
this.props.to
1083-
}" is trying to use a scoped slot but it didn't provide exactly one child.`
1088+
this.to
1089+
}" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.`
10841090
);
10851091
}
10861092
return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
@@ -1800,7 +1806,10 @@ function pushState (url, replace) {
18001806
const history = window.history;
18011807
try {
18021808
if (replace) {
1803-
history.replaceState({ key: getStateKey() }, '', url);
1809+
// preserve existing history state as it could be overriden by the user
1810+
const stateCopy = extend({}, history.state);
1811+
stateCopy.key = getStateKey();
1812+
history.replaceState(stateCopy, '', url);
18041813
} else {
18051814
history.pushState({ key: setStateKey(genStateKey()) }, '', url);
18061815
}
@@ -2492,9 +2501,7 @@ function getHash () {
24922501
href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex);
24932502
} else href = decodeURI(href);
24942503
} else {
2495-
if (searchIndex > -1) {
2496-
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
2497-
}
2504+
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
24982505
}
24992506

25002507
return href
@@ -2825,7 +2832,7 @@ function createHref (base, fullPath, mode) {
28252832
}
28262833

28272834
VueRouter.install = install;
2828-
VueRouter.version = '3.1.3';
2835+
VueRouter.version = '3.1.4';
28292836

28302837
if (inBrowser && window.Vue) {
28312838
window.Vue.use(VueRouter);

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

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

dist/vue-router.esm.js

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
2-
* vue-router v3.1.3
3-
* (c) 2019 Evan You
2+
* vue-router v3.1.4
3+
* (c) 2020 Evan You
44
* @license MIT
55
*/
66
/* */
@@ -922,7 +922,8 @@ function fillParams (
922922
return filler(params, { pretty: true })
923923
} catch (e) {
924924
if (process.env.NODE_ENV !== 'production') {
925-
warn(false, ("missing param for " + routeMsg + ": " + (e.message)));
925+
// Fix #3072 no warn if `pathMatch` is string
926+
warn(typeof params.pathMatch === 'string', ("missing param for " + routeMsg + ": " + (e.message)));
926927
}
927928
return ''
928929
} finally {
@@ -944,20 +945,25 @@ function normalizeLocation (
944945
if (next._normalized) {
945946
return next
946947
} else if (next.name) {
947-
return extend({}, raw)
948+
next = extend({}, raw);
949+
var params = next.params;
950+
if (params && typeof params === 'object') {
951+
next.params = extend({}, params);
952+
}
953+
return next
948954
}
949955

950956
// relative params
951957
if (!next.path && next.params && current) {
952958
next = extend({}, next);
953959
next._normalized = true;
954-
var params = extend(extend({}, current.params), next.params);
960+
var params$1 = extend(extend({}, current.params), next.params);
955961
if (current.name) {
956962
next.name = current.name;
957-
next.params = params;
963+
next.params = params$1;
958964
} else if (current.matched.length) {
959965
var rawPath = current.matched[current.matched.length - 1].path;
960-
next.path = fillParams(rawPath, params, ("path " + (current.path)));
966+
next.path = fillParams(rawPath, params$1, ("path " + (current.path)));
961967
} else if (process.env.NODE_ENV !== 'production') {
962968
warn(false, "relative params navigation requires a current route.");
963969
}
@@ -1097,7 +1103,7 @@ var Link = {
10971103
if (process.env.NODE_ENV !== 'production') {
10981104
warn(
10991105
false,
1100-
("RouterLink with to=\"" + (this.props.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child.")
1106+
("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.")
11011107
);
11021108
}
11031109
return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
@@ -1822,7 +1828,10 @@ function pushState (url, replace) {
18221828
var history = window.history;
18231829
try {
18241830
if (replace) {
1825-
history.replaceState({ key: getStateKey() }, '', url);
1831+
// preserve existing history state as it could be overriden by the user
1832+
var stateCopy = extend({}, history.state);
1833+
stateCopy.key = getStateKey();
1834+
history.replaceState(stateCopy, '', url);
18261835
} else {
18271836
history.pushState({ key: setStateKey(genStateKey()) }, '', url);
18281837
}
@@ -2537,9 +2546,7 @@ function getHash () {
25372546
href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex);
25382547
} else { href = decodeURI(href); }
25392548
} else {
2540-
if (searchIndex > -1) {
2541-
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
2542-
}
2549+
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
25432550
}
25442551

25452552
return href
@@ -2873,7 +2880,7 @@ function createHref (base, fullPath, mode) {
28732880
}
28742881

28752882
VueRouter.install = install;
2876-
VueRouter.version = '3.1.3';
2883+
VueRouter.version = '3.1.4';
28772884

28782885
if (inBrowser && window.Vue) {
28792886
window.Vue.use(VueRouter);

dist/vue-router.js

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
2-
* vue-router v3.1.3
3-
* (c) 2019 Evan You
2+
* vue-router v3.1.4
3+
* (c) 2020 Evan You
44
* @license MIT
55
*/
66
(function (global, factory) {
@@ -928,7 +928,8 @@
928928
return filler(params, { pretty: true })
929929
} catch (e) {
930930
{
931-
warn(false, ("missing param for " + routeMsg + ": " + (e.message)));
931+
// Fix #3072 no warn if `pathMatch` is string
932+
warn(typeof params.pathMatch === 'string', ("missing param for " + routeMsg + ": " + (e.message)));
932933
}
933934
return ''
934935
} finally {
@@ -950,20 +951,25 @@
950951
if (next._normalized) {
951952
return next
952953
} else if (next.name) {
953-
return extend({}, raw)
954+
next = extend({}, raw);
955+
var params = next.params;
956+
if (params && typeof params === 'object') {
957+
next.params = extend({}, params);
958+
}
959+
return next
954960
}
955961

956962
// relative params
957963
if (!next.path && next.params && current) {
958964
next = extend({}, next);
959965
next._normalized = true;
960-
var params = extend(extend({}, current.params), next.params);
966+
var params$1 = extend(extend({}, current.params), next.params);
961967
if (current.name) {
962968
next.name = current.name;
963-
next.params = params;
969+
next.params = params$1;
964970
} else if (current.matched.length) {
965971
var rawPath = current.matched[current.matched.length - 1].path;
966-
next.path = fillParams(rawPath, params, ("path " + (current.path)));
972+
next.path = fillParams(rawPath, params$1, ("path " + (current.path)));
967973
} else {
968974
warn(false, "relative params navigation requires a current route.");
969975
}
@@ -1103,7 +1109,7 @@
11031109
{
11041110
warn(
11051111
false,
1106-
("RouterLink with to=\"" + (this.props.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child.")
1112+
("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.")
11071113
);
11081114
}
11091115
return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
@@ -1828,7 +1834,10 @@
18281834
var history = window.history;
18291835
try {
18301836
if (replace) {
1831-
history.replaceState({ key: getStateKey() }, '', url);
1837+
// preserve existing history state as it could be overriden by the user
1838+
var stateCopy = extend({}, history.state);
1839+
stateCopy.key = getStateKey();
1840+
history.replaceState(stateCopy, '', url);
18321841
} else {
18331842
history.pushState({ key: setStateKey(genStateKey()) }, '', url);
18341843
}
@@ -2543,9 +2552,7 @@
25432552
href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex);
25442553
} else { href = decodeURI(href); }
25452554
} else {
2546-
if (searchIndex > -1) {
2547-
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
2548-
}
2555+
href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex);
25492556
}
25502557

25512558
return href
@@ -2879,7 +2886,7 @@
28792886
}
28802887

28812888
VueRouter.install = install;
2882-
VueRouter.version = '3.1.3';
2889+
VueRouter.version = '3.1.4';
28832890

28842891
if (inBrowser && window.Vue) {
28852892
window.Vue.use(VueRouter);

dist/vue-router.min.js

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

0 commit comments

Comments
 (0)