fastify / fastify-secure-session

Create a secure stateless cookie session for Fastify
MIT License
201 stars 45 forks source link

Upgrade @fastify/cookie to 9.1.0 #204

Closed nalanj closed 10 months ago

nalanj commented 10 months ago

Prerequisites

Fastify version

4.24.3

Plugin version

7.1.0

Node.js version

20.7.0

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

14

Description

Right now I'm getting deprecation warnings that look like this:

(node:98534) [FSTDEP019] FastifyDeprecation: reply.context property access is deprecated. Please use "reply.routeOptions.config" or "reply.routeOptions.schema" instead for accessing Route settings. The "reply.context" will be removed in `fastify@5`.
(Use `node --trace-warnings ...` to show where the warning was created)

I traced it back to the fact that this plugin currently relies on @fastify/cookie 9.0.4, and context is no longer used in @fastify/cookie 9.1.0.

Steps to Reproduce

Expected Behavior

It shouldn't print a deprecation warning.

Uzlopak commented 10 months ago

We are not using lock files. Just delete node_modules package-lock and run again npm i.