Skip to content

Commit

Permalink
Merge pull request #17833 from emberjs/bugfix/fix-set-computed-decorator
Browse files Browse the repository at this point in the history
[BUGFIX] Reverts the naming of setClassicDecorator externally
  • Loading branch information
rwjblue authored Apr 2, 2019
2 parents 4de058a + f12a727 commit e7ee0c7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/ember/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,20 @@ Ember._tracked = metal.tracked;
computed.alias = metal.alias;
Ember.cacheFor = metal.getCachedValueFor;
Ember.ComputedProperty = metal.ComputedProperty;
Object.defineProperty(Ember, '_setComputedDecorator', {
get() {
deprecate(
'Please migrate from Ember._setComputedDecorator to Ember._setClassicDecorator',
false,
{
id: 'ember._setComputedDecorator',
until: '3.13.0',
}
);

return metal.setClassicDecorator;
},
});
Ember._setClassicDecorator = metal.setClassicDecorator;
Ember.meta = meta;
Ember.get = metal.get;
Expand Down
6 changes: 6 additions & 0 deletions packages/ember/tests/reexports_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ moduleFor(
);
}
}

'@test Ember._setComputedDecorator is deprecated'() {
expectDeprecation(() => {
Ember._setComputedDecorator;
}, 'Please migrate from Ember._setComputedDecorator to Ember._setClassicDecorator');
}
}
);

Expand Down

0 comments on commit e7ee0c7

Please sign in to comment.