xogroup / felicity

Javascript object constructors and sample data based on Joi schema.
Other
111 stars 9 forks source link

upgrade joi version to 17 #154

Closed phpstudyone closed 3 years ago

phpstudyone commented 3 years ago

Description

Related Issue

Motivation and Context

Types of changes

Checklist:

WesTyler commented 3 years ago

Thanks so much! I'm taking a look at this now :)

WesTyler commented 3 years ago

I replaced the flat npm package with the native Node.js Array.prototype.flat method.

I've also updated the object key spacing linting to align with hapi standards, even though I have gotten used to the aligned colons.

I have a work in progress commit to do some general code cleanup around improvements Joi made, and to bring code coverage back up to 100%. I will wrap that commit up in the morning (my time zone :) ) and then will publish out v6.0.0

Thanks again for all of your hard work getting this update done!

phpstudyone commented 3 years ago

I replaced the flat npm package with the native Node.js Array.prototype.flat method.

I've also updated the object key spacing linting to align with hapi standards, even though I have gotten used to the aligned colons.

I have a work in progress commit to do some general code cleanup around improvements Joi made, and to bring code coverage back up to 100%. I will wrap that commit up in the morning (my time zone :) ) and then will publish out v6.0.0

Thanks again for all of your hard work getting this update done!

The flat function was added in node11. Using the native flat function will cause the node10 version to not work properly and prompt: flat is undefined

WesTyler commented 3 years ago

I think that's okay. Node@10 has been in maintenance mode for over a year and will be no longer supported at any level in a few weeks.

I'll specify the supported versions of Node.js in the package.json/README/release notes.

WesTyler commented 3 years ago

Also just to mention, Joi@17 is also using language syntax not supported in Node@10, so that will break in that environment anyways.