clarkie / dynogels

DynamoDB data mapper for node.js. Originally forked from https://github.com/ryanfitz/vogels
Other
491 stars 110 forks source link

Update joi dependency to use @hapi/joi #188

Closed jogee closed 3 years ago

jogee commented 4 years ago

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.

bkatbeh commented 4 years ago

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

https://github.com/hapijs/joi/issues/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)

cdhowie commented 4 years ago

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

nolde commented 4 years ago

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

nolde commented 3 years ago

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.

cdhowie commented 3 years ago

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

nolde commented 3 years ago

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.