node_modules updated, buefy add to lib folder
This commit is contained in:
+19
-2
@@ -1,6 +1,6 @@
|
||||
# vue-router [](https://circleci.com/gh/vuejs/vue-router)
|
||||
|
||||
> This is vue-router 2.0 which works only with Vue 2.0. For the 1.x router see the [1.0 branch](https://github.com/vuejs/vue-router/tree/1.0).
|
||||
> This is vue-router 3.0 which works only with Vue 2.0. For the 1.x router see the [1.0 branch](https://github.com/vuejs/vue-router/tree/1.0).
|
||||
|
||||
### Introduction
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
- HTML5 history mode or hash mode, with auto-fallback in IE9
|
||||
- Customizable Scroll Behavior
|
||||
|
||||
Get started with the [documentation](http://vuejs.github.io/vue-router), or play with the [examples](https://github.com/vuejs/vue-router/tree/dev/examples) (see how to run them below).
|
||||
Get started with the [documentation](http://router.vuejs.org), or play with the [examples](https://github.com/vuejs/vue-router/tree/dev/examples) (see how to run them below).
|
||||
|
||||
### Development Setup
|
||||
|
||||
@@ -36,6 +36,17 @@ npm test
|
||||
npm run docs
|
||||
```
|
||||
|
||||
## Releasing
|
||||
|
||||
- `yarn run release`
|
||||
- Ensure tests are passing `yarn run test`
|
||||
- Build dist files `VERSION=<the_version> yarn run build`
|
||||
- Build changelog `yarn run changelod`
|
||||
- Commit dist files `git add dist CHANGELOG.md && git commit -m "[build $VERSION]"`
|
||||
- Publish a new version `npm version $VERSION --message "[release] $VERSION"
|
||||
- Push tags `git push origin refs/tags/v$VERSION && git push`
|
||||
- Publish to npm `npm publish`
|
||||
|
||||
## Questions
|
||||
|
||||
For questions and support please use the [Discord chat server](https://chat.vuejs.org) or [the official forum](http://forum.vuejs.org). The issue list of this repo is **exclusively** for bug reports and feature requests.
|
||||
@@ -62,4 +73,10 @@ Details changes for each release are documented in the [release notes](https://g
|
||||
|
||||
Copyright (c) 2013-present Evan You
|
||||
|
||||
## Special Thanks
|
||||
|
||||
<a href="https://www.browserstack.com">
|
||||
<img src="/assets/browserstack-logo-600x315.png" height="80" title="BrowserStack Logo" alt="BrowserStack Logo" />
|
||||
</a>
|
||||
|
||||
Special thanks to [BrowserStack](https://www.browserstack.com) for letting the maintainers use their service to debug browser specific issues.
|
||||
|
||||
+69
-16
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* vue-router v3.0.2
|
||||
* (c) 2018 Evan You
|
||||
* vue-router v3.0.6
|
||||
* (c) 2019 Evan You
|
||||
* @license MIT
|
||||
*/
|
||||
'use strict';
|
||||
@@ -60,11 +60,14 @@ var View = {
|
||||
var depth = 0;
|
||||
var inactive = false;
|
||||
while (parent && parent._routerRoot !== parent) {
|
||||
if (parent.$vnode && parent.$vnode.data.routerView) {
|
||||
depth++;
|
||||
}
|
||||
if (parent._inactive) {
|
||||
inactive = true;
|
||||
var vnodeData = parent.$vnode && parent.$vnode.data;
|
||||
if (vnodeData) {
|
||||
if (vnodeData.routerView) {
|
||||
depth++;
|
||||
}
|
||||
if (vnodeData.keepAlive && parent._inactive) {
|
||||
inactive = true;
|
||||
}
|
||||
}
|
||||
parent = parent.$parent;
|
||||
}
|
||||
@@ -103,6 +106,17 @@ var View = {
|
||||
matched.instances[name] = vnode.componentInstance;
|
||||
};
|
||||
|
||||
// register instance in init hook
|
||||
// in case kept-alive component be actived when routes changed
|
||||
data.hook.init = function (vnode) {
|
||||
if (vnode.data.keepAlive &&
|
||||
vnode.componentInstance &&
|
||||
vnode.componentInstance !== matched.instances[name]
|
||||
) {
|
||||
matched.instances[name] = vnode.componentInstance;
|
||||
}
|
||||
};
|
||||
|
||||
// resolve props
|
||||
var propsToPass = data.props = resolveProps(route, matched.props && matched.props[name]);
|
||||
if (propsToPass) {
|
||||
@@ -1084,16 +1098,24 @@ function fillParams (
|
||||
params,
|
||||
routeMsg
|
||||
) {
|
||||
params = params || {};
|
||||
try {
|
||||
var filler =
|
||||
regexpCompileCache[path] ||
|
||||
(regexpCompileCache[path] = pathToRegexp_1.compile(path));
|
||||
return filler(params || {}, { pretty: true })
|
||||
|
||||
// Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}
|
||||
if (params.pathMatch) { params[0] = params.pathMatch; }
|
||||
|
||||
return filler(params, { pretty: true })
|
||||
} catch (e) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
warn(false, ("missing param for " + routeMsg + ": " + (e.message)));
|
||||
}
|
||||
return ''
|
||||
} finally {
|
||||
// delete the 0 if it was added
|
||||
delete params[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1272,8 +1294,10 @@ function normalizeLocation (
|
||||
) {
|
||||
var next = typeof raw === 'string' ? { path: raw } : raw;
|
||||
// named target
|
||||
if (next.name || next._normalized) {
|
||||
if (next._normalized) {
|
||||
return next
|
||||
} else if (next.name) {
|
||||
return extend({}, raw)
|
||||
}
|
||||
|
||||
// relative params
|
||||
@@ -2130,7 +2154,7 @@ function poll (
|
||||
|
||||
/* */
|
||||
|
||||
var HTML5History = (function (History$$1) {
|
||||
var HTML5History = /*@__PURE__*/(function (History$$1) {
|
||||
function HTML5History (router, base) {
|
||||
var this$1 = this;
|
||||
|
||||
@@ -2218,7 +2242,7 @@ function getLocation (base) {
|
||||
|
||||
/* */
|
||||
|
||||
var HashHistory = (function (History$$1) {
|
||||
var HashHistory = /*@__PURE__*/(function (History$$1) {
|
||||
function HashHistory (router, base, fallback) {
|
||||
History$$1.call(this, router, base);
|
||||
// check history fallback deeplinking
|
||||
@@ -2327,7 +2351,23 @@ function getHash () {
|
||||
// consistent across browsers - Firefox will pre-decode it!
|
||||
var href = window.location.href;
|
||||
var index = href.indexOf('#');
|
||||
return index === -1 ? '' : decodeURI(href.slice(index + 1))
|
||||
// empty path
|
||||
if (index < 0) { return '' }
|
||||
|
||||
href = href.slice(index + 1);
|
||||
// decode the hash but not the search or hash
|
||||
// as search(query) is already decoded
|
||||
// https://github.com/vuejs/vue-router/issues/2708
|
||||
var searchIndex = href.indexOf('?');
|
||||
if (searchIndex < 0) {
|
||||
var hashIndex = href.indexOf('#');
|
||||
if (hashIndex > -1) { 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); }
|
||||
}
|
||||
|
||||
return href
|
||||
}
|
||||
|
||||
function getUrl (path) {
|
||||
@@ -2355,7 +2395,7 @@ function replaceHash (path) {
|
||||
|
||||
/* */
|
||||
|
||||
var AbstractHistory = (function (History$$1) {
|
||||
var AbstractHistory = /*@__PURE__*/(function (History$$1) {
|
||||
function AbstractHistory (router, base) {
|
||||
History$$1.call(this, router, base);
|
||||
this.stack = [];
|
||||
@@ -2478,7 +2518,19 @@ VueRouter.prototype.init = function init (app /* Vue component instance */) {
|
||||
|
||||
this.apps.push(app);
|
||||
|
||||
// main app already initialized.
|
||||
// set up app destroyed handler
|
||||
// https://github.com/vuejs/vue-router/issues/2639
|
||||
app.$once('hook:destroyed', function () {
|
||||
// clean out app from this.apps array once destroyed
|
||||
var index = this$1.apps.indexOf(app);
|
||||
if (index > -1) { this$1.apps.splice(index, 1); }
|
||||
// ensure we still have a main app or null if no apps
|
||||
// we do not release the router so it can be reused
|
||||
if (this$1.app === app) { this$1.app = this$1.apps[0] || null; }
|
||||
});
|
||||
|
||||
// main app previously initialized
|
||||
// return as we don't need to set up new history listener
|
||||
if (this.app) {
|
||||
return
|
||||
}
|
||||
@@ -2568,9 +2620,10 @@ VueRouter.prototype.resolve = function resolve (
|
||||
current,
|
||||
append
|
||||
) {
|
||||
current = current || this.history.current;
|
||||
var location = normalizeLocation(
|
||||
to,
|
||||
current || this.history.current,
|
||||
current,
|
||||
append,
|
||||
this
|
||||
);
|
||||
@@ -2611,7 +2664,7 @@ function createHref (base, fullPath, mode) {
|
||||
}
|
||||
|
||||
VueRouter.install = install;
|
||||
VueRouter.version = '3.0.2';
|
||||
VueRouter.version = '3.0.6';
|
||||
|
||||
if (inBrowser && window.Vue) {
|
||||
window.Vue.use(VueRouter);
|
||||
|
||||
+69
-16
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* vue-router v3.0.2
|
||||
* (c) 2018 Evan You
|
||||
* vue-router v3.0.6
|
||||
* (c) 2019 Evan You
|
||||
* @license MIT
|
||||
*/
|
||||
/* */
|
||||
@@ -58,11 +58,14 @@ var View = {
|
||||
var depth = 0;
|
||||
var inactive = false;
|
||||
while (parent && parent._routerRoot !== parent) {
|
||||
if (parent.$vnode && parent.$vnode.data.routerView) {
|
||||
depth++;
|
||||
}
|
||||
if (parent._inactive) {
|
||||
inactive = true;
|
||||
var vnodeData = parent.$vnode && parent.$vnode.data;
|
||||
if (vnodeData) {
|
||||
if (vnodeData.routerView) {
|
||||
depth++;
|
||||
}
|
||||
if (vnodeData.keepAlive && parent._inactive) {
|
||||
inactive = true;
|
||||
}
|
||||
}
|
||||
parent = parent.$parent;
|
||||
}
|
||||
@@ -101,6 +104,17 @@ var View = {
|
||||
matched.instances[name] = vnode.componentInstance;
|
||||
};
|
||||
|
||||
// register instance in init hook
|
||||
// in case kept-alive component be actived when routes changed
|
||||
data.hook.init = function (vnode) {
|
||||
if (vnode.data.keepAlive &&
|
||||
vnode.componentInstance &&
|
||||
vnode.componentInstance !== matched.instances[name]
|
||||
) {
|
||||
matched.instances[name] = vnode.componentInstance;
|
||||
}
|
||||
};
|
||||
|
||||
// resolve props
|
||||
var propsToPass = data.props = resolveProps(route, matched.props && matched.props[name]);
|
||||
if (propsToPass) {
|
||||
@@ -1082,16 +1096,24 @@ function fillParams (
|
||||
params,
|
||||
routeMsg
|
||||
) {
|
||||
params = params || {};
|
||||
try {
|
||||
var filler =
|
||||
regexpCompileCache[path] ||
|
||||
(regexpCompileCache[path] = pathToRegexp_1.compile(path));
|
||||
return filler(params || {}, { pretty: true })
|
||||
|
||||
// Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}
|
||||
if (params.pathMatch) { params[0] = params.pathMatch; }
|
||||
|
||||
return filler(params, { pretty: true })
|
||||
} catch (e) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
warn(false, ("missing param for " + routeMsg + ": " + (e.message)));
|
||||
}
|
||||
return ''
|
||||
} finally {
|
||||
// delete the 0 if it was added
|
||||
delete params[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1270,8 +1292,10 @@ function normalizeLocation (
|
||||
) {
|
||||
var next = typeof raw === 'string' ? { path: raw } : raw;
|
||||
// named target
|
||||
if (next.name || next._normalized) {
|
||||
if (next._normalized) {
|
||||
return next
|
||||
} else if (next.name) {
|
||||
return extend({}, raw)
|
||||
}
|
||||
|
||||
// relative params
|
||||
@@ -2128,7 +2152,7 @@ function poll (
|
||||
|
||||
/* */
|
||||
|
||||
var HTML5History = (function (History$$1) {
|
||||
var HTML5History = /*@__PURE__*/(function (History$$1) {
|
||||
function HTML5History (router, base) {
|
||||
var this$1 = this;
|
||||
|
||||
@@ -2216,7 +2240,7 @@ function getLocation (base) {
|
||||
|
||||
/* */
|
||||
|
||||
var HashHistory = (function (History$$1) {
|
||||
var HashHistory = /*@__PURE__*/(function (History$$1) {
|
||||
function HashHistory (router, base, fallback) {
|
||||
History$$1.call(this, router, base);
|
||||
// check history fallback deeplinking
|
||||
@@ -2325,7 +2349,23 @@ function getHash () {
|
||||
// consistent across browsers - Firefox will pre-decode it!
|
||||
var href = window.location.href;
|
||||
var index = href.indexOf('#');
|
||||
return index === -1 ? '' : decodeURI(href.slice(index + 1))
|
||||
// empty path
|
||||
if (index < 0) { return '' }
|
||||
|
||||
href = href.slice(index + 1);
|
||||
// decode the hash but not the search or hash
|
||||
// as search(query) is already decoded
|
||||
// https://github.com/vuejs/vue-router/issues/2708
|
||||
var searchIndex = href.indexOf('?');
|
||||
if (searchIndex < 0) {
|
||||
var hashIndex = href.indexOf('#');
|
||||
if (hashIndex > -1) { 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); }
|
||||
}
|
||||
|
||||
return href
|
||||
}
|
||||
|
||||
function getUrl (path) {
|
||||
@@ -2353,7 +2393,7 @@ function replaceHash (path) {
|
||||
|
||||
/* */
|
||||
|
||||
var AbstractHistory = (function (History$$1) {
|
||||
var AbstractHistory = /*@__PURE__*/(function (History$$1) {
|
||||
function AbstractHistory (router, base) {
|
||||
History$$1.call(this, router, base);
|
||||
this.stack = [];
|
||||
@@ -2476,7 +2516,19 @@ VueRouter.prototype.init = function init (app /* Vue component instance */) {
|
||||
|
||||
this.apps.push(app);
|
||||
|
||||
// main app already initialized.
|
||||
// set up app destroyed handler
|
||||
// https://github.com/vuejs/vue-router/issues/2639
|
||||
app.$once('hook:destroyed', function () {
|
||||
// clean out app from this.apps array once destroyed
|
||||
var index = this$1.apps.indexOf(app);
|
||||
if (index > -1) { this$1.apps.splice(index, 1); }
|
||||
// ensure we still have a main app or null if no apps
|
||||
// we do not release the router so it can be reused
|
||||
if (this$1.app === app) { this$1.app = this$1.apps[0] || null; }
|
||||
});
|
||||
|
||||
// main app previously initialized
|
||||
// return as we don't need to set up new history listener
|
||||
if (this.app) {
|
||||
return
|
||||
}
|
||||
@@ -2566,9 +2618,10 @@ VueRouter.prototype.resolve = function resolve (
|
||||
current,
|
||||
append
|
||||
) {
|
||||
current = current || this.history.current;
|
||||
var location = normalizeLocation(
|
||||
to,
|
||||
current || this.history.current,
|
||||
current,
|
||||
append,
|
||||
this
|
||||
);
|
||||
@@ -2609,7 +2662,7 @@ function createHref (base, fullPath, mode) {
|
||||
}
|
||||
|
||||
VueRouter.install = install;
|
||||
VueRouter.version = '3.0.2';
|
||||
VueRouter.version = '3.0.6';
|
||||
|
||||
if (inBrowser && window.Vue) {
|
||||
window.Vue.use(VueRouter);
|
||||
|
||||
+69
-16
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* vue-router v3.0.2
|
||||
* (c) 2018 Evan You
|
||||
* vue-router v3.0.6
|
||||
* (c) 2019 Evan You
|
||||
* @license MIT
|
||||
*/
|
||||
(function (global, factory) {
|
||||
@@ -64,11 +64,14 @@ var View = {
|
||||
var depth = 0;
|
||||
var inactive = false;
|
||||
while (parent && parent._routerRoot !== parent) {
|
||||
if (parent.$vnode && parent.$vnode.data.routerView) {
|
||||
depth++;
|
||||
}
|
||||
if (parent._inactive) {
|
||||
inactive = true;
|
||||
var vnodeData = parent.$vnode && parent.$vnode.data;
|
||||
if (vnodeData) {
|
||||
if (vnodeData.routerView) {
|
||||
depth++;
|
||||
}
|
||||
if (vnodeData.keepAlive && parent._inactive) {
|
||||
inactive = true;
|
||||
}
|
||||
}
|
||||
parent = parent.$parent;
|
||||
}
|
||||
@@ -107,6 +110,17 @@ var View = {
|
||||
matched.instances[name] = vnode.componentInstance;
|
||||
};
|
||||
|
||||
// register instance in init hook
|
||||
// in case kept-alive component be actived when routes changed
|
||||
data.hook.init = function (vnode) {
|
||||
if (vnode.data.keepAlive &&
|
||||
vnode.componentInstance &&
|
||||
vnode.componentInstance !== matched.instances[name]
|
||||
) {
|
||||
matched.instances[name] = vnode.componentInstance;
|
||||
}
|
||||
};
|
||||
|
||||
// resolve props
|
||||
var propsToPass = data.props = resolveProps(route, matched.props && matched.props[name]);
|
||||
if (propsToPass) {
|
||||
@@ -1088,16 +1102,24 @@ function fillParams (
|
||||
params,
|
||||
routeMsg
|
||||
) {
|
||||
params = params || {};
|
||||
try {
|
||||
var filler =
|
||||
regexpCompileCache[path] ||
|
||||
(regexpCompileCache[path] = pathToRegexp_1.compile(path));
|
||||
return filler(params || {}, { pretty: true })
|
||||
|
||||
// Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}
|
||||
if (params.pathMatch) { params[0] = params.pathMatch; }
|
||||
|
||||
return filler(params, { pretty: true })
|
||||
} catch (e) {
|
||||
{
|
||||
warn(false, ("missing param for " + routeMsg + ": " + (e.message)));
|
||||
}
|
||||
return ''
|
||||
} finally {
|
||||
// delete the 0 if it was added
|
||||
delete params[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1276,8 +1298,10 @@ function normalizeLocation (
|
||||
) {
|
||||
var next = typeof raw === 'string' ? { path: raw } : raw;
|
||||
// named target
|
||||
if (next.name || next._normalized) {
|
||||
if (next._normalized) {
|
||||
return next
|
||||
} else if (next.name) {
|
||||
return extend({}, raw)
|
||||
}
|
||||
|
||||
// relative params
|
||||
@@ -2134,7 +2158,7 @@ function poll (
|
||||
|
||||
/* */
|
||||
|
||||
var HTML5History = (function (History$$1) {
|
||||
var HTML5History = /*@__PURE__*/(function (History$$1) {
|
||||
function HTML5History (router, base) {
|
||||
var this$1 = this;
|
||||
|
||||
@@ -2222,7 +2246,7 @@ function getLocation (base) {
|
||||
|
||||
/* */
|
||||
|
||||
var HashHistory = (function (History$$1) {
|
||||
var HashHistory = /*@__PURE__*/(function (History$$1) {
|
||||
function HashHistory (router, base, fallback) {
|
||||
History$$1.call(this, router, base);
|
||||
// check history fallback deeplinking
|
||||
@@ -2331,7 +2355,23 @@ function getHash () {
|
||||
// consistent across browsers - Firefox will pre-decode it!
|
||||
var href = window.location.href;
|
||||
var index = href.indexOf('#');
|
||||
return index === -1 ? '' : decodeURI(href.slice(index + 1))
|
||||
// empty path
|
||||
if (index < 0) { return '' }
|
||||
|
||||
href = href.slice(index + 1);
|
||||
// decode the hash but not the search or hash
|
||||
// as search(query) is already decoded
|
||||
// https://github.com/vuejs/vue-router/issues/2708
|
||||
var searchIndex = href.indexOf('?');
|
||||
if (searchIndex < 0) {
|
||||
var hashIndex = href.indexOf('#');
|
||||
if (hashIndex > -1) { 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); }
|
||||
}
|
||||
|
||||
return href
|
||||
}
|
||||
|
||||
function getUrl (path) {
|
||||
@@ -2359,7 +2399,7 @@ function replaceHash (path) {
|
||||
|
||||
/* */
|
||||
|
||||
var AbstractHistory = (function (History$$1) {
|
||||
var AbstractHistory = /*@__PURE__*/(function (History$$1) {
|
||||
function AbstractHistory (router, base) {
|
||||
History$$1.call(this, router, base);
|
||||
this.stack = [];
|
||||
@@ -2482,7 +2522,19 @@ VueRouter.prototype.init = function init (app /* Vue component instance */) {
|
||||
|
||||
this.apps.push(app);
|
||||
|
||||
// main app already initialized.
|
||||
// set up app destroyed handler
|
||||
// https://github.com/vuejs/vue-router/issues/2639
|
||||
app.$once('hook:destroyed', function () {
|
||||
// clean out app from this.apps array once destroyed
|
||||
var index = this$1.apps.indexOf(app);
|
||||
if (index > -1) { this$1.apps.splice(index, 1); }
|
||||
// ensure we still have a main app or null if no apps
|
||||
// we do not release the router so it can be reused
|
||||
if (this$1.app === app) { this$1.app = this$1.apps[0] || null; }
|
||||
});
|
||||
|
||||
// main app previously initialized
|
||||
// return as we don't need to set up new history listener
|
||||
if (this.app) {
|
||||
return
|
||||
}
|
||||
@@ -2572,9 +2624,10 @@ VueRouter.prototype.resolve = function resolve (
|
||||
current,
|
||||
append
|
||||
) {
|
||||
current = current || this.history.current;
|
||||
var location = normalizeLocation(
|
||||
to,
|
||||
current || this.history.current,
|
||||
current,
|
||||
append,
|
||||
this
|
||||
);
|
||||
@@ -2615,7 +2668,7 @@ function createHref (base, fullPath, mode) {
|
||||
}
|
||||
|
||||
VueRouter.install = install;
|
||||
VueRouter.version = '3.0.2';
|
||||
VueRouter.version = '3.0.6';
|
||||
|
||||
if (inBrowser && window.Vue) {
|
||||
window.Vue.use(VueRouter);
|
||||
|
||||
+3
-3
File diff suppressed because one or more lines are too long
+32
-18
@@ -1,28 +1,28 @@
|
||||
{
|
||||
"_from": "vue-router",
|
||||
"_id": "vue-router@3.0.2",
|
||||
"_from": "vue-router@3.0.6",
|
||||
"_id": "vue-router@3.0.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-opKtsxjp9eOcFWdp6xLQPLmRGgfM932Tl56U9chYTnoWqKxQ8M20N7AkdEbM5beUh6wICoFGYugAX9vQjyJLFg==",
|
||||
"_integrity": "sha512-Ox0ciFLswtSGRTHYhGvx2L44sVbTPNS+uD2kRISuo8B39Y79rOo0Kw0hzupTmiVtftQYCZl87mwldhh2L9Aquw==",
|
||||
"_location": "/vue-router",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "vue-router",
|
||||
"raw": "vue-router@3.0.6",
|
||||
"name": "vue-router",
|
||||
"escapedName": "vue-router",
|
||||
"rawSpec": "",
|
||||
"rawSpec": "3.0.6",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
"fetchSpec": "3.0.6"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.0.2.tgz",
|
||||
"_shasum": "dedc67afe6c4e2bc25682c8b1c2a8c0d7c7e56be",
|
||||
"_spec": "vue-router",
|
||||
"_where": "/Users/edwinab/BME-5/project/om",
|
||||
"_resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.0.6.tgz",
|
||||
"_shasum": "2e4f0f9cbb0b96d0205ab2690cfe588935136ac3",
|
||||
"_spec": "vue-router@3.0.6",
|
||||
"_where": "/home/erik/Documents/workspace_brackets/a1_BME_Project_Ohm/om",
|
||||
"author": {
|
||||
"name": "Evan You"
|
||||
},
|
||||
@@ -34,13 +34,14 @@
|
||||
"description": "Official router for Vue.js 2",
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.24.1",
|
||||
"babel-eslint": "^8.2.2",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-loader": "^7.1.3",
|
||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-preset-flow-vue": "^1.0.0",
|
||||
"buble": "^0.19.3",
|
||||
"chromedriver": "^2.35.0",
|
||||
"conventional-changelog-cli": "^2.0.11",
|
||||
"cross-spawn": "^5.0.1",
|
||||
"css-loader": "^0.28.10",
|
||||
"es6-promise": "^4.2.4",
|
||||
@@ -51,6 +52,7 @@
|
||||
"express-urlrewrite": "^1.2.0",
|
||||
"flow-bin": "^0.66.0",
|
||||
"jasmine": "2.8.0",
|
||||
"lint-staged": "^8.1.0",
|
||||
"nightwatch": "^0.9.20",
|
||||
"nightwatch-helpers": "^1.0.0",
|
||||
"path-to-regexp": "^1.7.0",
|
||||
@@ -63,21 +65,26 @@
|
||||
"rollup-plugin-replace": "^2.0.0",
|
||||
"rollup-watch": "^4.0.0",
|
||||
"selenium-server": "^2.53.1",
|
||||
"typescript": "^2.7.2",
|
||||
"uglify-js": "^3.3.13",
|
||||
"terser": "^3.17.0",
|
||||
"typescript": "^3.3.1",
|
||||
"vue": "^2.5.16",
|
||||
"vue-loader": "^15.2.1",
|
||||
"vue-template-compiler": "^2.5.16",
|
||||
"vuepress": "^0.14.1",
|
||||
"vuepress-theme-vue": "^1.1.0",
|
||||
"webpack": "^4.9.0",
|
||||
"webpack-dev-middleware": "^3.1.3"
|
||||
"webpack-dev-middleware": "^3.1.3",
|
||||
"yorkie": "^2.0.0"
|
||||
},
|
||||
"files": [
|
||||
"src/*.js",
|
||||
"dist/*.js",
|
||||
"types/*.d.ts"
|
||||
],
|
||||
"gitHooks": {
|
||||
"pre-commit": "lint-staged",
|
||||
"commit-msg": "node scripts/verifyCommitMsg.js"
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue-router#readme",
|
||||
"jsdelivr": "dist/vue-router.js",
|
||||
"keywords": [
|
||||
@@ -86,6 +93,12 @@
|
||||
"routing"
|
||||
],
|
||||
"license": "MIT",
|
||||
"lint-staged": {
|
||||
"*.{js,vue}": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"main": "dist/vue-router.common.js",
|
||||
"module": "dist/vue-router.esm.js",
|
||||
"name": "vue-router",
|
||||
@@ -95,13 +108,14 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build/build.js",
|
||||
"changelog": "conventional-changelog -p angular -r 1 -i CHANGELOG.md -s",
|
||||
"dev": "node examples/server.js",
|
||||
"dev:dist": "rollup -wm -c build/rollup.dev.config.js",
|
||||
"docs": "vuepress dev docs",
|
||||
"docs:build": "vuepress build docs",
|
||||
"flow": "flow check",
|
||||
"lint": "eslint src examples",
|
||||
"release": "bash build/release.sh",
|
||||
"lint": "eslint src test examples",
|
||||
"release": "bash scripts/release.sh",
|
||||
"test": "npm run lint && npm run flow && npm run test:unit && npm run test:e2e && npm run test:types",
|
||||
"test:e2e": "node test/e2e/runner.js",
|
||||
"test:types": "tsc -p types/test",
|
||||
@@ -110,5 +124,5 @@
|
||||
"sideEffects": false,
|
||||
"typings": "types/index.d.ts",
|
||||
"unpkg": "dist/vue-router.js",
|
||||
"version": "3.0.2"
|
||||
"version": "3.0.6"
|
||||
}
|
||||
|
||||
+15
-2
@@ -89,7 +89,19 @@ export default class VueRouter {
|
||||
|
||||
this.apps.push(app)
|
||||
|
||||
// main app already initialized.
|
||||
// set up app destroyed handler
|
||||
// https://github.com/vuejs/vue-router/issues/2639
|
||||
app.$once('hook:destroyed', () => {
|
||||
// clean out app from this.apps array once destroyed
|
||||
const index = this.apps.indexOf(app)
|
||||
if (index > -1) this.apps.splice(index, 1)
|
||||
// ensure we still have a main app or null if no apps
|
||||
// we do not release the router so it can be reused
|
||||
if (this.app === app) this.app = this.apps[0] || null
|
||||
})
|
||||
|
||||
// main app previously initialized
|
||||
// return as we don't need to set up new history listener
|
||||
if (this.app) {
|
||||
return
|
||||
}
|
||||
@@ -186,9 +198,10 @@ export default class VueRouter {
|
||||
normalizedTo: Location,
|
||||
resolved: Route
|
||||
} {
|
||||
current = current || this.history.current
|
||||
const location = normalizeLocation(
|
||||
to,
|
||||
current || this.history.current,
|
||||
current,
|
||||
append,
|
||||
this
|
||||
)
|
||||
|
||||
+2
-2
@@ -108,7 +108,7 @@ export interface Location {
|
||||
name?: string;
|
||||
path?: string;
|
||||
hash?: string;
|
||||
query?: Dictionary<string | string[]>;
|
||||
query?: Dictionary<string | (string | null)[] | null | undefined>;
|
||||
params?: Dictionary<string>;
|
||||
append?: boolean;
|
||||
replace?: boolean;
|
||||
@@ -118,7 +118,7 @@ export interface Route {
|
||||
path: string;
|
||||
name?: string;
|
||||
hash: string;
|
||||
query: Dictionary<string | string[]>;
|
||||
query: Dictionary<string | (string | null)[]>;
|
||||
params: Dictionary<string>;
|
||||
fullPath: string;
|
||||
matched: RouteRecord[];
|
||||
|
||||
Reference in New Issue
Block a user