Skip to content

Commit

Permalink
Deprecated property of faastify.
Browse files Browse the repository at this point in the history
`fastify@5` has depreacted `req.routePath` property like below. Therefore, changed  my code as `fastify` recommended.

```bash
(node:3756) [FSTDEP017] FastifyDeprecation: You are accessing the deprecated "request.routerPath" property. Use "request.routeOptions.url" instead. Property "req.routerPath" will be removed in `fastify@5`
```
  • Loading branch information
samchon committed Sep 26, 2023
1 parent 3991f6e commit 331fd7b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/core",
"version": "2.1.0",
"version": "2.1.1",
"description": "Super-fast validation decorators of NestJS",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/fetcher": "^2.1.0",
"@nestia/fetcher": "^2.1.1",
"@nestjs/common": ">= 7.0.1",
"@nestjs/core": ">= 7.0.1",
"@nestjs/platform-express": ">= 7.0.1",
Expand All @@ -47,7 +47,7 @@
"typia": "^5.1.1"
},
"peerDependencies": {
"@nestia/fetcher": ">=2.1.0",
"@nestia/fetcher": ">=2.1.1",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"@nestjs/platform-express": ">=7.0.1",
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/decorators/internal/route_error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function route_error(
error.method = request.method;
error.path =
(request as express.Request).path ??
(request as FastifyRequest).routeOptions?.url ??
(request as FastifyRequest).routerPath;
} catch {}

Expand Down
2 changes: 1 addition & 1 deletion packages/fetcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/fetcher",
"version": "2.1.0",
"version": "2.1.1",
"description": "Fetcher library of Nestia SDK",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/sdk",
"version": "2.1.0",
"version": "2.1.1",
"description": "Nestia SDK and Swagger generator",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -35,7 +35,7 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/fetcher": "^2.1.0",
"@nestia/fetcher": "^2.1.1",
"cli": "^1.0.1",
"glob": "^7.2.0",
"path-to-regexp": "^6.2.1",
Expand All @@ -47,7 +47,7 @@
"typia": "^5.1.1"
},
"peerDependencies": {
"@nestia/fetcher": ">=2.1.0",
"@nestia/fetcher": ">=2.1.1",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"reflect-metadata": ">=0.1.12",
Expand Down
2 changes: 1 addition & 1 deletion test/features/distribute-assert/packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"typescript": "^5.2.2"
},
"dependencies": {
"@nestia/fetcher": "file:../../../../../packages/fetcher/nestia-fetcher-0.0.0-dev.20991231.tgz",
"@nestia/fetcher": "^2.1.1",
"typia": "^5.1.1"
}
}
2 changes: 1 addition & 1 deletion test/features/distribute-json/packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"typescript": "^5.2.2"
},
"dependencies": {
"@nestia/fetcher": "file:../../../../../packages/fetcher/nestia-fetcher-0.0.0-dev.20991231.tgz",
"@nestia/fetcher": "^2.1.1",
"typia": "^5.1.1"
}
}
2 changes: 1 addition & 1 deletion test/features/distribute/packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"typescript": "^5.2.2"
},
"dependencies": {
"@nestia/fetcher": "file:../../../../../packages/fetcher/nestia-fetcher-0.0.0-dev.20991231.tgz",
"@nestia/fetcher": "^2.1.1",
"typia": "^5.1.1"
}
}
8 changes: 4 additions & 4 deletions test/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@nestia/test",
"version": "0.0.0-dev.20991231",
"version": "2.1.1",
"description": "Test program of Nestia",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -36,9 +36,9 @@
"typia": "^5.1.1",
"uuid": "^9.0.0",
"nestia": "^4.5.0",
"@nestia/core": "D:\\github\\samchon\\nestia\\packages\\core\\nestia-core-0.0.0-dev.20991231.tgz",
"@nestia/core": "^2.1.1",
"@nestia/e2e": "^0.3.6",
"@nestia/fetcher": "D:\\github\\samchon\\nestia\\packages\\fetcher\\nestia-fetcher-0.0.0-dev.20991231.tgz",
"@nestia/sdk": "D:\\github\\samchon\\nestia\\packages\\sdk\\nestia-sdk-0.0.0-dev.20991231.tgz"
"@nestia/fetcher": "^2.1.1",
"@nestia/sdk": "^2.1.1"
}
}

0 comments on commit 331fd7b

Please sign in to comment.