Skip to content

Commit

Permalink
fix(env): added deprecation notice for $aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
FGRibreau committed Aug 23, 2016
1 parent af1a2b4 commit 6e1ec0a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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`
Expand Down

0 comments on commit 6e1ec0a

Please sign in to comment.