[EuiMarkdownFormat] upgrade `mdast-util-to-hast` v13.0.0
- Dominant language
- TypeScript
- Stars
- 6.4k
- Forks
- 911
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 69
Description
Kibana is upgrading react-markdown from 6.0.3 -> 10.1.0 ([[PR link](https://github.com/elastic/kibana/pull/206222)]). This pulls in the modern unified/remark/rehype ecosystem, including mdast-util-to-hast@^13.0.0 via three independent paths:
```
react-markdown@10.1.0 ─ mdast-util-to-hast@^13.0.0
└ remark-rehype@^11.0.0 ─ mdast-util-to-hast@^13.0.0
rehype-raw@7.0.0 ─ hast-util-raw@^9.0.0 ─ mdast-util-to-hast@^13.0.0
```
EUI still pins `mdast-util-to-hast@^10.2.0` (along with `unified@^9.2.2`, `remark-rehype@^8.1.0`, `rehype-raw@^5.1.0`, `unist-util-visit@^2.0.3`, `vfile@^4.2.1`). npm isolates EUI's copies under `node_modules/@elastic/eui/node_modules/`, so Kibana now ships two parallel copies of the entire [unified](https://unifiedjs.com/) stack.
**Impact:**
* Bundle size: duplicated `mdast-util-to-hast` + unified + several remark/rehype plugins
* TypeScript portability: the nested path leaked into inferred types, causing `TS2742` errors (worked around with `ReturnType`)
* Divergence: EUI is pinned to a 2021-era stack; each Kibana markdown upgrade widens the gap
**Ask:** Can EUI upgrade its markdown dependencies to align with the current unified v11 / mdast-util-to-hast v13 ecosystem? This would collapse the duplicates with no Kibana code changes.
Contributor guide
Assessment
This issue has not been assessed yet.