Skip to content
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

[FEAT] Adding deprecate-merge codemod for 3.6 #23

Merged
merged 2 commits into from
Oct 1, 2019

Conversation

rajasegar
Copy link
Contributor

@rajasegar rajasegar commented Sep 29, 2019

#21
Ember.merge predates Ember.assign, but since Ember.assign has been released, Ember.merge has been mostly unnecessary. To cut down on duplication, we are now recommending using Ember.assign instead of Ember.merge.
ember-polyfills.deprecate-merge

Before

import { merge } from '@ember/polyfills';

var a = { first: 'Yehuda' };
var b = { last: 'Katz' };
merge(a, b); // a == { first: 'Yehuda', last: 'Katz' }, b == { last: 'Katz' }

After

import { assign } from '@ember/polyfills';

var a = { first: 'Yehuda' };
var b = { last: 'Katz' };
assign(a, b); // a == { first: 'Yehuda', last: 'Katz' }, b == { last: 'Katz' }

Before merge :

@kellyselden kellyselden changed the title [FEAT] Adding deprecate-merge codemod for 3.6 WIP [FEAT] Adding deprecate-merge codemod for 3.6 Sep 30, 2019
@kellyselden kellyselden changed the title WIP [FEAT] Adding deprecate-merge codemod for 3.6 [FEAT] Adding deprecate-merge codemod for 3.6 Oct 1, 2019
@kellyselden kellyselden merged commit d43451c into ember-cli:v3 Oct 1, 2019
@kellyselden
Copy link
Member

Live! Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants