@koa/router 15.3.0 → 15.3.2
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/package.json +23 -21
package/README.md
CHANGED
|
@@ -473,7 +473,7 @@ router.get('/:category/:title', (ctx) => {
|
|
|
473
473
|
**Optional parameters:**
|
|
474
474
|
|
|
475
475
|
```javascript
|
|
476
|
-
router.get('/user{/:id}
|
|
476
|
+
router.get('/user{/:id}', (ctx) => {
|
|
477
477
|
// Matches both /user and /user/123
|
|
478
478
|
ctx.body = { id: ctx.params.id || 'all' };
|
|
479
479
|
});
|
package/package.json
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koa/router",
|
|
3
|
-
"description": "Router middleware for
|
|
4
|
-
"version": "15.3.
|
|
5
|
-
"author": "
|
|
3
|
+
"description": "Router middleware for Koa.",
|
|
4
|
+
"version": "15.3.2",
|
|
5
|
+
"author": "Koa.js",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/koajs/router/issues",
|
|
8
8
|
"email": "niftylettuce@gmail.com"
|
|
9
9
|
},
|
|
10
10
|
"contributors": [
|
|
11
|
-
{
|
|
12
|
-
"name": "Alex Mingoia",
|
|
13
|
-
"email": "talk@alexmingoia.com"
|
|
14
|
-
},
|
|
15
11
|
{
|
|
16
12
|
"name": "@koajs"
|
|
17
13
|
},
|
|
@@ -35,27 +31,29 @@
|
|
|
35
31
|
"path-to-regexp": "^8.3.0"
|
|
36
32
|
},
|
|
37
33
|
"devDependencies": {
|
|
38
|
-
"@commitlint/cli": "^20.
|
|
39
|
-
"@commitlint/config-conventional": "^20.
|
|
34
|
+
"@commitlint/cli": "^20.4.4",
|
|
35
|
+
"@commitlint/config-conventional": "^20.4.4",
|
|
36
|
+
"@eslint/js": "^10.0.1",
|
|
40
37
|
"@koa/bodyparser": "^6.1.0",
|
|
41
38
|
"@types/debug": "^4.1.12",
|
|
42
39
|
"@types/jsonwebtoken": "^9.0.10",
|
|
43
40
|
"@types/koa": "^3.0.1",
|
|
44
|
-
"@types/node": "^25.0
|
|
45
|
-
"@types/supertest": "^
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
47
|
-
"@typescript-eslint/parser": "^8.
|
|
48
|
-
"c8": "^
|
|
41
|
+
"@types/node": "^25.5.0",
|
|
42
|
+
"@types/supertest": "^7.2.0",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^8.57.0",
|
|
44
|
+
"@typescript-eslint/parser": "^8.57.0",
|
|
45
|
+
"c8": "^11.0.0",
|
|
49
46
|
"chalk": "^5.6.2",
|
|
50
|
-
"eslint": "^
|
|
51
|
-
"eslint-plugin-unicorn": "^
|
|
47
|
+
"eslint": "^10.0.3",
|
|
48
|
+
"eslint-plugin-unicorn": "^63.0.0",
|
|
52
49
|
"husky": "^9.1.7",
|
|
53
50
|
"joi": "^18.0.2",
|
|
54
51
|
"jsonwebtoken": "^9.0.3",
|
|
55
|
-
"koa": "^3.1.
|
|
56
|
-
"lint-staged": "^16.
|
|
52
|
+
"koa": "^3.1.2",
|
|
53
|
+
"lint-staged": "^16.4.0",
|
|
54
|
+
"np": "^11.0.2",
|
|
57
55
|
"prettier": "^3.8.1",
|
|
58
|
-
"rimraf": "^6.1.
|
|
56
|
+
"rimraf": "^6.1.3",
|
|
59
57
|
"supertest": "^7.2.2",
|
|
60
58
|
"ts-node": "^10.9.2",
|
|
61
59
|
"tsup": "^8.5.1",
|
|
@@ -104,7 +102,7 @@
|
|
|
104
102
|
"prepare": "husky install",
|
|
105
103
|
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md,yml,yaml}\"",
|
|
106
104
|
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md,yml,yaml}\"",
|
|
107
|
-
"lint:ts": "eslint src test --
|
|
105
|
+
"lint:ts": "eslint src test --fix",
|
|
108
106
|
"lint": "npm run lint:ts",
|
|
109
107
|
"test:core": "TS_NODE_PROJECT=tsconfig.ts-node.json node --require ts-node/register --test test/*.test.ts test/**/*.test.ts",
|
|
110
108
|
"test:recipes": "TS_NODE_PROJECT=tsconfig.recipes.json node --require ts-node/register --test recipes/**/*.test.ts",
|
|
@@ -115,6 +113,10 @@
|
|
|
115
113
|
"ts:check:test": "tsc --noEmit --project tsconfig.test.json",
|
|
116
114
|
"prebuild": "rimraf dist",
|
|
117
115
|
"build": "tsup",
|
|
118
|
-
"prepublishOnly": "npm run build"
|
|
116
|
+
"prepublishOnly": "npm run build",
|
|
117
|
+
"release": "np --test-script test:all"
|
|
118
|
+
},
|
|
119
|
+
"resolutions": {
|
|
120
|
+
"c8/yargs": "^18.0.0"
|
|
119
121
|
}
|
|
120
122
|
}
|