Skip to content

Commit

Permalink
chore: update min fastify version (#264)
Browse files Browse the repository at this point in the history
* chore: update min fastify version

* update fastify deps

---------

Co-authored-by: James Sumners <git@zifbang.com>
  • Loading branch information
Fdawgs and jsumners authored Aug 1, 2024
1 parent cf58689 commit 323ea23
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/fastifySession.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions test/session.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand All @@ -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 => {
Expand Down

0 comments on commit 323ea23

Please sign in to comment.