Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…onfig (#3113)
Description
Checklist
npm testpass with this change (including linting)?Note
Medium Risk
Changes public socket option types and documents TLS-related configs, but connection selection logic is unchanged and limited to typing plus tests.
Overview
Fixes TypeScript complaints for the common Heroku-style setup where
socket.tlsis a boolean (e.g. derived fromrediss:inREDIS_URL) and TLS fields likerejectUnauthorized: falseare set on the same object (#3113 / #3023).RedisTlsOptionsis reworked so TLS settings can sit alongside normal TCP connect options (noDelay,keepAlive,host,port, etc.) withtlsoptional/boolean, instead of requiring a literaltls: truediscriminator.RedisIpcOptionsno longer forcestls: falsewhen using a Unixpath. Several socket option types are exported for consumers and compile-time checks.The TLS socket factory typing is cleaned up (intersection of
tls.ConnectionOptionsandnet.TcpNetConnectOpts) so TCP defaults no longer need@ts-expect-error. Runtime behavior for opening TLS still keys offoptions.tls === true; newparseOptionsand types-tests lock in Heroku patterns andrediss://URLs with TLS options but no explicittlsflag.Reviewed by Cursor Bugbot for commit 4fbd0d7. Bugbot is set up for automated code reviews on this repo. Configure here.