paulmillr / es6-shim

ECMAScript 6 compatibility shims for legacy JS engines
http://paulmillr.com
MIT License
3.11k stars 389 forks source link

Object.setPrototypeOf sham #281

Closed WebReflection closed 10 years ago

WebReflection commented 10 years ago

As discussed already in this thread here a cross browser/platform Object.setPrototypeOf that works reliably requiring reassignment of the same object, meaning external, non own objects, might not be upgraded if the engine was not compatible.

As sham, this does not require es6-shim as is.

ljharb commented 10 years ago

Could this also add an npm script for test-sham, that just runs the sham tests? Similarly, we should put all the sham tests in their own directory, and modify npm test so that it doesn't run the sham tests.

The end goal being, npm test would run npm run test-shim && npm run test-sham and the two tests would be able to be run independently.

WebReflection commented 10 years ago

OK, with this latest push tests are moved into test-sham and npm run test-sham as well as npm run lint-sham are green.

Other tests aren't affected, sorry for the messy back and forward but working with PR is never that straight forward experience.

Hope this is good.

ljharb commented 10 years ago

Thanks! (Ideally this would be freshly rebased on top of master :-) nothing's straightforward when you don't rebase)

WebReflection commented 10 years ago

it was removed already when I've written previous comment, it took a little while in travis though. Will double check anyway

WebReflection commented 10 years ago

damn it … I keep rebasing and it keeps bothering with unmerged changes … should be fine now