-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Version 8.5.0 fails with ssl: true #2406
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
Comments
uhhh that's not good I'm sorry about that. Lemme see if I can repro & get a patch out. |
I'm not able to reproduce - could you expand the code example a bit more? |
Hmm, strange - will try. |
Is it possible you're passing the string |
Yes, I just came to that conclusion too - I was indeed passing the string, which worked in v8.4.2, but doesn't in v8.5.0. I think this is probably working as expected though. The reason that I ended up passing the string instead of the boolean is rather convoluted, but essentially I was setting it as an environment variable which was then being passed directly through as a string. I can easily fix my code, but this does seem like a breaking change. |
yeah i will try to coerce it to a bool lemme see if i can do that |
fix here |
Nice one, thanks for the super quick response and fix. Apologies for the scare! |
no, no problem. you're right it's a subtle backwards compat break - strings being coerced to booleans and all that is hard to catch every edge case. Got a regression test for it going forward though. |
once the tests pass i'll push a new patch version out |
Great stuff, thanks again! Yeah, what js dev hasn't been caught out by something like this at some point!? |
Might be nice to avoid supporting non-libpq strings in a future major version, since |
Right. I agree supporting |
I guess it probably wasn't a conscious design choice as such, just something that happened to work... I wouldn't object to support for the string value being removed (but might be nice to have an 'invalid value' error to make it easier to track down resulting issues). |
yeah, any time we actually intentionally remove anything we go through a formal and somewhat drawn out deprecation w/ warning period first. A semver minor we'd never intentionally make anything not backwards compatible. It's just...as you saw...kinda difficult to catch everything because javascript is so flexible and sometimes a bit cray cray. 🙃 |
Sounds good @brianc, thanks again for your help. Don't worry, I completely understand how these things easliy creep in! It's difficult to predict all the obscure ways that users like me will end up relying on javacript magic to abuse your package's interface... |
same problem persists for require as have to pass require as non-string |
I'm trying to use a connection with the following configuration in
pg
v8.5.0but I get the following error:
Node v14.15.0. Using
pg
v8.4.2 is fine.The text was updated successfully, but these errors were encountered: