Release date: April 15th, 2021
- 'typings' field updated in package.json file (See issue #86).
Release date: September 18th, 2018
- Fixed a bug in
Reflect.constructwhere, if the optionalnewTargetargument was passed, the shim would call thenewTargetconstructor function rather than thetargetconstructor (See issue #81).
Release date: February 22nd, 2017
- The
Reflectglobal is no longer blindly overridden. IfReflectglobal exists when this library is loaded, all standardReflectmethods are overridden with this shim's implementations, but any other methods defined on theReflectglobal are left intact (See issue #79).
Release date: December 23rd, 2016
package.jsonfile now containslicensefield with SPDX expression.
Release date: August 17th, 2016
- Added missing proxy invariant checks in getOwnPropertyDescriptor, defineProperty and deleteProperty traps.
- Add typings for Reflect for TypeScript users.
Release date: April 19th, 2016
- ES6
Object.assign(...args)would fail when one of the arguments is a Proxy object. PatchedObject.assignto fall back on an ES5 shim when at least one of the arguments is a Proxy object (See issue #72).
Release date: April 5th, 2016
- Patched
Object.getOwnPropertySymbols(proxy)to always return[](only if the ES6 globalObject.getOwnPropertySymbolsexists). Symbols are not supported by this shim, but at least this patch stops code that tries to get the own symbol-valued properties of a proxy from crashing. (See issue #71).
Release date: March 19th, 2016
- Minor bugfix in
Reflect.construct(). - Removed deprecation notice when unpatched
Object.getOwnPropertyNames(proxy)used in external modules would still trigger the oldgetOwnPropertyNamestrap (See issue #66).
Release date: March 17th, 2016
Reflect.construct()now works on ES6 classes (See issue #69).- The patched
__proto__set accessor now converts the argument prototype to an Object. This fixes issue #67 (tab-completion in node.js no longer crashes when this module is loaded).
Release date: August 30th, 2015
- This library now leaves the
Proxyglobal untouched (rather than overwriting it with a dummy function) if it exists but does not implement the old Proxy API (such as IE Edge). See issue #59. - Clarified incompatibility of this library with ES6 Symbols in the README.
Release date: July 2nd, 2015
- The patched
Proxyobject exported by this library now leaves the oldProxy.createandProxy.createFunctionuntouched, so old code that needs it can still use it. Also, this makes the library robust against multiple versions of itself being loaded. See issue #56.
Release date: June 21st, 2015
- The
Proxyobject is only patched ifProxy.createexists.
Release date: May 28th, 2015
New features:
Object.definePropertiesis patched and will trigger thedefinePropertytrap when called on a proxy. See issue #51.
Bugfixes:
Object.defineProperty(o,p,desc)now returnso(as per ES5 spec) rather than a boolean success value.
Release date: May 20th, 2015
Minor changes:
- Calling the unpatched, native
Object.getOwnPropertyNamesmethod on a proxy now redirects to that proxy'sownKeystrap rather than failing with a TypeError. See issue #48.
Release date: May 11th, 2015
Reflect.constructnow takes third optionalnewTargetparameter, as per ES6 draft April 3, 2015.
Release date: march 13th, 2015
Minor bugfix:
deletenow works on a proxy for a proxy (issue #46)
Release date: november 14th, 2014
Minor bugfixes:
Reflect.enumerate(aProxy)now works as intended (issue #43)- Patched
Object.freeze(obj)now returnsobjrather than a boolean (issue #42)
Release date: august 29th, 2014
Improved compliance with August 24, 2014 (Rev 27) ECMAScript 6th edition draft standard.
- Removed
Reflect.getOwnPropertyNamesand thegetOwnPropertyNamesproxy trap. UseReflect.ownKeysand theownKeystrap instead. Reflect.ownKeysnow returns an array of strings (rather than an ES6 iterator)ownKeystrap now checks various invariants previously checked by thegetOwnPropertyNamestrap.Object.keys(proxy)now triggersownKeystrap, which checks invariants, so the result ofObject.keys(proxy)is again reliable.
Warning: this version contains multiple backwards-incompatible changes compared to v0.0.13 to improve compatibility with the final ES6 spec. Changes compared to v0.0.13:
- Improved compliance with May 22 ECMAScript 6th edition draft standard.
- Removed deprecated Reflect methods and corresponding Proxy traps:
Reflect.hasOwnReflect.keysReflect.freezeReflect.sealReflect.isFrozenReflect.isSealedReflect.iterate
Reflect.getOwnPropertyNamesno longer marked deprecated (not yet reflected in the May 22 draft, but[[GetOwnPropertyNames]]should return as a built-in operation on objects and proxies).Reflect.enumerateand theenumeratetrap now return an ES6 iterator rather than an array.Reflect.ownKeysiterator uses new ES6 iterator protocol (next/done/value rather than next/StopIteration API).- Removed
Reflect.Proxy. Use the globalProxyinstead.