Skip to content

Commit 6bc552b

Browse files
committed
build: bundle 3.4.4
1 parent 893d86b commit 6bc552b

6 files changed

+72
-40
lines changed

dist/vue-router.common.js

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.4.3
2+
* vue-router v3.4.4
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -1908,6 +1908,7 @@ function runQueue (queue, fn, cb) {
19081908
step(0);
19091909
}
19101910

1911+
// When changing thing, also edit router.d.ts
19111912
var NavigationFailureType = {
19121913
redirected: 2,
19131914
aborted: 4,
@@ -2196,6 +2197,7 @@ History.prototype.confirmTransition = function confirmTransition (route, onCompl
21962197
var this$1 = this;
21972198

21982199
var current = this.current;
2200+
this.pending = route;
21992201
var abort = function (err) {
22002202
// changed after adding errors with
22012203
// https://github.com/vuejs/vue-router/pull/3047 before that change,
@@ -2245,7 +2247,6 @@ History.prototype.confirmTransition = function confirmTransition (route, onCompl
22452247
resolveAsyncComponents(activated)
22462248
);
22472249

2248-
this.pending = route;
22492250
var iterator = function (hook, next) {
22502251
if (this$1.pending !== route) {
22512252
return abort(createNavigationCancelledError(current, route))
@@ -2314,11 +2315,18 @@ History.prototype.setupListeners = function setupListeners () {
23142315
// Default implementation is empty
23152316
};
23162317

2317-
History.prototype.teardownListeners = function teardownListeners () {
2318+
History.prototype.teardown = function teardown () {
2319+
// clean up event listeners
2320+
// https://github.com/vuejs/vue-router/issues/2341
23182321
this.listeners.forEach(function (cleanupListener) {
23192322
cleanupListener();
23202323
});
23212324
this.listeners = [];
2325+
2326+
// reset current history route
2327+
// https://github.com/vuejs/vue-router/issues/3294
2328+
this.current = START;
2329+
this.pending = null;
23222330
};
23232331

23242332
function normalizeBase (base) {
@@ -2782,8 +2790,12 @@ var AbstractHistory = /*@__PURE__*/(function (History) {
27822790
this.confirmTransition(
27832791
route,
27842792
function () {
2793+
var prev = this$1.current;
27852794
this$1.index = targetIndex;
27862795
this$1.updateRoute(route);
2796+
this$1.router.afterHooks.forEach(function (hook) {
2797+
hook && hook(route, prev);
2798+
});
27872799
},
27882800
function (err) {
27892801
if (isNavigationFailure(err, NavigationFailureType.duplicated)) {
@@ -2878,11 +2890,7 @@ VueRouter.prototype.init = function init (app /* Vue component instance */) {
28782890
// we do not release the router so it can be reused
28792891
if (this$1.app === app) { this$1.app = this$1.apps[0] || null; }
28802892

2881-
if (!this$1.app) {
2882-
// clean up event listeners
2883-
// https://github.com/vuejs/vue-router/issues/2341
2884-
this$1.history.teardownListeners();
2885-
}
2893+
if (!this$1.app) { this$1.history.teardown(); }
28862894
});
28872895

28882896
// main app previously initialized
@@ -3044,7 +3052,7 @@ function createHref (base, fullPath, mode) {
30443052
}
30453053

30463054
VueRouter.install = install;
3047-
VueRouter.version = '3.4.3';
3055+
VueRouter.version = '3.4.4';
30483056
VueRouter.isNavigationFailure = isNavigationFailure;
30493057
VueRouter.NavigationFailureType = NavigationFailureType;
30503058

dist/vue-router.esm.browser.js

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.4.3
2+
* vue-router v3.4.4
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -1885,6 +1885,7 @@ function runQueue (queue, fn, cb) {
18851885
step(0);
18861886
}
18871887

1888+
// When changing thing, also edit router.d.ts
18881889
const NavigationFailureType = {
18891890
redirected: 2,
18901891
aborted: 4,
@@ -2191,6 +2192,7 @@ class History {
21912192

21922193
confirmTransition (route, onComplete, onAbort) {
21932194
const current = this.current;
2195+
this.pending = route;
21942196
const abort = err => {
21952197
// changed after adding errors with
21962198
// https://github.com/vuejs/vue-router/pull/3047 before that change,
@@ -2237,7 +2239,6 @@ class History {
22372239
resolveAsyncComponents(activated)
22382240
);
22392241

2240-
this.pending = route;
22412242
const iterator = (hook, next) => {
22422243
if (this.pending !== route) {
22432244
return abort(createNavigationCancelledError(current, route))
@@ -2306,11 +2307,18 @@ class History {
23062307
// Default implementation is empty
23072308
}
23082309

2309-
teardownListeners () {
2310+
teardown () {
2311+
// clean up event listeners
2312+
// https://github.com/vuejs/vue-router/issues/2341
23102313
this.listeners.forEach(cleanupListener => {
23112314
cleanupListener();
23122315
});
23132316
this.listeners = [];
2317+
2318+
// reset current history route
2319+
// https://github.com/vuejs/vue-router/issues/3294
2320+
this.current = START;
2321+
this.pending = null;
23142322
}
23152323
}
23162324

@@ -2742,8 +2750,12 @@ class AbstractHistory extends History {
27422750
this.confirmTransition(
27432751
route,
27442752
() => {
2753+
const prev = this.current;
27452754
this.index = targetIndex;
27462755
this.updateRoute(route);
2756+
this.router.afterHooks.forEach(hook => {
2757+
hook && hook(route, prev);
2758+
});
27472759
},
27482760
err => {
27492761
if (isNavigationFailure(err, NavigationFailureType.duplicated)) {
@@ -2849,11 +2861,7 @@ class VueRouter {
28492861
// we do not release the router so it can be reused
28502862
if (this.app === app) this.app = this.apps[0] || null;
28512863

2852-
if (!this.app) {
2853-
// clean up event listeners
2854-
// https://github.com/vuejs/vue-router/issues/2341
2855-
this.history.teardownListeners();
2856-
}
2864+
if (!this.app) this.history.teardown();
28572865
});
28582866

28592867
// main app previously initialized
@@ -3010,7 +3018,7 @@ function createHref (base, fullPath, mode) {
30103018
}
30113019

30123020
VueRouter.install = install;
3013-
VueRouter.version = '3.4.3';
3021+
VueRouter.version = '3.4.4';
30143022
VueRouter.isNavigationFailure = isNavigationFailure;
30153023
VueRouter.NavigationFailureType = NavigationFailureType;
30163024

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

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

dist/vue-router.esm.js

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.4.3
2+
* vue-router v3.4.4
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -1906,6 +1906,7 @@ function runQueue (queue, fn, cb) {
19061906
step(0);
19071907
}
19081908

1909+
// When changing thing, also edit router.d.ts
19091910
var NavigationFailureType = {
19101911
redirected: 2,
19111912
aborted: 4,
@@ -2194,6 +2195,7 @@ History.prototype.confirmTransition = function confirmTransition (route, onCompl
21942195
var this$1 = this;
21952196

21962197
var current = this.current;
2198+
this.pending = route;
21972199
var abort = function (err) {
21982200
// changed after adding errors with
21992201
// https://github.com/vuejs/vue-router/pull/3047 before that change,
@@ -2243,7 +2245,6 @@ History.prototype.confirmTransition = function confirmTransition (route, onCompl
22432245
resolveAsyncComponents(activated)
22442246
);
22452247

2246-
this.pending = route;
22472248
var iterator = function (hook, next) {
22482249
if (this$1.pending !== route) {
22492250
return abort(createNavigationCancelledError(current, route))
@@ -2312,11 +2313,18 @@ History.prototype.setupListeners = function setupListeners () {
23122313
// Default implementation is empty
23132314
};
23142315

2315-
History.prototype.teardownListeners = function teardownListeners () {
2316+
History.prototype.teardown = function teardown () {
2317+
// clean up event listeners
2318+
// https://github.com/vuejs/vue-router/issues/2341
23162319
this.listeners.forEach(function (cleanupListener) {
23172320
cleanupListener();
23182321
});
23192322
this.listeners = [];
2323+
2324+
// reset current history route
2325+
// https://github.com/vuejs/vue-router/issues/3294
2326+
this.current = START;
2327+
this.pending = null;
23202328
};
23212329

23222330
function normalizeBase (base) {
@@ -2780,8 +2788,12 @@ var AbstractHistory = /*@__PURE__*/(function (History) {
27802788
this.confirmTransition(
27812789
route,
27822790
function () {
2791+
var prev = this$1.current;
27832792
this$1.index = targetIndex;
27842793
this$1.updateRoute(route);
2794+
this$1.router.afterHooks.forEach(function (hook) {
2795+
hook && hook(route, prev);
2796+
});
27852797
},
27862798
function (err) {
27872799
if (isNavigationFailure(err, NavigationFailureType.duplicated)) {
@@ -2876,11 +2888,7 @@ VueRouter.prototype.init = function init (app /* Vue component instance */) {
28762888
// we do not release the router so it can be reused
28772889
if (this$1.app === app) { this$1.app = this$1.apps[0] || null; }
28782890

2879-
if (!this$1.app) {
2880-
// clean up event listeners
2881-
// https://github.com/vuejs/vue-router/issues/2341
2882-
this$1.history.teardownListeners();
2883-
}
2891+
if (!this$1.app) { this$1.history.teardown(); }
28842892
});
28852893

28862894
// main app previously initialized
@@ -3042,7 +3050,7 @@ function createHref (base, fullPath, mode) {
30423050
}
30433051

30443052
VueRouter.install = install;
3045-
VueRouter.version = '3.4.3';
3053+
VueRouter.version = '3.4.4';
30463054
VueRouter.isNavigationFailure = isNavigationFailure;
30473055
VueRouter.NavigationFailureType = NavigationFailureType;
30483056

dist/vue-router.js

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.4.3
2+
* vue-router v3.4.4
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -1912,6 +1912,7 @@
19121912
step(0);
19131913
}
19141914

1915+
// When changing thing, also edit router.d.ts
19151916
var NavigationFailureType = {
19161917
redirected: 2,
19171918
aborted: 4,
@@ -2200,6 +2201,7 @@
22002201
var this$1 = this;
22012202

22022203
var current = this.current;
2204+
this.pending = route;
22032205
var abort = function (err) {
22042206
// changed after adding errors with
22052207
// https://github.com/vuejs/vue-router/pull/3047 before that change,
@@ -2249,7 +2251,6 @@
22492251
resolveAsyncComponents(activated)
22502252
);
22512253

2252-
this.pending = route;
22532254
var iterator = function (hook, next) {
22542255
if (this$1.pending !== route) {
22552256
return abort(createNavigationCancelledError(current, route))
@@ -2318,11 +2319,18 @@
23182319
// Default implementation is empty
23192320
};
23202321

2321-
History.prototype.teardownListeners = function teardownListeners () {
2322+
History.prototype.teardown = function teardown () {
2323+
// clean up event listeners
2324+
// https://github.com/vuejs/vue-router/issues/2341
23222325
this.listeners.forEach(function (cleanupListener) {
23232326
cleanupListener();
23242327
});
23252328
this.listeners = [];
2329+
2330+
// reset current history route
2331+
// https://github.com/vuejs/vue-router/issues/3294
2332+
this.current = START;
2333+
this.pending = null;
23262334
};
23272335

23282336
function normalizeBase (base) {
@@ -2786,8 +2794,12 @@
27862794
this.confirmTransition(
27872795
route,
27882796
function () {
2797+
var prev = this$1.current;
27892798
this$1.index = targetIndex;
27902799
this$1.updateRoute(route);
2800+
this$1.router.afterHooks.forEach(function (hook) {
2801+
hook && hook(route, prev);
2802+
});
27912803
},
27922804
function (err) {
27932805
if (isNavigationFailure(err, NavigationFailureType.duplicated)) {
@@ -2882,11 +2894,7 @@
28822894
// we do not release the router so it can be reused
28832895
if (this$1.app === app) { this$1.app = this$1.apps[0] || null; }
28842896

2885-
if (!this$1.app) {
2886-
// clean up event listeners
2887-
// https://github.com/vuejs/vue-router/issues/2341
2888-
this$1.history.teardownListeners();
2889-
}
2897+
if (!this$1.app) { this$1.history.teardown(); }
28902898
});
28912899

28922900
// main app previously initialized
@@ -3048,7 +3056,7 @@
30483056
}
30493057

30503058
VueRouter.install = install;
3051-
VueRouter.version = '3.4.3';
3059+
VueRouter.version = '3.4.4';
30523060
VueRouter.isNavigationFailure = isNavigationFailure;
30533061
VueRouter.NavigationFailureType = NavigationFailureType;
30543062

dist/vue-router.min.js

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

0 commit comments

Comments
 (0)