-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from elwayman02/br-depr
properly deprecate removed properties
- Loading branch information
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
import Model from 'ember-data/model'; | ||
import attr from 'ember-data/attr'; | ||
import { hasMany } from 'ember-data/relationships'; | ||
import { deprecate } from '@ember/application/deprecations'; | ||
import { computed } from '@ember/object'; | ||
|
||
export default Model.extend({ | ||
login: attr('string'), | ||
name: attr('string'), | ||
avatarUrl: attr('string'), | ||
|
||
members: hasMany('github-member', { inverse: null }), | ||
repositories: hasMany('github-repository') | ||
members: hasMany('github-member'), | ||
repositories: hasMany('github-repository'), | ||
|
||
githubUsers: computed('members.[]', function() { | ||
deprecate('The githubUsers property on the github-organization model has been deprecated. Please use the members property.', false, { id: 'ember-data-github.deprecated-model-props', until: '1.0.0' }); | ||
return this.get('members'); | ||
}), | ||
githubRepositories: computed('repositories.[]', function() { | ||
deprecate('The githubRepositories property on the github-organization model has been deprecated. Please use the repositories property.', false, { id: 'ember-data-github.deprecated-model-props', until: '1.0.0' }); | ||
return this.get('repositories'); | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters