-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Describe the problem you are trying to fix (provide as much context as possible)
I'm working on a fork(ish) of a module that has been put into "stasis," meaning that it is stable but will not receive any updates beyond security fixes. Part of my fork is an effort to update the codebase and redefine options. However, I'd like to maintain a compatibility layer for the upstream options set. The kick is that I'd also like to mark those upstream options as deprecated so users of the fork move to the redefined options for a smooth transition.
It occurred to me that joi might be a good place for consolidating that kind of check. So I bring this idea to you all for feedback.
Which API (or modification of the current API) do you suggest to solve that problem ?
Perhaps a deprecated() method could be introduced. That could produce messaging, or return a particular error+code for handling deprecated options.
Are you ready to work on a pull request if your suggestion is accepted ?
Absolutely. But I'd like to get some feedback before I dive in.