From 53c5fad2b86351035c7d5da9e53573982eb5b918 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Wed, 31 Jul 2024 17:04:50 +0100 Subject: [PATCH 1/2] chore: update min fastify version --- lib/fastifySession.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fastifySession.js b/lib/fastifySession.js index bc8fe20..4b98ea0 100644 --- a/lib/fastifySession.js +++ b/lib/fastifySession.js @@ -266,7 +266,7 @@ function fastifySession (fastify, options, next) { } module.exports = fp(fastifySession, { - fastify: '4.x', + fastify: '5.x', name: '@fastify/session', dependencies: [ '@fastify/cookie' From 60c6138f9934b9a7fc99477dac7a4e3036934c82 Mon Sep 17 00:00:00 2001 From: James Sumners Date: Thu, 1 Aug 2024 06:47:20 -0400 Subject: [PATCH 2/2] update fastify deps --- package.json | 4 ++-- test/session.test.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 651982a..3fb0970 100644 --- a/package.json +++ b/package.json @@ -29,13 +29,13 @@ "url": "git+https://github.com/fastify/session.git" }, "devDependencies": { - "@fastify/cookie": "^9.3.1", + "@fastify/cookie": "^10.0.0-pre.fv5.1", "@fastify/pre-commit": "^2.1.0", "@types/node": "^22.0.0", "connect-mongo": "^5.1.0", "connect-redis": "^7.1.1", "cronometro": "^3.0.2", - "fastify": "^4.26.2", + "fastify": "^5.0.0-alpha.3", "ioredis": "^5.3.2", "session-file-store": "^1.5.0", "standard": "^17.1.0", diff --git a/test/session.test.js b/test/session.test.js index ede1920..67b53f9 100644 --- a/test/session.test.js +++ b/test/session.test.js @@ -816,7 +816,7 @@ test("clears cookie if not backed by a session, and there's nothing to save", as }) t.equal(response.statusCode, 200) - t.equal(response.headers['set-cookie'], 'sessionId=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT') + t.equal(response.headers['set-cookie'], 'sessionId=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax') }) test("clearing cookie sets the domain if it's specified in the cookie options", async t => { @@ -835,7 +835,7 @@ test("clearing cookie sets the domain if it's specified in the cookie options", }) t.equal(response.statusCode, 200) - t.equal(response.headers['set-cookie'], 'sessionId=; Domain=domain.test; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT') + t.equal(response.headers['set-cookie'], 'sessionId=; Domain=domain.test; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax') }) test('does not clear cookie if no session cookie in request', async t => {