From 1b166756f2e05b28013efa6e21aa1e8f61ff3628 Mon Sep 17 00:00:00 2001 From: Carlos Fuentes Date: Tue, 17 May 2022 17:40:44 +0200 Subject: [PATCH 1/2] docs: update documentation --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 3f5bfab..aa1a2e4 100644 --- a/Readme.md +++ b/Readme.md @@ -44,7 +44,7 @@ fastify.get('/', (req, reply) => { reply.send({hello: 'world'}) }) -fastify.listen(3000, (err) => { +fastify.listen({ port: 3000 }, (err) => { if (err) throw err http.get('http://127.0.0.1:3000/', (res) => { @@ -81,7 +81,7 @@ fastify.get('/', (req, reply) => { }) }) -fastify.listen(3000, (err) => { +fastify.listen({ port: 3000 }, (err) => { if (err) throw err }) ``` From 3269646811b001e28287c390a1cc0cf0c0e9999a Mon Sep 17 00:00:00 2001 From: Carlos Fuentes Date: Tue, 17 May 2022 17:41:12 +0200 Subject: [PATCH 2/2] feat!: update to fastify@v4 --- package.json | 2 +- plugin.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e7134df..a01fe77 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "homepage": "https://github.com/fastify/fastify-caching#readme", "devDependencies": { "@types/node": "^17.0.21", - "fastify": "^3.27.2", + "fastify": "^4.0.0-rc.2", "pre-commit": "^1.2.2", "snazzy": "^9.0.0", "standard": "^17.0.0", diff --git a/plugin.js b/plugin.js index 2621ddc..f8fe11e 100644 --- a/plugin.js +++ b/plugin.js @@ -93,8 +93,8 @@ function fastifyCachingPlugin (instance, options, next) { } module.exports = fp(fastifyCachingPlugin, { - fastify: '^3.0.0', - name: 'fastify-caching' + fastify: '^4.0.0', + name: '@fastify/caching' }) module.exports.privacy = {