-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Custom connectors and additional typings #906
Conversation
Thanks for the pull request! It adds some overheads to add an option for this specified issue. A better way seems to be customizing SentinelConnector by overriding Currently, it could be a little bit hacky since there's no way for users to provide customized connectors to |
I added the I reverted some of the changes to Added Modified |
@luin let me know your thoughts :) |
Awesome work! As you said, that changes made on |
}); | ||
} | ||
|
||
} |
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.
I suggest moving this file to the examples
folder since most users don't need it, and it trivial to implement one. What do you think?
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.
👍 now I just need to find why the tests fail
@@ -12,6 +12,7 @@ services: | |||
- redis-server | |||
|
|||
script: | |||
- npm run build |
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.
Why npm run build
is needed here?
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.
test may have type errors like trying to access private properties, but the code itself is fine, so this guards against build time errors while the tests are for logical errors only.
I think I dug myself a deep hole trying to change the interface to promises. I haven't figured out how to run the tests locally either so I'm gonna need some assistance 😁 edit: scratch that... just went too far with the cleanup |
@luin I've noticed that the ESLint doesn't quite run in some parts of the code, fixing it by adding |
@imatlopez That would be great! And Prettier is also my favorite :-) |
# [4.11.0](v4.10.4...v4.11.0) (2019-06-25) ### Features * support custom connectors ([#906](#906)) ([bf3fe29](bf3fe29))
🎉 This PR is included in version 4.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [4.11.0](redis/ioredis@v4.10.4...v4.11.0) (2019-06-25) ### Features * support custom connectors ([#906](redis/ioredis#906)) ([bf3fe29](redis/ioredis@bf3fe29))
Made the SentinelIterator and actual Iterator
and made it not affect(tests were there to test the side effect).this.options.sentinels
in placeAdded
floatingSentinels
to theSentinelConnectorOptions
which is called wheneverconnect
is called, it must return an array of sentinels using a callback.Welcome any feedback :)
resolves #903 for Sentinel at least :)