Skip to content

Commit

Permalink
Stop fetching info from Specref for WICG specs and W3C ED (#1633)
Browse files Browse the repository at this point in the history
This provides a more generic solution to #1606.

Browser-specs has become the main source for Specref for WICG specs and
W3C Editor's Drafts. The code no longer attempts to fetch info for these specs
from Specref as a result.

Tested locally, this will adjust a handful of spec titles (to match the actual
spec title, which seems good). Interestingly, it will also adjust a few WICG
entries for which the spec says the status is "Unofficial Draft", which will
also switch the standing for these specs to "pending". That seems good as well
although we may want to review these changes before we release a new version.
I propose to do that separately in any case. Specs in that category include:
Web Share Target API, preferCurrentTab, the CSS Parser API.

Note: Specref is still being used as source, mainly for WHATWG specs.
  • Loading branch information
tidoust authored Jan 13, 2025
1 parent e82e4b2 commit 3a9b29b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/fetch-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,14 @@ async function fetchInfoFromSpecref(specs, options) {
const browserSpecs = await browserSpecsResponse.json();
specs = specs.filter(spec => !browserSpecs[spec.shortname.toUpperCase()]);

const chunks = chunkArray(specs, 50);
// Browser-specs now acts as source for Specref for the WICG specs and W3C
// Editor's Drafts that have not yet been published to /TR. Let's filter out
// these specs to avoid a catch-22 where the info in browser-specs gets stuck
// to the that in Specref.
const filteredSpecs = specs.filter(spec =>
!spec.url.match(/\/\/(wicg|w3c)\.github\.io\//));

const chunks = chunkArray(filteredSpecs, 50);
const chunksRes = await Promise.all(chunks.map(async chunk => {
let specrefUrl = "https://api.specref.org/bibrefs?refs=" +
chunk.map(spec => spec.shortname).join(',');
Expand Down

0 comments on commit 3a9b29b

Please sign in to comment.