From 02496fdb9902534c2c8be5888ad1f51d1e993dc5 Mon Sep 17 00:00:00 2001 From: Dominique Hazael-Massieux Date: Mon, 13 Dec 2021 17:37:24 +0000 Subject: [PATCH] Handle situation where a WHATWG workstream has multiple standards (#450) now the case with WebSockets part of the html workstream --- src/find-specs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/find-specs.js b/src/find-specs.js index bc7fde53..b108d330 100644 --- a/src/find-specs.js +++ b/src/find-specs.js @@ -85,7 +85,7 @@ const hasPublishedContent = (candidate) => fetch(candidate.spec).then(({ok, url} const {groups, repos} = await fetch("https://w3c.github.io/validate-repos/report.json").then(r => r.json()); const specRepos = await fetch("https://w3c.github.io/spec-dashboard/repo-map.json").then(r => r.json()); const whatwgSpecs = await fetch("https://raw.githubusercontent.com/whatwg/sg/master/db.json").then(r => r.json()) - .then(d => d.workstreams.map(w => { return {...w.standards[0], id: w.id}; })); + .then(d => d.workstreams.map(w => w.standards.map(s => { return {...s, id: s.href.replace(/.*\/([a-z]+)\.spec\.whatwg\.org\//, '$1')}; }) ).flat()); const cssSpecs = await fetch("https://api.github.com/repos/w3c/csswg-drafts/contents/").then(r => r.json()).then(data => data.filter(p => p.type === "dir" && !cssMetaDir.includes(p.path)).map(p => p.path)); const svgSpecs = await fetch("https://api.github.com/repos/w3c/svgwg/contents/specs").then(r => r.json()).then(data => data.filter(p => p.type === "dir" && !svgMetaDir.includes(p.name)).map(p => p.path)); const fxtfSpecs = await fetch("https://api.github.com/repos/w3c/fxtf-drafts/contents/").then(r => r.json()).then(data => data.filter(p => p.type === "dir" && !fxtfMetaDir.includes(p.path)).map(p => p.path));