-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove useless private api #4654
remove useless private api #4654
Conversation
@param {DS.Model} record the record to serialize | ||
@param {Object} options an options hash | ||
*/ | ||
serialize(record, options) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sly7-7 do you mind deprecating this instead of removing it? Just in case someone was using it.
Since this is a public facing change, I think this should be put behind a feature flag 🤔 @sly7-7 can you update this PR to also include a test for the deprecation? Merci beaucoup! |
@pangratz unless I'm missing something, this method is marked |
Basically you're right. But since we're introducing a public facing deprecation, I think it would be good to put this behind a feature flag. If we - despite being private - see that too many applications use this in the wild, we can simply disable the feature. I think the goal is to use feature flags for all public facing changes, even if they are very small. |
feature flag and test added 😄 |
@param {DS.Model} record the record to serialize | ||
@param {Object} options an options hash | ||
*/ | ||
serialize(record, options) { | ||
if (isEnabled('ds-deprecate-store-serialize')) { | ||
deprecate('Use of serialize is deprecated, use record.serialize instead.', false, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we be more explicit here and use Use of
store.serialize is deprecated, use ...
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no pb 😄
@@ -146,3 +146,6 @@ entry in `config/features.json`. | |||
} | |||
}); | |||
``` | |||
- `ds-deprecate-store-serialize` [#4654](https://github.com/emberjs/data/pull/4654) | |||
|
|||
Adds a deprecation warning when using Store#serialize method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also add a short sentence on what should be used instead. Just so people looking at the FEATURES.md
immediately know what this is about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks @sly7-7 for the quick response! Just one more tiny nitpick, then prefixing this commit with [FEATURE ds-deprecate-store-serialize]
and this is ready to go 🚀
@pangratz I'm a little bit 😞 this takes so much reviews. I hope this is ok now 😄 |
🎉 |
This follows #4637
cc @bmac