10.0.0 Release Notes
hueniverse opened this issue · comments
Summary
hapi v10.0.0 contains no breaking changes. It is published to indicate the transition from node v0.10 to node v4.0. Moving to v10.0.0 only requires upgrading your node version to the latest v4. Future releases of the hapi v10 branch will include internal changes to take advantage of the new features available in node v4 and those will break under node v0.10.
- Upgrade time: low - a couple of hours for most users for running tests
- Complexity: low - no code changes to existing hapi v9 users
- Risk: moderate - care should be taken moving to a new version of node for non-hapi code
- Dependencies: low - just node v4
I'm working through an upgrade from 9.0.2 to 10.5.0 and it does appear to have at least one breaking API change: "Uncaught error: callback is not a function stack: TypeError: callback is not a function" when going through basic authentication.
When you register a server.auth.strategy, the validateFunc parameters have changed.
Previously this worked:
validate = function (username, password, callback) {
But now the first parameter has changed, so you need this:
validate = function (request, username, password, callback) {
Thankfully the tutorial was updated which helped me track this down.
@katherine-barn2door this is caused by an update of https://github.com/hapijs/hapi-auth-basic not hapi (it is also the auth plugin used in the tutorial)
EDIT: the actual commit hapijs/basic@92b2e60
Huh. Thanks Adri.
Was that an huh as in facepalm or my explanation was not clear? :P
I will freely admit I'm still a JavaScript newb, even if I've been a dev for a decade. It was more of a "So it is" acknowledgement than a facepalm.
ah np glad I could help!
it appears to have some breaking changes #3051 (comment)
I haven't been able to spot it. for now I will be using v9