ember.js
ember.js copied to clipboard
Ember.A should not modify underlying array
Resolves #20219
@wagenet note that "Extend Prototypes" is failing on CI.
I think I'd like to put this behind a flag. I think (hope) it won't cause issues for people, but who knows what people are actually doing and whether they're relying on the mutating behavior.
I agree that it should go behind a flag. Because many addons call A() on basically everything there are probably lots of components in production today that pass something through an addon helper such as {{map-by "id" this.posts}} and then rely on some prototype pollution elsewhere in a getter or action without realizing that the template code had modified the original this.posts. Being able to opt into this change seems like a good way to find out where the breaks are outside of the full deprecation in https://github.com/emberjs/rfcs/pull/864
@wagenet I'm working on pushing tracked-built-ins to recommended and saw this PR. Is this something we still want to push forward?
@locks This was partially motivated by issues Ember Data was having. @runspired what's the status of that stuff?
still needed. iirc the solution for most has been to turn prototype extensions back on
Is this still relevant?
@kategengler I believe so
@wagenet should we merge then?
@kategengler I would like to and it is flagged so it should be safe. That said, I haven't really gotten a proper review from anyone still.
@kategengler I would like to and it is flagged so it should be safe. That said, I haven't really gotten a proper review from anyone still.
I don't have a clue here or I would offer you one :) I'm just triaging PRs.
can this be rebasod?