Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve WHATWG spec titles from WHATWG database #1666

Merged
merged 3 commits into from
Jan 24, 2025
Merged

Retrieve WHATWG spec titles from WHATWG database #1666

merged 3 commits into from
Jan 24, 2025

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Jan 24, 2025

Build code used to rely on Specref to get the title of WHATWG specifications. This update makes it fetch info for WHATWG specs from the WHATWG database directly. To save one request, the code leverages the workstreams database, also used by fetch-groups, instead of the biblio file.

On top of adding a new whatwg value to the "source" field, this update will also fix the titles of the WHATWG specs: they end with "Standard" in Specref but, while that matches the <title> tag, the actual spec title in the <h1> and the title in the WHATWG database don't end with "Standard". #docallmeDOM

The update turns the fetchJSON function into a utility function. This is going to save a few requests (not that many!) that are common between fetch-info and fetch-groups. Specific functions in fetch-info were also adjusted not to do anything when there are no specs of interest in the list (this speeds up tests a bit, but has no impact on a full build since, by definition, there are specs of interest in the full list...)

Build code used to rely on Specref to get the title of WHATWG specifications.
This update makes it fetch info for WHATWG specs from the WHATWG database
directly. To save one request, the code leverages the workstreams database,
also used by fetch-groups, instead of the biblio file.

On top of adding a new `whatwg` value to the `"source"` field, this update will
also fix the titles of the WHATWG specs: they end with "Standard" in Specref
but, while that matches the `<title>` tag, the actual spec title in the `<h1>`
and the title in the WHATWG database don't end with "Standard". #docallmeDOM

The update turns the `fetchJSON` function into a utility function. This is
going to save a few requests (not that many!) that are common between
fetch-info and fetch-groups. Specific functions in fetch-info were also
adjusted not to do anything when there are no specs of interest in the list
(this speeds up tests a bit, but has no impact on a full build since, by
definition, there are specs of interest in the full list...)
@tidoust tidoust requested a review from dontcallmedom January 24, 2025 09:25
Copy link
Member

@dontcallmedom dontcallmedom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor suggested improvement; very nice code clean up overall!

src/fetch-json.js Outdated Show resolved Hide resolved
src/fetch-json.js Outdated Show resolved Hide resolved
tidoust and others added 2 commits January 24, 2025 11:39
Co-authored-by: Dominique Hazael-Massieux <[email protected]>
Co-authored-by: Dominique Hazael-Massieux <[email protected]>
@tidoust tidoust merged commit 04e8c41 into main Jan 24, 2025
1 check passed
@tidoust tidoust deleted the fetch-whatwg branch January 24, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants