-
Notifications
You must be signed in to change notification settings - Fork 821
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
[ioredis plugin] fix: change supportedVersions to >1 <5 #671
[ioredis plugin] fix: change supportedVersions to >1 <5 #671
Conversation
Codecov Report
@@ Coverage Diff @@
## master #671 +/- ##
==========================================
- Coverage 92.75% 91.03% -1.73%
==========================================
Files 228 225 -3
Lines 10462 10414 -48
Branches 935 959 +24
==========================================
- Hits 9704 9480 -224
- Misses 758 934 +176
|
Does this plugin work with 3.x.x? Can we do |
I believe the code in its current state support both 2,3,4 so it should be |
@vmarchaud according to @naseemkullah he had trouble using it with 2 |
I'd be happy to test all versions with a local plugin that has an updated I have the code to test it (as per ioredis example PR), just need to know how to point to local plugin |
@naseemkullah what I would do is change the example package.json to point to the plugin by file path instead of installing it by version number. Then when you compile your local working version, the example will use your local version with whatever changes you've made. LMK if that doesn't make sense. |
@naseemkullah Another solution is running the test with the version you want to test, you only need to |
if you use lerna to bootstrap your packages then it will be possible to debug and use the local version for you examples, just enable the |
@obecny this was done because the symlink was causing the node plugin loader to be confused about where node_modules was. afaik you can bootstrap all packages except |
Thanks for the advice everyone, I was able to properly test locally with ioredis versions 2.x.x, 3.x.x and 4.x.x which all yield:
I'll continue to investigate. |
Sounds like an issue with the |
@naseemkullah what is the status of this? |
I cannot get passed the above mentioned error and require support |
@naseemkullah I looked into this and it is actually the plugin causing the ioredis module to break. Issue #713 with open PR #714 |
Excellent! |
@mayurkale22 if this looks good to you this is ok to merge |
@@ -23,7 +23,7 @@ import { VERSION } from './version'; | |||
export class IORedisPlugin extends BasePlugin<typeof ioredisTypes> { | |||
static readonly COMPONENT = 'ioredis'; | |||
static readonly DB_TYPE = 'redis'; | |||
readonly supportedVersions = ['^2.0.0']; | |||
readonly supportedVersions = ['>1 <5']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we support version 1.x.x? This version string will match that I believe? I think you're looking for '>=2 <5'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://semver.npmjs.com/ it's fine 🤷♂
Which problem is this PR solving?
ioredis v4.x.x should be patched as it is current version of ioredis, furthermore redis 2.x.x throwsioredis versions 2.x.x, 3.x.x and 4.x.x should be patchedTypeError: Redis is not a constructor
Short description of the changes