Hapi: 20.0.0 Release Notes

Created on 10 Aug 2020  Â·  12Comments  Â·  Source: hapijs/hapi

Summary

hapi v20.0.0 is a small release with few code changes. The major version bump is due to a change in project leadership and governance. The @hapi/joi dependency has also been replaced with @hapi/validate. Finally, hapi v20 is now tested on Node 14 in Travis CI.

  • 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: low - small number of changes with simple ways to retain previous behavior in most cases
  • Dependencies: low - existing plugins will work as-is

Breaking Changes

  • Eran Hammer has stepped down as the hapi lead maintainer. A group of former maintainers has stepped up to take over the project, and has formed a Technical Steering Committee (TSC) to govern the project (#4111, #4113, #4114).

New Features

  • An isInjected property has been added to the request object to indicate if the request was created via the inject() method (https://github.com/hapijs/hapi/pull/4117).

Bug fixes

  • Content-Type response headers whose value is null are no longer sent (https://github.com/hapijs/hapi/pull/4134).
  • The server timeout and the payload timeout are no longer required to be less than the socket idle timeout (https://github.com/hapijs/hapi/pull/4123).

Other Notable Changes

  • The @hapi/joi module and joi-specific dependencies have moved out of the hapijs GitHub organization. joi has been replaced by @hapi/validate, a slimmed down version of joi designed specifically for hapi's internal needs only. hapi will continue to support joi for users' validation purposes (#4115, https://github.com/sideway/joi/issues/2411).
  • All core modules are now tested on Node 14, in addition to Node 12. This is in preparation for Node 14 entering Long Term Support (LTS) in October.

Migration Checklist

hapi v20 should largely be a drop-in replacement for current hapi v19 users. If you experience issues during the upgrade process, please open an issue.

breaking changes release notes

Most helpful comment

Congrats!

All 12 comments

The release is out. 🎉

Congrats!

finally wait for you. @cjihrig when to update docs website?

It looks like the website is updated - https://hapi.dev/api?v=20.0.0. If something isn't right, please open an issue at https://github.com/hapijs/hapi.dev

@cjihrig many hapijs module, something like bell still use joi, i have no time to open issues one by one. please update those module.

The core modules have been migrated off of joi. Some plugins have been migrated as well, but it is not a goal to remove joi from all non-core modules.

why

hapi has historically had a policy of no external dependencies in the core project. When joi left the hapi org, we wanted to keep that policy. That policy does not (and never did) apply to plugins.

joi is still fine to use, and has more features than @hapi/validate. validate is just a slimmed down version of joi for hapi's internal purposes.

i don't like joi and validation live in core module at the same, please

Probably should update the changelog: https://hapi.dev/resources/changelog/

Issue is we burned through the build minutes but I am looking at another strategy to reduce the build time.

I was able to get around the issue with some tweaks. This link now has the latest notes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeremiahlee picture jeremiahlee  Â·  4Comments

shamsher31 picture shamsher31  Â·  5Comments

AdriVanHoudt picture AdriVanHoudt  Â·  5Comments

leore picture leore  Â·  3Comments

taoeffect picture taoeffect  Â·  3Comments