mharris717 / ember-cli-pagination

Pagination Addon for Ember CLI
MIT License
273 stars 116 forks source link

Remove use of prototype extensions #162

Open runspired opened 8 years ago

runspired commented 8 years ago

Ember addons which use prototype extensions break in apps which don't.

This may not be the only place they are in use, but it's one: https://github.com/mharris717/ember-cli-pagination/blob/master/addon/local/paged-array.js#L19-L23

broerse commented 8 years ago

You have a point. Do you know how we can set EmberENV.EXTEND_PROTOTYPES = false; in tests?

runspired commented 8 years ago

All you need to do is use the addon.

npm install --save-dev ember-disable-prototype-extensions.

You can replace computed properties with Ember.computed(...keys, method),

broerse commented 8 years ago

Yes I saw that but like to test with and without. Will take a closer look.

runspired commented 8 years ago

If you have the addon setup to work without prototype extensions, it will work with them as well. You don't need to test both scenarios.

mharris717 commented 8 years ago

the setting is easy in the addon as well

mharris717 commented 8 years ago

Have a PR almost ready for this

broerse commented 8 years ago

Nice!

broerse commented 8 years ago

@runspired applied @mharris717 PR to switch to ember-cli 2.7.0 and remove bindings. @runspired can you test this?