Skip to content

Commit d4a493d

Browse files
committed
build: bundle 3.5.2
1 parent 260f737 commit d4a493d

6 files changed

+68
-36
lines changed

Diff for: dist/vue-router.common.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.5.1
2+
* vue-router v3.5.2
33
* (c) 2021 Evan You
44
* @license MIT
55
*/
@@ -1564,7 +1564,7 @@ function createMatcher (
15641564
createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);
15651565

15661566
// add aliases of parent
1567-
if (parent) {
1567+
if (parent && parent.alias.length) {
15681568
createRouteMap(
15691569
// $flow-disable-line route is defined if parent is
15701570
parent.alias.map(function (alias) { return ({ path: alias, children: [route] }); }),
@@ -2635,7 +2635,13 @@ var HTML5History = /*@__PURE__*/(function (History) {
26352635

26362636
function getLocation (base) {
26372637
var path = window.location.pathname;
2638-
if (base && path.toLowerCase().indexOf(base.toLowerCase()) === 0) {
2638+
var pathLowerCase = path.toLowerCase();
2639+
var baseLowerCase = base.toLowerCase();
2640+
// base="/a" shouldn't turn path="/app" into "/a/pp"
2641+
// https://github.com/vuejs/vue-router/issues/3555
2642+
// so we ensure the trailing slash in the base
2643+
if (base && ((pathLowerCase === baseLowerCase) ||
2644+
(pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {
26392645
path = path.slice(base.length);
26402646
}
26412647
return (path || '/') + window.location.search + window.location.hash
@@ -3128,7 +3134,7 @@ function createHref (base, fullPath, mode) {
31283134
}
31293135

31303136
VueRouter.install = install;
3131-
VueRouter.version = '3.5.1';
3137+
VueRouter.version = '3.5.2';
31323138
VueRouter.isNavigationFailure = isNavigationFailure;
31333139
VueRouter.NavigationFailureType = NavigationFailureType;
31343140
VueRouter.START_LOCATION = START;

Diff for: dist/vue-router.esm.browser.js

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.5.1
2+
* vue-router v3.5.2
33
* (c) 2021 Evan You
44
* @license MIT
55
*/
@@ -12,7 +12,7 @@ function assert (condition, message) {
1212
}
1313

1414
function warn (condition, message) {
15-
if ( !condition) {
15+
if (!condition) {
1616
typeof console !== 'undefined' && console.warn(`[vue-router] ${message}`);
1717
}
1818
}
@@ -59,7 +59,7 @@ function resolveQuery (
5959
try {
6060
parsedQuery = parse(query || '');
6161
} catch (e) {
62-
warn(false, e.message);
62+
warn(false, e.message);
6363
parsedQuery = {};
6464
}
6565
for (const key in extraQuery) {
@@ -1146,7 +1146,7 @@ var Link = {
11461146
});
11471147

11481148
if (scopedSlot) {
1149-
if ( !this.custom) {
1149+
if (!this.custom) {
11501150
!warnedCustomSlot && warn(false, 'In Vue Router 4, the v-slot API will by default wrap its content with an <a> element. Use the custom prop to remove this warning:\n<router-link v-slot="{ navigate, href }" custom></router-link>\n');
11511151
warnedCustomSlot = true;
11521152
}
@@ -1458,7 +1458,7 @@ function addRouteRecord (
14581458
const aliases = Array.isArray(route.alias) ? route.alias : [route.alias];
14591459
for (let i = 0; i < aliases.length; ++i) {
14601460
const alias = aliases[i];
1461-
if ( alias === path) {
1461+
if (alias === path) {
14621462
warn(
14631463
false,
14641464
`Found an alias with the same value as the path: "${path}". You have to remove that alias. It will be ignored in development.`
@@ -1485,7 +1485,7 @@ function addRouteRecord (
14851485
if (name) {
14861486
if (!nameMap[name]) {
14871487
nameMap[name] = record;
1488-
} else if ( !matchAs) {
1488+
} else if (!matchAs) {
14891489
warn(
14901490
false,
14911491
`Duplicate named routes definition: ` +
@@ -1544,7 +1544,7 @@ function createMatcher (
15441544
createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);
15451545

15461546
// add aliases of parent
1547-
if (parent) {
1547+
if (parent && parent.alias.length) {
15481548
createRouteMap(
15491549
// $flow-disable-line route is defined if parent is
15501550
parent.alias.map(alias => ({ path: alias, children: [route] })),
@@ -2113,7 +2113,7 @@ function resolveAsyncComponents (matched) {
21132113

21142114
const reject = once(reason => {
21152115
const msg = `Failed to resolve async component ${key}: ${reason}`;
2116-
warn(false, msg);
2116+
warn(false, msg);
21172117
if (!error) {
21182118
error = isError(reason)
21192119
? reason
@@ -2616,7 +2616,13 @@ class HTML5History extends History {
26162616

26172617
function getLocation (base) {
26182618
let path = window.location.pathname;
2619-
if (base && path.toLowerCase().indexOf(base.toLowerCase()) === 0) {
2619+
const pathLowerCase = path.toLowerCase();
2620+
const baseLowerCase = base.toLowerCase();
2621+
// base="/a" shouldn't turn path="/app" into "/a/pp"
2622+
// https://github.com/vuejs/vue-router/issues/3555
2623+
// so we ensure the trailing slash in the base
2624+
if (base && ((pathLowerCase === baseLowerCase) ||
2625+
(pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {
26202626
path = path.slice(base.length);
26212627
}
26222628
return (path || '/') + window.location.search + window.location.hash
@@ -2905,8 +2911,7 @@ class VueRouter {
29052911
}
29062912

29072913
init (app /* Vue component instance */) {
2908-
2909-
assert(
2914+
assert(
29102915
install.installed,
29112916
`not installed. Make sure to call \`Vue.use(VueRouter)\` ` +
29122917
`before creating root instance.`
@@ -3095,7 +3100,7 @@ function createHref (base, fullPath, mode) {
30953100
}
30963101

30973102
VueRouter.install = install;
3098-
VueRouter.version = '3.5.1';
3103+
VueRouter.version = '3.5.2';
30993104
VueRouter.isNavigationFailure = isNavigationFailure;
31003105
VueRouter.NavigationFailureType = NavigationFailureType;
31013106
VueRouter.START_LOCATION = START;

Diff for: dist/vue-router.esm.browser.min.js

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

Diff for: dist/vue-router.esm.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.5.1
2+
* vue-router v3.5.2
33
* (c) 2021 Evan You
44
* @license MIT
55
*/
@@ -1562,7 +1562,7 @@ function createMatcher (
15621562
createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);
15631563

15641564
// add aliases of parent
1565-
if (parent) {
1565+
if (parent && parent.alias.length) {
15661566
createRouteMap(
15671567
// $flow-disable-line route is defined if parent is
15681568
parent.alias.map(function (alias) { return ({ path: alias, children: [route] }); }),
@@ -2633,7 +2633,13 @@ var HTML5History = /*@__PURE__*/(function (History) {
26332633

26342634
function getLocation (base) {
26352635
var path = window.location.pathname;
2636-
if (base && path.toLowerCase().indexOf(base.toLowerCase()) === 0) {
2636+
var pathLowerCase = path.toLowerCase();
2637+
var baseLowerCase = base.toLowerCase();
2638+
// base="/a" shouldn't turn path="/app" into "/a/pp"
2639+
// https://github.com/vuejs/vue-router/issues/3555
2640+
// so we ensure the trailing slash in the base
2641+
if (base && ((pathLowerCase === baseLowerCase) ||
2642+
(pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {
26372643
path = path.slice(base.length);
26382644
}
26392645
return (path || '/') + window.location.search + window.location.hash
@@ -3126,7 +3132,7 @@ function createHref (base, fullPath, mode) {
31263132
}
31273133

31283134
VueRouter.install = install;
3129-
VueRouter.version = '3.5.1';
3135+
VueRouter.version = '3.5.2';
31303136
VueRouter.isNavigationFailure = isNavigationFailure;
31313137
VueRouter.NavigationFailureType = NavigationFailureType;
31323138
VueRouter.START_LOCATION = START;

Diff for: dist/vue-router.js

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.5.1
2+
* vue-router v3.5.2
33
* (c) 2021 Evan You
44
* @license MIT
55
*/
@@ -18,7 +18,7 @@
1818
}
1919

2020
function warn (condition, message) {
21-
if ( !condition) {
21+
if (!condition) {
2222
typeof console !== 'undefined' && console.warn(("[vue-router] " + message));
2323
}
2424
}
@@ -66,7 +66,7 @@
6666
try {
6767
parsedQuery = parse(query || '');
6868
} catch (e) {
69-
warn(false, e.message);
69+
warn(false, e.message);
7070
parsedQuery = {};
7171
}
7272
for (var key in extraQuery) {
@@ -1170,7 +1170,7 @@
11701170
});
11711171

11721172
if (scopedSlot) {
1173-
if ( !this.custom) {
1173+
if (!this.custom) {
11741174
!warnedCustomSlot && warn(false, 'In Vue Router 4, the v-slot API will by default wrap its content with an <a> element. Use the custom prop to remove this warning:\n<router-link v-slot="{ navigate, href }" custom></router-link>\n');
11751175
warnedCustomSlot = true;
11761176
}
@@ -1479,7 +1479,7 @@
14791479
var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];
14801480
for (var i = 0; i < aliases.length; ++i) {
14811481
var alias = aliases[i];
1482-
if ( alias === path) {
1482+
if (alias === path) {
14831483
warn(
14841484
false,
14851485
("Found an alias with the same value as the path: \"" + path + "\". You have to remove that alias. It will be ignored in development.")
@@ -1506,7 +1506,7 @@
15061506
if (name) {
15071507
if (!nameMap[name]) {
15081508
nameMap[name] = record;
1509-
} else if ( !matchAs) {
1509+
} else if (!matchAs) {
15101510
warn(
15111511
false,
15121512
"Duplicate named routes definition: " +
@@ -1568,7 +1568,7 @@
15681568
createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);
15691569

15701570
// add aliases of parent
1571-
if (parent) {
1571+
if (parent && parent.alias.length) {
15721572
createRouteMap(
15731573
// $flow-disable-line route is defined if parent is
15741574
parent.alias.map(function (alias) { return ({ path: alias, children: [route] }); }),
@@ -2136,7 +2136,7 @@
21362136

21372137
var reject = once(function (reason) {
21382138
var msg = "Failed to resolve async component " + key + ": " + reason;
2139-
warn(false, msg);
2139+
warn(false, msg);
21402140
if (!error) {
21412141
error = isError(reason)
21422142
? reason
@@ -2639,7 +2639,13 @@
26392639

26402640
function getLocation (base) {
26412641
var path = window.location.pathname;
2642-
if (base && path.toLowerCase().indexOf(base.toLowerCase()) === 0) {
2642+
var pathLowerCase = path.toLowerCase();
2643+
var baseLowerCase = base.toLowerCase();
2644+
// base="/a" shouldn't turn path="/app" into "/a/pp"
2645+
// https://github.com/vuejs/vue-router/issues/3555
2646+
// so we ensure the trailing slash in the base
2647+
if (base && ((pathLowerCase === baseLowerCase) ||
2648+
(pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {
26432649
path = path.slice(base.length);
26442650
}
26452651
return (path || '/') + window.location.search + window.location.hash
@@ -2937,8 +2943,7 @@
29372943
VueRouter.prototype.init = function init (app /* Vue component instance */) {
29382944
var this$1 = this;
29392945

2940-
2941-
assert(
2946+
assert(
29422947
install.installed,
29432948
"not installed. Make sure to call `Vue.use(VueRouter)` " +
29442949
"before creating root instance."
@@ -3132,7 +3137,7 @@
31323137
}
31333138

31343139
VueRouter.install = install;
3135-
VueRouter.version = '3.5.1';
3140+
VueRouter.version = '3.5.2';
31363141
VueRouter.isNavigationFailure = isNavigationFailure;
31373142
VueRouter.NavigationFailureType = NavigationFailureType;
31383143
VueRouter.START_LOCATION = START;

Diff for: dist/vue-router.min.js

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

0 commit comments

Comments
 (0)