From 2d269e9971e0579a5d81a302df1bb38b692b2ed7 Mon Sep 17 00:00:00 2001 From: Cristian Barlutiu Date: Wed, 27 Mar 2024 13:42:54 +0100 Subject: [PATCH 1/3] Update for Fastify v5 (#192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update for fastify 5 * removed coverage disable * replaced istambul with c8 * wrapped code in c8 * fix --------- Co-authored-by: Gürgün Dayıoğlu --- .github/workflows/ci.yml | 2 +- .taprc | 7 ------- index.js | 6 ++++-- package.json | 16 ++++++++-------- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87263eb..71d63df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ on: jobs: test: - uses: fastify/workflows/.github/workflows/plugins-ci-redis.yml@v3 + uses: fastify/workflows/.github/workflows/plugins-ci-redis.yml@v4.1.0 with: lint: true license-check: true diff --git a/.taprc b/.taprc index 63ccb87..eb6eb3e 100644 --- a/.taprc +++ b/.taprc @@ -1,9 +1,2 @@ -ts: false -jsx: false -flow: false -jobs: 1 -coverage: true -check-coverage: true - files: - test/**/*.test.js diff --git a/index.js b/index.js index 25299d4..2264126 100644 --- a/index.js +++ b/index.js @@ -67,7 +67,7 @@ function fastifyRedis (fastify, options, next) { } // Testing this make the process crash on latest TAP :( - /* istanbul ignore next */ + /* c8 ignore start */ const onEnd = function (err) { client .off('ready', onReady) @@ -77,6 +77,7 @@ function fastifyRedis (fastify, options, next) { next(err) } + /* c8 ignore stop */ const onReady = function () { client @@ -88,7 +89,7 @@ function fastifyRedis (fastify, options, next) { } // Testing this make the process crash on latest TAP :( - /* istanbul ignore next */ + /* c8 ignore start */ const onError = function (err) { if (err.code === 'ENOTFOUND') { onEnd(err) @@ -105,6 +106,7 @@ function fastifyRedis (fastify, options, next) { onEnd(err) } } + /* c8 ignore stop */ // ioredis provides it in a .status property if (client.status === 'ready') { diff --git a/package.json b/package.json index a9d6e8f..83c91e3 100644 --- a/package.json +++ b/package.json @@ -34,18 +34,18 @@ }, "homepage": "https://github.com/fastify/fastify-redis#readme", "devDependencies": { - "@fastify/pre-commit": "^2.0.2", - "@types/node": "^20.1.0", - "fastify": "^4.0.0-rc.2", + "@fastify/pre-commit": "^2.1.0", + "@types/node": "^20.11.30", + "fastify": "^4.26.2", "proxyquire": "^2.1.3", - "standard": "^17.0.0", - "tap": "^16.0.0", - "tsd": "^0.30.0", + "standard": "^17.1.0", + "tap": "^18.7.1", + "tsd": "^0.30.7", "why-is-node-running": "^2.2.2" }, "dependencies": { - "fastify-plugin": "^4.0.0", - "ioredis": "^5.0.0" + "fastify-plugin": "^4.5.1", + "ioredis": "^5.3.2" }, "publishConfig": { "access": "public" From 650afeb088eec827845a956be5159de2fda53423 Mon Sep 17 00:00:00 2001 From: Cristian Barlutiu Date: Wed, 27 Mar 2024 13:42:54 +0100 Subject: [PATCH 2/3] Update for Fastify v5 (#192) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update for fastify 5 * removed coverage disable * replaced istambul with c8 * wrapped code in c8 * fix --------- Co-authored-by: Gürgün Dayıoğlu --- .github/workflows/ci.yml | 2 +- .taprc | 7 ------- index.js | 6 ++++-- package.json | 14 +++++++------- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87263eb..71d63df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ on: jobs: test: - uses: fastify/workflows/.github/workflows/plugins-ci-redis.yml@v3 + uses: fastify/workflows/.github/workflows/plugins-ci-redis.yml@v4.1.0 with: lint: true license-check: true diff --git a/.taprc b/.taprc index 63ccb87..eb6eb3e 100644 --- a/.taprc +++ b/.taprc @@ -1,9 +1,2 @@ -ts: false -jsx: false -flow: false -jobs: 1 -coverage: true -check-coverage: true - files: - test/**/*.test.js diff --git a/index.js b/index.js index 7f871b3..ec03b67 100644 --- a/index.js +++ b/index.js @@ -67,7 +67,7 @@ function fastifyRedis (fastify, options, next) { } // Testing this make the process crash on latest TAP :( - /* istanbul ignore next */ + /* c8 ignore start */ const onEnd = function (err) { client .off('ready', onReady) @@ -77,6 +77,7 @@ function fastifyRedis (fastify, options, next) { next(err) } + /* c8 ignore stop */ const onReady = function () { client @@ -88,7 +89,7 @@ function fastifyRedis (fastify, options, next) { } // Testing this make the process crash on latest TAP :( - /* istanbul ignore next */ + /* c8 ignore start */ const onError = function (err) { if (err.code === 'ENOTFOUND') { onEnd(err) @@ -105,6 +106,7 @@ function fastifyRedis (fastify, options, next) { onEnd(err) } } + /* c8 ignore stop */ // ioredis provides it in a .status property if (client.status === 'ready') { diff --git a/package.json b/package.json index f1afe3f..ec214d6 100644 --- a/package.json +++ b/package.json @@ -35,18 +35,18 @@ }, "homepage": "https://github.com/fastify/fastify-redis#readme", "devDependencies": { - "@fastify/pre-commit": "^2.0.2", - "@types/node": "^20.1.0", - "fastify": "^4.0.0-rc.2", + "@fastify/pre-commit": "^2.1.0", + "@types/node": "^20.11.30", + "fastify": "^4.26.2", "proxyquire": "^2.1.3", - "standard": "^17.0.0", - "tap": "^16.0.0", + "standard": "^17.1.0", + "tap": "^18.7.1", "tsd": "^0.31.0", "why-is-node-running": "^2.2.2" }, "dependencies": { - "fastify-plugin": "^4.0.0", - "ioredis": "^5.0.0" + "fastify-plugin": "^4.5.1", + "ioredis": "^5.3.2" }, "publishConfig": { "access": "public" From 70d393c9a54ca49a4d21ed6b9fe46ad1f6dc5f8f Mon Sep 17 00:00:00 2001 From: James Sumners Date: Tue, 9 Jul 2024 06:51:21 -0400 Subject: [PATCH 3/3] update fastify deps --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ec214d6..77cc3c0 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@fastify/pre-commit": "^2.1.0", "@types/node": "^20.11.30", - "fastify": "^4.26.2", + "fastify": "^5.0.0-alpha.3", "proxyquire": "^2.1.3", "standard": "^17.1.0", "tap": "^18.7.1", @@ -45,7 +45,7 @@ "why-is-node-running": "^2.2.2" }, "dependencies": { - "fastify-plugin": "^4.5.1", + "fastify-plugin": "^5.0.0-pre.fv5.1", "ioredis": "^5.3.2" }, "publishConfig": {