Skip to content

hapi 13.5.1 (and 13.5.2) break if routes still use joi 8.x #3271

@rluba

Description

@rluba

I suddenly got lots of test timeouts when upgrading from hapi@13.5.0 to 13.5.1 (or 13.5.2). Looking at hapi’s diff, I noticed that it now depends on joi@9.x.

Using joi@8.x validation objects on routes with hapi@13.5.1 causes all malformed requests that previously returned 400 errors to suddenly time out instead of returning any response. So if you declare your dependencies using the default NPM semver ranges, you got yourself a broken app as soon as 13.5.1 was released:

  "dependencies": {
    "hapi": "^13.5.0",
    "joi": "^8.0.0"
…
  }

Upgrading the root dependency of joi solves the problem and all malformed requests return 400 with validation errors again:

  "dependencies": {
    "hapi": "^13.5.0",
    "joi": "^9.0.0"
…
  }

Therefore I’d consider the 13.5.1 changeset to be a breaking change => should be a major release.

Metadata

Metadata

Assignees

Labels

breaking changesChange that can breaking existing code

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions