Skip to content

Releases: jsdom/webidl2js

7.0.0

14 May 19:48
Compare
Choose a tag to compare

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 Dates and RegExps 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

29 Apr 23:05
Compare
Choose a tag to compare

Adds support for the [SameObject] attribute. Implementation classes can simply have a getter that returns the correct value, and webidl2js will take care of the caching automatically. (@Zirro)

6.0.3

29 Apr 23:03
Compare
Choose a tag to compare

Fixes a bug introduced in v6.0.0 with zero-argument constructors.

6.0.2

29 Apr 23:03
Compare
Choose a tag to compare

Fixes a bug introduced in v6.0.0 with zero-argument operations.

6.0.1

29 Apr 15:29
Compare
Choose a tag to compare

Fixes a bug in the inheritance code introduced in v6.0.0.

6.0.0

29 Apr 15:08
Compare
Choose a tag to compare

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

29 Apr 15:09
Compare
Choose a tag to compare

Updates the webidl-conversions dependency to v4.0.0, for better compatibility with the rest of the jsdom ecosystem.

5.1.0

29 Apr 15:11
Compare
Choose a tag to compare

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.