From df30373c59f09a40afae10bee6d1e7658742ca9d Mon Sep 17 00:00:00 2001 From: Dominique Hazael-Massieux Date: Wed, 1 Mar 2023 16:47:01 +0100 Subject: [PATCH 1/2] Upgrade reffy version used in WebIDL validation --- src/validate-webidl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validate-webidl.ts b/src/validate-webidl.ts index 40d3c67..778e967 100644 --- a/src/validate-webidl.ts +++ b/src/validate-webidl.ts @@ -14,7 +14,7 @@ if (module === require.main) { export default async function main({ dest, file }: Input) { console.log(`Validating Web IDL defined in ${file}...`); - await install("reffy@4"); + await install("reffy@12"); const { crawlSpecs } = require("reffy"); const fileurl = new URL(file, `file://${dest}/`).href; From 36f3ca9fd9251da9fa9b9f1a30366664f3f27017 Mon Sep 17 00:00:00 2001 From: Francois Daoust Date: Thu, 11 Apr 2024 15:08:27 +0200 Subject: [PATCH 2/2] Bump Reffy to v15 and adjust code The only breaking change that affects Web IDL validation is the separation between the `idl` and `idlparsed` modules in v6.0.0, which made the extracted IDL available under a different path in the result. A couple of minor improvements have been made to IDL extraction but no other substantive change that would require updating the code. --- src/validate-webidl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/validate-webidl.ts b/src/validate-webidl.ts index 778e967..86d5ca3 100644 --- a/src/validate-webidl.ts +++ b/src/validate-webidl.ts @@ -14,7 +14,7 @@ if (module === require.main) { export default async function main({ dest, file }: Input) { console.log(`Validating Web IDL defined in ${file}...`); - await install("reffy@12"); + await install("reffy@15"); const { crawlSpecs } = require("reffy"); const fileurl = new URL(file, `file://${dest}/`).href; @@ -24,7 +24,7 @@ export default async function main({ dest, file }: Input) { ); await rm(".cache", { recursive: true, force: true }); - const idl = results[0]?.idl?.idl; + const idl = results[0]?.idl; if (!idl) { exit("No Web IDL found in spec, skipped validation", 0); }