remove useless private api - #4654
Conversation
| @private | ||
| @param {DS.Model} record the record to serialize | ||
| @param {Object} options an options hash | ||
| */ |
There was a problem hiding this comment.
@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 😄 |
| */ | ||
| 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.
Can we be more explicit here and use Use of store.serialize is deprecated, use ... instead?
| ``` | ||
| - `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.
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.
|
@pangratz I'm a little bit 😞 this takes so much reviews. I hope this is ok now 😄 |
|
🎉 |
This follows #4637
cc @bmac