Releases: jsdom/webidl2js
7.0.0
This release welcomes @TimothyGu to the team! He's been doing phenomenal work, including most of the following:
Adds support for record<>
, sequence<>
, Promise<>
, and FrozenArray<>
types.
Adds better error messages for failed conversions.
Removes a leftover special-case that prevented conversion of Date
s and RegExp
s to dictionary types.
Properly throws a TypeError
when a value does not match the appropriate interface type; previously interface types were not type-checked.
Fixes the dictionary conversion to properly treat function objects as objects.
Updates iterators so that the iterable impl class will receive unwrapped impls for the key/value, instead of having to do unwrapping itself.
Makes it clear that non-pair iterators are not supported yet, instead of attempting to generate pair-iterator code for them.
Makes all symbol properties non-writable and non-enumerable (but configurable). This hides the impl symbol from Node.js's util.inspect()
function, and better matches the specification for @@toStringTag
and @@unscopables
.
Applies some minimal formatting to the output using prettier.
6.1.0
6.0.3
6.0.2
6.0.1
6.0.0
Now requires Node.js v6 and above, as we've started using Symbol.toStringTag
and new.target
.
"Class strings" are now generated using Symbol.toStringTag
, which makes them work with Object.prototype.toString.call(wrapper)
. We use Chrome's semantics here, instead of those in the Web IDL specification, due to ongoing debate; see this Bugzilla bug.
Constructors now use new.target
to check that they're being called with new
, instead of using instanceof
, taking care of some edge cases.
Interface inheritance now correctly does class-side inheritance as well.
Bare stringifiers, with no identifier, now work correctly, instead of causing an error.
Useless argument-conversion code is no longer generated for zero-argument operations and constructors.
5.1.1
5.1.0
Adds a new nonstandard extended attribute, [WebIDL2JSFactory], which causes the output to be an interface factory function instead of just the interface. This is useful for certain cases in jsdom where the class must be aware of what window
it's declared on.
Adds initial support for iterable<>
declarations.