Skip to content

build(docs): pin hast-util-raw to 9.1.0 until doc-kit handles whitespace in table heads - #139

Merged
botandbang merged 1 commit into
mainfrom
bnb/docs-hast-raw-pin
Nov 7, 2026
Merged

botandbang merged 1 commit into
mainfrom
bnb/docs-hast-raw-pin

Conversation

@botandbang

Copy link
Copy Markdown
Contributor

The Docs build fails on main and on every Dependabot PR (failing run) with TypeError: Cannot read properties of undefined (reading 'map'). hast-util-raw 9.1.1 and 9.2.0, both published 2026-11-06, moved from parse5 7 to parse5 8. A table's thead now keeps the whitespace text nodes around its row, so its children are [text, tr, text]. doc-kit's react generator reads thead.children[0].children as the header row, which breaks on the table in docs/pages/translate.md. The repo has no lockfile, so every docs build resolved the new version.

This adds an npm override that pins hast-util-raw to 9.1.0, the last release on parse5 7. With it, a clean npm install --workspaces=false && npm run docs passes again, and the lint and types jobs pass as before. Upgrading @doc-kit/generator-react doesn't fix it: 0.5.3 has the same line and fails differently on this config. The override can go once doc-kit skips whitespace nodes in table heads.

…ace in table heads

hast-util-raw 9.1.1 and 9.2.0 moved to parse5 8, which keeps the
whitespace text nodes around a table's header row. doc-kit's react
generator reads thead.children[0] as the row, so the docs build now
throws on docs/pages/translate.md. The repo has no lockfile, so every
docs build picked up the new version, on main as well as in PRs.
@botandbang
botandbang merged commit fbc3574 into main Nov 7, 2026
39 checks passed
@botandbang
botandbang deleted the bnb/docs-hast-raw-pin branch November 7, 2026 18:31
@nodevu-ci nodevu-ci Bot mentioned this pull request Nov 7, 2026
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.

1 participant