joi icon indicating copy to clipboard operation
joi copied to clipboard

18.0.0 Release Notes

Open Marsup opened this issue 1 year ago • 1 comments

Summary

joi v18.0.0 is a small maintenance release which goal is mainly to drop node v12 support by upgrading all the dependencies.

  • Upgrade time: low - no expected change in behavior
  • Complexity: low - no expected change in your code
  • Risk: medium - no major unit test had to change for this release, but a lot of dependencies changed
  • Dependencies: low - no changes to the extension system

Breaking Changes

  • Upgrade all modules (#2925)

Updated dependencies

  • address from v4.x to v5.x and changed to @hapi namespace
  • formula still in v3.x and changed to @hapi namespace
  • hoek from v10.x to v11.x
  • pinpoint still in v2.x and changed to @hapi namespace
  • topo from v5.x to v6.x
  • tlds added with v1.x

New Features

  • Support underscores in domains (https://github.com/hapijs/joi/issues/2630 - https://github.com/hapijs/address/pull/43)

Migration Checklist

Drop node.js v12

Check that you are using at least node v14.

Change in cidr option validation

cidr option passed to string().ip() is now validated differently and throws options.cidr must be one of required, optional, forbidden instead of options.cidr must be a string when you provide a bad cidr.

This change should not be a problem as it is usually a programmer's mistake which would have already been detected in joi v17.x. Unless you allow user input for this rule and rely on this message to detect a bad input.

Marsup avatar Mar 11 '23 16:03 Marsup