@ogcio/fastify-error-handler 4.0.0 → 5.0.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/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # 5.0.0 (2024-10-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * **fastify-error-handler:** updated version script ([7c7ec05](https://github.com/ogcio/shared-node-utils/commit/7c7ec05b8a8335642038c60b198b0f193364ddb4))
12
+ * **fastify-logging-wrapper:** added code ([6fa2068](https://github.com/ogcio/shared-node-utils/commit/6fa2068dbef70d00406065b79de1bf91aa444bea))
13
+ * **root:** startup repo ([7422a6c](https://github.com/ogcio/shared-node-utils/commit/7422a6c8a7d51722299e6cd61eebacefe2b80d6d))
14
+
15
+ ## BREAKING CHANGES
16
+
17
+ - Moved to fastify v5.0.0
@@ -7,7 +7,7 @@ import httpErrors from "http-errors";
7
7
  export const buildFastify = async (
8
8
  loggerDestination?: DestinationStream
9
9
  ): Promise<FastifyInstance> => {
10
- const server = fastify({ logger: pino({}, loggerDestination) });
10
+ const server = fastify({ loggerInstance: pino({}, loggerDestination) });
11
11
  initializeErrorHandler(server as unknown as FastifyInstance);
12
12
  await server.register(fastifySensible);
13
13
  server.get("/error", async (request, _reply) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ogcio/fastify-error-handler",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -16,9 +16,8 @@
16
16
  "license": "ISC",
17
17
  "description": "Normalize the error handling of errors with related logs",
18
18
  "dependencies": {
19
- "@fastify/sensible": "^5.6.0",
20
- "@ogcio/fastify-logging-wrapper": "^4.0.0",
21
- "fastify": "^4.28.1"
19
+ "@ogcio/fastify-logging-wrapper": "^5.0.0",
20
+ "fastify": "^5.0.0"
22
21
  },
23
22
  "devDependencies": {
24
23
  "@types/http-errors": "^2.0.4"
@@ -27,5 +26,6 @@
27
26
  "type": "git",
28
27
  "url": "git+https://github.com/ogcio/shared-node-utils.git",
29
28
  "directory": "packages/fastify-error-handler"
30
- }
31
- }
29
+ },
30
+ "homepage": "https://github.com/ogcio/shared-node-utils/tree/main/packages/fastify-error-handler#readme"
31
+ }