diff --git a/src/lib/env.js b/src/lib/env.js index fbb26bc..6de81b2 100644 --- a/src/lib/env.js +++ b/src/lib/env.js @@ -40,6 +40,14 @@ module.exports = function envFactory() { return newContext; } + function aliasesDeprecationNotice() { + if (aliasesDeprecationNotice.called) { + return; + } + console.warn('$aliases is deprecated and will be removed in common-env v7. More info at http://bit.ly/2bRSMN3'); + aliasesDeprecationNotice.called = true; + } + function getOrElseAll(object, topContext) { topContext = topContext || createContext(); @@ -131,6 +139,8 @@ module.exports = function envFactory() { } if (_.isUndefined(config.$aliases)) { config.$aliases = []; + } else { + aliasesDeprecationNotice(); } // if `$type` is specified it will be used as a type checker and converter, otherwise infer the type from ``$default`