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

[maybe breaking] Stop using Ember.A() #435

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrjohnson
Copy link
Contributor

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.

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

unfortunately Array.at() does not yet have universal support so I've
added a polyfill for that copied from the TC39 proposal.
@sly7-7
Copy link

sly7-7 commented Oct 11, 2022

@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

@jrjohnson
Copy link
Contributor Author

@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.

@sly7-7
Copy link

sly7-7 commented Oct 12, 2022

@jrjohnson This makes sense, thanks a lot.

@jrjohnson
Copy link
Contributor Author

@snewcomer I see you did the last release here, are you the right person to ping to get this merged?

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