@koa/router 15.2.0 → 15.3.0

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/dist/index.d.mts CHANGED
@@ -261,8 +261,12 @@ declare class RouterImplementation<StateT = koa.DefaultState, ContextT = koa.Def
261
261
  */
262
262
  use<T = {}, U = {}, B = unknown>(middleware: RouterMiddleware<StateT & T, ContextT & U, B>): Router<StateT, ContextT>;
263
263
  use<T = {}, U = {}>(middleware: RouterComposedMiddleware<StateT & T, ContextT & U>): Router<StateT, ContextT>;
264
+ use<T = {}, U = {}, B = unknown>(...middleware: Array<RouterMiddleware<StateT & T, ContextT & U, B>>): Router<StateT, ContextT>;
265
+ use<T = {}, U = {}>(...middleware: Array<RouterComposedMiddleware<StateT & T, ContextT & U>>): Router<StateT, ContextT>;
264
266
  use<T = {}, U = {}, B = unknown>(path: string | RegExp | string[], middleware: RouterMiddleware<StateT & T, ContextT & U, B>): Router<StateT, ContextT>;
265
267
  use<T = {}, U = {}>(path: string | RegExp | string[], middleware: RouterComposedMiddleware<StateT & T, ContextT & U>): Router<StateT, ContextT>;
268
+ use<T = {}, U = {}, B = unknown>(path: string | RegExp | string[], ...middleware: Array<RouterMiddleware<StateT & T, ContextT & U, B>>): Router<StateT, ContextT>;
269
+ use<T = {}, U = {}>(path: string | RegExp | string[], ...middleware: Array<RouterComposedMiddleware<StateT & T, ContextT & U>>): Router<StateT, ContextT>;
266
270
  use<T = {}, U = {}, B = unknown>(path: string | RegExp | string[], m1: RouterMiddleware<StateT & T, ContextT & U, B>, m2: RouterMiddleware<StateT & T, ContextT & U, B> | RouterComposedMiddleware<StateT & T, ContextT & U>, ...middleware: Array<RouterMiddleware<StateT & T, ContextT & U, B> | RouterComposedMiddleware<StateT & T, ContextT & U>>): Router<StateT, ContextT>;
267
271
  use<T = {}, U = {}, B = unknown>(m1: RouterMiddleware<StateT & T, ContextT & U, B>, m2: RouterMiddleware<StateT & T, ContextT & U, B> | RouterComposedMiddleware<StateT & T, ContextT & U>, ...middleware: Array<RouterMiddleware<StateT & T, ContextT & U, B> | RouterComposedMiddleware<StateT & T, ContextT & U>>): Router<StateT, ContextT>;
268
272
  /**
package/dist/index.d.ts CHANGED
@@ -261,8 +261,12 @@ declare class RouterImplementation<StateT = koa.DefaultState, ContextT = koa.Def
261
261
  */
262
262
  use<T = {}, U = {}, B = unknown>(middleware: RouterMiddleware<StateT & T, ContextT & U, B>): Router<StateT, ContextT>;
263
263
  use<T = {}, U = {}>(middleware: RouterComposedMiddleware<StateT & T, ContextT & U>): Router<StateT, ContextT>;
264
+ use<T = {}, U = {}, B = unknown>(...middleware: Array<RouterMiddleware<StateT & T, ContextT & U, B>>): Router<StateT, ContextT>;
265
+ use<T = {}, U = {}>(...middleware: Array<RouterComposedMiddleware<StateT & T, ContextT & U>>): Router<StateT, ContextT>;
264
266
  use<T = {}, U = {}, B = unknown>(path: string | RegExp | string[], middleware: RouterMiddleware<StateT & T, ContextT & U, B>): Router<StateT, ContextT>;
265
267
  use<T = {}, U = {}>(path: string | RegExp | string[], middleware: RouterComposedMiddleware<StateT & T, ContextT & U>): Router<StateT, ContextT>;
268
+ use<T = {}, U = {}, B = unknown>(path: string | RegExp | string[], ...middleware: Array<RouterMiddleware<StateT & T, ContextT & U, B>>): Router<StateT, ContextT>;
269
+ use<T = {}, U = {}>(path: string | RegExp | string[], ...middleware: Array<RouterComposedMiddleware<StateT & T, ContextT & U>>): Router<StateT, ContextT>;
266
270
  use<T = {}, U = {}, B = unknown>(path: string | RegExp | string[], m1: RouterMiddleware<StateT & T, ContextT & U, B>, m2: RouterMiddleware<StateT & T, ContextT & U, B> | RouterComposedMiddleware<StateT & T, ContextT & U>, ...middleware: Array<RouterMiddleware<StateT & T, ContextT & U, B> | RouterComposedMiddleware<StateT & T, ContextT & U>>): Router<StateT, ContextT>;
267
271
  use<T = {}, U = {}, B = unknown>(m1: RouterMiddleware<StateT & T, ContextT & U, B>, m2: RouterMiddleware<StateT & T, ContextT & U, B> | RouterComposedMiddleware<StateT & T, ContextT & U>, ...middleware: Array<RouterMiddleware<StateT & T, ContextT & U, B> | RouterComposedMiddleware<StateT & T, ContextT & U>>): Router<StateT, ContextT>;
268
272
  /**
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": "15.2.0",
4
+ "version": "15.3.0",
5
5
  "author": "Alex Mingoia <talk@alexmingoia.com>",
6
6
  "bugs": {
7
7
  "url": "https://github.com/koajs/router/issues",
@@ -35,16 +35,16 @@
35
35
  "path-to-regexp": "^8.3.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@commitlint/cli": "^20.3.0",
39
- "@commitlint/config-conventional": "^20.3.0",
40
- "@koa/bodyparser": "^6.0.0",
38
+ "@commitlint/cli": "^20.3.1",
39
+ "@commitlint/config-conventional": "^20.3.1",
40
+ "@koa/bodyparser": "^6.1.0",
41
41
  "@types/debug": "^4.1.12",
42
42
  "@types/jsonwebtoken": "^9.0.10",
43
43
  "@types/koa": "^3.0.1",
44
- "@types/node": "^25.0.3",
44
+ "@types/node": "^25.0.10",
45
45
  "@types/supertest": "^6.0.3",
46
- "@typescript-eslint/eslint-plugin": "^8.51.0",
47
- "@typescript-eslint/parser": "^8.51.0",
46
+ "@typescript-eslint/eslint-plugin": "^8.53.1",
47
+ "@typescript-eslint/parser": "^8.53.1",
48
48
  "c8": "^10.1.3",
49
49
  "chalk": "^5.6.2",
50
50
  "eslint": "^9.39.2",
@@ -54,9 +54,9 @@
54
54
  "jsonwebtoken": "^9.0.3",
55
55
  "koa": "^3.1.1",
56
56
  "lint-staged": "^16.2.7",
57
- "prettier": "^3.7.4",
57
+ "prettier": "^3.8.1",
58
58
  "rimraf": "^6.1.2",
59
- "supertest": "^7.1.4",
59
+ "supertest": "^7.2.2",
60
60
  "ts-node": "^10.9.2",
61
61
  "tsup": "^8.5.1",
62
62
  "typescript": "^5.9.3"