@koa/router 12.0.0 → 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/router.js +3 -5
- package/package.json +15 -14
package/README.md
CHANGED
package/lib/router.js
CHANGED
|
@@ -5,15 +5,12 @@
|
|
|
5
5
|
* @link https://github.com/alexmingoia/koa-router
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
const { debuglog } = require('util');
|
|
9
|
-
|
|
10
8
|
const compose = require('koa-compose');
|
|
11
9
|
const HttpError = require('http-errors');
|
|
12
10
|
const methods = require('methods');
|
|
13
11
|
const { pathToRegexp } = require('path-to-regexp');
|
|
14
12
|
const Layer = require('./layer');
|
|
15
|
-
|
|
16
|
-
const debug = debuglog('koa-router');
|
|
13
|
+
const debug = require('debug')('koa-router');
|
|
17
14
|
|
|
18
15
|
/**
|
|
19
16
|
* @module koa-router
|
|
@@ -384,7 +381,8 @@ Router.prototype.routes = Router.prototype.middleware = function () {
|
|
|
384
381
|
return next();
|
|
385
382
|
}
|
|
386
383
|
|
|
387
|
-
const path =
|
|
384
|
+
const path =
|
|
385
|
+
router.opts.routerPath || ctx.newRouterPath || ctx.path || ctx.routerPath;
|
|
388
386
|
const matched = router.match(path, ctx.method);
|
|
389
387
|
let layerChain;
|
|
390
388
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koa/router",
|
|
3
3
|
"description": "Router middleware for koa. Maintained by Forward Email and Lad.",
|
|
4
|
-
"version": "12.0.
|
|
4
|
+
"version": "12.0.1",
|
|
5
5
|
"author": "Alex Mingoia <talk@alexmingoia.com>",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/koajs/router/issues",
|
|
@@ -12,33 +12,34 @@
|
|
|
12
12
|
"@koajs"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"debug": "^4.3.4",
|
|
15
16
|
"http-errors": "^2.0.0",
|
|
16
17
|
"koa-compose": "^4.1.0",
|
|
17
18
|
"methods": "^1.1.2",
|
|
18
19
|
"path-to-regexp": "^6.2.1"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
|
-
"@commitlint/cli": "^17.
|
|
22
|
-
"@commitlint/config-conventional": "^17.0
|
|
23
|
-
"@ladjs/env": "^
|
|
24
|
-
"ava": "^
|
|
22
|
+
"@commitlint/cli": "^17.7.2",
|
|
23
|
+
"@commitlint/config-conventional": "^17.7.0",
|
|
24
|
+
"@ladjs/env": "^4.0.0",
|
|
25
|
+
"ava": "^5.3.1",
|
|
25
26
|
"cross-env": "^7.0.3",
|
|
26
|
-
"eslint": "
|
|
27
|
+
"eslint": "8.39.0",
|
|
27
28
|
"eslint-config-xo-lass": "^2.0.1",
|
|
28
29
|
"expect.js": "^0.3.1",
|
|
29
30
|
"fixpack": "^4.0.0",
|
|
30
|
-
"husky": "^8.0.
|
|
31
|
-
"jsdoc-to-markdown": "^
|
|
32
|
-
"koa": "^2.
|
|
33
|
-
"lint-staged": "^
|
|
34
|
-
"mocha": "^10.
|
|
31
|
+
"husky": "^8.0.3",
|
|
32
|
+
"jsdoc-to-markdown": "^8.0.0",
|
|
33
|
+
"koa": "^2.14.2",
|
|
34
|
+
"lint-staged": "^14.0.1",
|
|
35
|
+
"mocha": "^10.2.0",
|
|
35
36
|
"nyc": "^15.1.0",
|
|
36
|
-
"remark-cli": "
|
|
37
|
+
"remark-cli": "11",
|
|
37
38
|
"remark-preset-github": "^4.0.4",
|
|
38
39
|
"should": "^13.2.3",
|
|
39
|
-
"supertest": "^6.
|
|
40
|
+
"supertest": "^6.3.3",
|
|
40
41
|
"wrk": "^1.2.1",
|
|
41
|
-
"xo": "
|
|
42
|
+
"xo": "0.53.1"
|
|
42
43
|
},
|
|
43
44
|
"engines": {
|
|
44
45
|
"node": ">= 12"
|