From 3a56a2a1a7771cfd9aea69c1852051854d694dc2 Mon Sep 17 00:00:00 2001 From: Cristian Barlutiu Date: Fri, 22 Mar 2024 09:45:13 +0100 Subject: [PATCH 1/2] update for fastify 5 --- .github/workflows/ci.yml | 2 +- package.json | 8 ++++---- test/secret.test.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b00276..5395d92 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.yml@v3 + uses: fastify/workflows/.github/workflows/plugins-ci.yml@v4.1.0 with: license-check: true lint: true diff --git a/package.json b/package.json index 82dd7a8..075176a 100644 --- a/package.json +++ b/package.json @@ -27,12 +27,12 @@ "test:typescript": "tsd" }, "devDependencies": { - "@types/node": "^20.1.0", + "@types/node": "^20.11.30", "beautify-benchmark": "^0.2.4", "benchmark": "^2.1.4", - "standard": "^17.0.0", - "tap": "^16.3.0", - "tsd": "^0.30.0" + "standard": "^17.1.0", + "tap": "^18.7.1", + "tsd": "^0.30.7" }, "keywords": [ "csrf", diff --git a/test/secret.test.js b/test/secret.test.js index b402a55..2957795 100644 --- a/test/secret.test.js +++ b/test/secret.test.js @@ -1,6 +1,6 @@ 'use strict' -const { test, mock } = require('tap') +const { test, mockRequire } = require('tap') const Tokens = require('..') test('Tokens.secret: should reject bad callback', t => { @@ -75,7 +75,7 @@ test('Tokens.secret: should not contain /, +, or =, callback', t => { test('Tokens.secret: should handle error, Promise', t => { t.plan(2) - const Tokens = mock('..', { + const Tokens = mockRequire('..', { 'node:crypto': { randomBytes: (_size, cb) => { cb(new Error('oh no')) @@ -93,7 +93,7 @@ test('Tokens.secret: should handle error, Promise', t => { test('Tokens.secret: should handle error, callback', t => { t.plan(2) - const Tokens = mock('..', { + const Tokens = mockRequire('..', { 'node:crypto': { randomBytes: (size, cb) => { cb(new Error('oh no')) From c615a8b468e2be063e79c2b4e758ee306675bc3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Mon, 29 Apr 2024 23:10:16 +0200 Subject: [PATCH 2/2] update workflow --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5395d92..bbfcb5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,8 @@ on: jobs: test: - uses: fastify/workflows/.github/workflows/plugins-ci.yml@v4.1.0 + uses: fastify/workflows/.github/workflows/plugins-ci.yml@v4.2.1 with: license-check: true lint: true + node-versions: '["16", "18", "20", "22"]'