Skip to content

Commit b4ca8e4

Browse files
Bump webidl2 from 24.4.1 to 24.5.0 (#2590)
1 parent df6d159 commit b4ca8e4

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"sinon": "21.0.0",
137137
"typescript": "5.8.3",
138138
"typescript-eslint": "^8.38.0",
139-
"webidl2": "24.4.1",
139+
"webidl2": "24.5.0",
140140
"yaml": "2.8.0"
141141
}
142142
}

test-builder/api.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ describe("build (API)", () => {
660660
const ast = WebIDL2.parse(
661661
`[Exposed=Window]
662662
interface ReadableStream {
663-
async iterable<any>;
663+
async_iterable<any>;
664664
};`,
665665
);
666666
assert.deepEqual(await buildIDLTests(ast, [], scopes), {
@@ -683,7 +683,7 @@ describe("build (API)", () => {
683683
const ast = WebIDL2.parse(
684684
`[Exposed=Window]
685685
interface AsyncMap {
686-
async iterable<DOMString, any>;
686+
async_iterable<DOMString, any>;
687687
};`,
688688
);
689689
assert.deepEqual(await buildIDLTests(ast, [], scopes), {

test-builder/api.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ const flattenMembers = (iface) => {
213213
members.push({name: iface.name, type: "constructor"});
214214
break;
215215
case "iterable":
216-
if (member.async) {
216+
case "async_iterable":
217+
if (member.async || member.type === "async_iterable") {
217218
// https://webidl.spec.whatwg.org/#idl-async-iterable
218219
members.push(
219220
{name: "@@asyncIterator", type: "symbol"},
@@ -404,10 +405,13 @@ const getExposureSet = (node, scopes): Set<Exposure> => {
404405
const validateIDL = (ast) => {
405406
const validations = WebIDL2.validate(ast).filter((v) => {
406407
// Ignore the [LegacyNoInterfaceObject] rule.
407-
// XXX Also temporarily ignore the "[AllowShared] BufferSource -> AllowSharedBufferSource" rule until specs are fixed.
408-
return !["no-nointerfaceobject", "migrate-allowshared"].includes(
409-
v.ruleName,
410-
);
408+
// Also ignore the "async iterable -> async_iterable" rule until specs are fixed.
409+
// Also ignore the rule that dictionary arguments without required fields must be marked optional (until the RTC spec is fixed)
410+
return ![
411+
"no-nointerfaceobject",
412+
"obsolete-async-iterable-syntax",
413+
"dict-arg-optional",
414+
].includes(v.ruleName);
411415
});
412416
if (validations.length) {
413417
const message = validations

0 commit comments

Comments
 (0)