koajs / joi-router

Configurable, input and output validated routing for koa
MIT License
450 stars 96 forks source link

Migrate from `@hapi/joi` to `joi` #111

Closed 3imed-jaberi closed 3 years ago

3imed-jaberi commented 3 years ago

@hapi/joi has been deprecated. as you can see here.

fix #99 ++ #103

3imed-jaberi commented 3 years ago

@aheckmann, can you take a look here 👀!

3imed-jaberi commented 3 years ago

ping @niftylettuce @dead-horse @jonathanong

niftylettuce commented 3 years ago

Just pinged for npm access

3imed-jaberi commented 3 years ago

@niftylettuce, Meanwhile you can close this PRs #103, #105 and merge this also #112 and you can take look here #108 😅!

niftylettuce commented 3 years ago

done

niftylettuce commented 3 years ago

seems like a test is failing @3imed-jaberi

  312 passing (3s)
  1 failing

  1) koa-joi-router
       validation
         of body
           when invalid data is submitted
             and validate.continueOnError is true
               and an error is thrown in route
                 does not catch it:
     Error: expected 'child "name" fails because ["name" length must be at least 10 characters long]' response body, got '"name" length must be at least 10 characters long'
      at error (node_modules/supertest/lib/test.js:301:13)
      at Test._assertBody (node_modules/supertest/lib/test.js:218:14)
      at Test._assertFunction (node_modules/supertest/lib/test.js:283:11)
      at Test.assert (node_modules/supertest/lib/test.js:173:18)
      at Server.localAssert (node_modules/supertest/lib/test.js:131:12)
      at emitCloseNT (net.js:1655:8)
      at processTicksAndRejections (internal/process/task_queues.js:83:21)
3imed-jaberi commented 3 years ago

@niftylettuce, I think the case here is fine because all tests are passed both locally and in the CI of this PR. ~I will check every thing in the project and see what I can do (maybe the merge operation with others PRs) ..~ #114

niftylettuce commented 3 years ago

v7.0.0 released https://github.com/koajs/joi-router/releases/tag/v7.0.0