Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Dependency connect-redis from 3.4.0 to 8.0.1 #1387

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

hexaltation
Copy link
Collaborator

@hexaltation hexaltation commented Jan 20, 2025

Context

This PR is a follow-up of #1368
It manage to upgrade redis-connect to it's latest release

Proposed solution

The following strategy has been chosen.

  • Upgrade following breaking changes and migration documentations provided by redis-connect project.

Bump connect-redis from 3.4.0 to 4.0.4

Applies migration following https://github.com/tj/connect-redis/blob/c951850eb72759f387d4ae0c249aca8e1e9fc244/migration-to-v4.md

Bump connect-redis from 4.0.4 to 7.1.1

Applies migration following https://github.com/tj/connect-redis/releases/tag/v7.0.0

As express-session is needed as a peer dependency, it as been explicitly added to grist-core dependencies.
A resolution has been added to resolve to @gristlabs/express-session.

Bump connect-redis from 7.1.1 to 8.0.1

Applies migration following https://github.com/tj/connect-redis/releases/tag/v8.0.0

Has this been tested?

  • 👍 yes, By running automated test of this PR

@hexaltation hexaltation added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code gouv.fr labels Jan 20, 2025
@hexaltation hexaltation force-pushed the dependencies-update-connect-redis branch from 633d761 to 43adde8 Compare January 21, 2025 12:26
@hexaltation hexaltation changed the title Upgrade Dependency connect-redis Upgrade Dependency connect-redis from 3.4.0 to 7.1.1 Jan 21, 2025
@hexaltation hexaltation changed the title Upgrade Dependency connect-redis from 3.4.0 to 7.1.1 Upgrade Dependency connect-redis from 3.4.0 to 8.0.1 Jan 22, 2025
@hexaltation hexaltation force-pushed the dependencies-update-connect-redis branch from eae178f to 17cf0dc Compare January 27, 2025 14:43
To work it needs at least:
* bump redis from 3.1.1 to 4.5.7
* bump redislock from 3.1.2 to 5.0.0-beta.2

Some major breaking changes appears in this two packages.

[Redis](https://www.npmjs.com/package/redis):

* All methods now return promises natively
    - promesifyAll is no longer needed
    - Async Postfix needs to be removed everywhere
* Types are now native
    - `RedisClientType` client is created onCreate()
* SUBSCRIBE methode needsa listener
* All Redis Commands need camelCase or CAPS
* hmset is deprecated and needs to be replace by hSet

[Redlock](https://www.npmjs.com/package/redlock):

* Before 5.0.0 it only support [ioredis](https://www.npmjs.com/package/ioredis) implementation. AFAIK 5.0.0
 implements support for [redis-node](https://www.npmjs.com/package/redis)

Build fails on this commit
Some type adaptations, and syntactic corrections still remains to be done.
@hexaltation hexaltation force-pushed the dependencies-update-connect-redis branch from 17cf0dc to ec019cd Compare January 29, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file gouv.fr javascript Pull requests that update Javascript code
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant