ember-composable-helpers
ember-composable-helpers copied to clipboard
[maybe breaking] Stop using Ember.A()
Changes proposed in this pull request
Ember's Array prototype extensions are being deprecated soon, and Ember Data has already deprecated them. As part of Ember Data's deprecation work calling Ember.A on a PromiseMany has been deprecated so removing any calls to this on passed values in composable helpers is needed.
For the most part the usage of Ember.A here were replaced with native Array.includes which is supported everywhere but IE 11. This dropping of IE 11 support is why I marked this PR as breaking even though nothing in the API surface changed.
Unfortunately Array.at() does not yet have universal support so I've added a polyfill for that copied from the TC39 proposal.
@jrjohnson Do you think you could also remove this toArray call call, since ember-data deprecates its usage ? The `toArray` method on the class ManyArray is deprecated.
🤔 Maybe this has to be an other PR
@sly7-7 I think that probably needs it's own PR because there are a bunch of calls to toArray
scattered around and I'm not sure which ones can just be slice
. Some of it may conflict with this change though, so this probably needs to get merged first. Once that is done though I'm happy to take a pass at removing toArray
everywhere and it can go into the same breaking release as this.
@jrjohnson This makes sense, thanks a lot.
@snewcomer I see you did the last release here, are you the right person to ping to get this merged?