Skip to content
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

16.0.0 Release Notes #3398

hueniverse opened this issue Nov 30, 2016 · 0 comments

16.0.0 Release Notes #3398

hueniverse opened this issue Nov 30, 2016 · 0 comments


Copy link

@hueniverse hueniverse commented Nov 30, 2016


hapi v16.0.0 is a small size release focused on two changes to the request router and built-in validation engine. The validation change switched the bundled version of joi to v10 which contains two breaking changes (Joi.boolean() and The router change does not impact routing logic, but changes the way empty path parameters are reported (they are now included as empty strings).

  • Upgrade time: low - none to a couple of hours for most users
  • Complexity: low - requires following the list of changes to verifying their impact
  • Risk: medium - validation changes could cause boolean path and query parameters to fail if not updated
  • Dependencies: low - existing plugins will work as-is

Breaking Changes

  • Upgrade joi to version 10.0.1 which includes two breaking changes.
  • Upgrade call to version 4.0.0 which changes how empty path parameters are reported. This change includes as empty parameters strings in request.params and request.paramsArray when the path reaches the parameter. For example, /path/ matching /path/{x?} will now include { x: '' } in request.params, but /path will not include x.

New Features

  • Injection performance improvements (shot).
  • Events performance improvements (podium).

Bug fixes

  • Return non-Error error objects in plugin registration as promise rejection.
  • Fix performance issues with high load due to setImmediate() calls in podium.
  • Fix some promises exceptions in prerequisites.
  • Allow HTTPS long poll requests.
  • Prevent changes to Boom error objects passes as replies.
  • Preserve valid cookies when some with same name are invalid.

Updated dependencies

  • call from v3.0.3 to v4.0.0
  • ammo from v2.0.2 to v2.0.3
  • pez from v2.1.2 to v2.1.4
  • statehood from v5.0.0 to v5.0.1
  • accept from v2.1.2 to v2.1.3
  • content from v3.0.2 to v3.0.3
  • mime-db from v1.23.0 to v1.25.0
  • boom from v4.0.0 to v4.2.0
  • cryptiles from v3.0.2 to v3.1.1
  • joi from v9.0.4 to v10.0.1
  • shot from v3.3.2 to v3.4.0
  • podium from v1.2.3 to v1.2.5
  • heavy from v4.0.2 to v4.0.3
  • catbox from v7.1.2 to v7.1.3
  • catbox-memory from v2.0.3 to v2.0.4

Migration Checklist


The Joi.boolean() type no longer accepts anything other than true and false as valid values. This means that request path parameters and query parameters (which are always strings) will not be automatically cast into booleans. In the past, a=true would pass as true but this change breaks this behavior.

The rule is no longer supported.

Note: in hapi v16.1.0 this change was slightly rolled back. String literals of 'true' and 'false' will match boolean schemas when not using string mode.


  • Search your code for date().format() and if you find any, take a look at the new joi date extension.
  • Search your code for boolean() rules used in the route validation sections and rewrite those rules to Joi.boolean().truthy('true', 'yes', 1, '1').falsy('false', 'no', 0, '0') for full backwards compatibility. In practice, you can include just the string values you are expecting and supporting.


Empty path parameters will no longer be omitted from request.params when the path includes empty segments matching the parameters. If you code relies on request.params not containing keys for such empty cases, you will need to check if request.params[name] !== ''.


  • Search your code for routes with {optional?} or {wildcard*} parameters. For these routes, check your code for request.params and request.paramsArray and ensure it will properly handle empty strings.
@hueniverse hueniverse added this to the 16.0.0 milestone Nov 30, 2016
@hueniverse hueniverse self-assigned this Nov 30, 2016
@hueniverse hueniverse closed this Nov 30, 2016
zoe-1 added a commit to zoe-1/university-dev that referenced this issue Jan 5, 2017
upgraded to:
* [hapi v16 release](hapijs/hapi#3398)
* [joi v10 release ](sideway/joi#1037)
cilindrox added a commit to cilindrox/hapi-emitter that referenced this issue Jan 26, 2017
cilindrox added a commit to cilindrox/hapi-ratelimiter that referenced this issue Feb 1, 2017
Release notes: hapijs/hapi#3398

Closes #6
@lock lock bot locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant