@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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/lib/router.js +3 -5
  3. package/package.json +15 -14
package/README.md CHANGED
@@ -54,7 +54,7 @@ npm install @koa/router
54
54
  ## Typescript Support
55
55
 
56
56
  ```sh
57
- npm install @types/koa__router
57
+ npm install --save-dev @types/koa__router
58
58
  ```
59
59
 
60
60
 
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 = router.opts.routerPath || ctx.routerPath || ctx.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.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.0.3",
22
- "@commitlint/config-conventional": "^17.0.3",
23
- "@ladjs/env": "^3.0.0",
24
- "ava": "^4.3.0",
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": "^8.19.0",
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.1",
31
- "jsdoc-to-markdown": "^7.1.1",
32
- "koa": "^2.13.4",
33
- "lint-staged": "^13.0.3",
34
- "mocha": "^10.0.0",
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": "^11.0.0",
37
+ "remark-cli": "11",
37
38
  "remark-preset-github": "^4.0.4",
38
39
  "should": "^13.2.3",
39
- "supertest": "^6.2.4",
40
+ "supertest": "^6.3.3",
40
41
  "wrk": "^1.2.1",
41
- "xo": "^0.50.0"
42
+ "xo": "0.53.1"
42
43
  },
43
44
  "engines": {
44
45
  "node": ">= 12"