Start Date Release Date Release Versions PR link Tracking Link Stage Teams
5/26/2021 11/15/2021
  • ember-source: v4.0.0
Recommended
  • Framework

Deprecate Ember.assign

Summary

Now that Ember is dropping support for IE11, we no longer need Ember.assign as a polyfill since Object.assign is available in all browsers that Ember v4.x supports (CanIUse, MDN).

Motivation

The polyfill is no longer necessary, as well as being another Emberism that can be removed. Apps and addons can use Object.assign or object destructuring depending on their browser support targets.

Transition Path

The transition path is relatively simple: apps that use Ember 4.x will replace Ember.assign with Object.assign, and apps and addons that use or support Ember 3.x can continue to use the polyfill if needed.

ex:

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

const assign = Object.assign || emberAssign;

How We Teach This

A descriptive deprecation message alerting a developer that Ember.assign is deprecated and can be replaced with Object.assign.

Drawbacks

The only drawback is replacing the polyfill assign with the native assign, but there is minimal effort to do this.

Alternatives

Doing nothing.

Unresolved questions

None.