-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Auth: createHash fix < v0.11.5 #757
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
Conversation
Thanks for working on this. Is there any way to do this via feature testing rather than version sniffing? |
@jas- can you come up with a way we can choose which |
I have experienced problems using An example is to use In regards to abandoning the version sniffing, I will have to look into it maybe some implementation of |
@jas- so I'm a bit out of touch with the details on this one, but if I understand things correctly, then we need to test if a new method is present to use it in favor of deprecated API, but the new method behaves differently in different versions, so we also need to test the behavior of this function (i.e. feed it a string that allows us to tell if it was interpreted as 'binary' or 'utf-8'). Does that make sense? If not, I'll look up the details and write a more intelligent response :) |
@felixge sounds good to me. So @jas- it sounds like you need to remove the version detection and do something like the The detection needs to basically do these things, it seems:
I'm not familiar with the node.js 0.11.x versions, but I assume that they are also incorporating those patches in there somewhere. For node.js 0.10, the test should not start passing until node.js 0.10.6. |
In the meantime, |
@dougwilson Yeah the matrix of tests I ran before I had to run out the door did omit the |
It's no problem! I don't think we could have expected you to possibly have tested "ancient" versions on node.js 0.10 :) Even Travis CI doesn't give us a way to test them (blargh). |
Here is the test matrix again using the checks for the newer hash stream methods. If Travis CI did have functionality to test Sorry about that, I should have done some more extensive tests. *v0.10.x tests
*v0.11.x tests
|
Awesome! The pass means the passing of the test suite, is that correct? |
👍 great team effort! :) |
@dougwilson Yeah, took forever on this vm with a gig of ram. +1 @sidorares |
So one question I have is that the test is now If you need to change and re-test, please rebase your change off commit 19a8a38 so a test for auth is included (it doesn't seen like there was any real auth test prior). |
@dougwilson Well that means that every test passed (against the 19a8a38 commit) and I didn't experience the original problem I described in issue #735. Which was for node versions I just re-ran the tests for the major versions that were affected and it seems it very well could have been my development environment was borked. I think you can simply revert my change to use the newer hash stream interface for the Well I feel dumb, sorry. |
@dougwilson I just confirmed that it must have been a borked development environment because I was seeing problems with the I just setup two new dev environments to confirm this. |
Thanks for all the research. For now I have just reverted it back to the "old-style" to remove the version sniffing it needs to switch between them. |
@dougwilson - could you publish v2.1.1 so that less new people with node 0.10.5 see the problem? |
@sidorares I was actually going to ask you guys if you thought so, since it seems important :) I'll publish 2.1.1 to npm within the hour. |
cool! since you and @jas- did all the job - let it be you who publish bugfix release :) Don't forget to move changelog head |
No problem. I have 544f8ef as an example ;) |
💖 thx guys |
@dougwilson Here is a grid of tests I just ran... you are correct <
v0.10.5
&v0.11.0
-v0.11.4
are a problem. With that in mind this pr will expand the check to accommodate the PATCH and only apply the newer hash functions for anything >v0.11.5
.Ref: #735