clarkie/dynogels

Update joi dependency to use @hapi/joi

jogee opened this issue · 6 comments

jogee commented

Would it make sense to update the 'joi' dependency to use '@hapi/joi' instead which is forked from the original project. The former also depends on older versions of hoek/topo.

If you guys think it's a good idea I can try to submit a pull request.

After upgrading to hapi/joi 16, dynogles is broken.

hapijs/joi#2037

module initialization error: Error
at Object.exports.assert (/var/task/node_modules/hoek/lib/index.js:740:11)
at Object.exports.schema (/var/task/node_modules/joi/lib/cast.js:55:10)
at internals.Object.keys (/var/task/node_modules/joi/lib/types/object/index.js:352:35)
at Object.exports.schema (/var/task/node_modules/joi/lib/cast.js:36:29)
at internals.Object.keys (/var/task/node_modules/joi/lib/types/object/index.js:352:35)
at Object.exports.schema (/var/task/node_modules/joi/lib/cast.js:36:29)
at internals.Alternatives.try (/var/task/node_modules/joi/lib/types/alternatives/index.js:77:31)
at Object.exports.schema (/var/task/node_modules/joi/lib/cast.js:25:42)
at internals.Object.keys (/var/task/node_modules/joi/lib/types/object/index.js:352:35)
at Joi.validate (/var/task/node_modules/dynogels/lib/schema.js:121:71)

Yes, this is something we should do. Joi is not maintained with the old module name.

nolde commented

Could we try at least moving it to the largest one NOT under @hapi/joi ? Is this moving forward?

nolde commented

I've made a fork of dynogels and published it to npm.

https://www.npmjs.com/package/@digitalmaas/lambdogels

This is a fork of v9.1.0 (ignoring larger changes in master) upgrading joi, uuid and lodash, and adding execAsync.

Looks like they migrated back to the old name. There is no reason to switch anymore.

nolde commented

There is still a reason to upgrade. There are breaking changes in joi, and dynogels is stuck in time.

Anyway, I made my own copy, so all good.