npm / mdast-util-to-hast
mdast-util-to-hast
What changed in mdast-util-to-hast 11 to 13, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
17 breaking1 security2 new APIs and options1 behavior and defaults2 tooling3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmdast-util-to-hast 1320 changes
Breaking changes 13
The
allhelper was removed; custom handlers should usestate.all.complex-types.d.tswas removed; use the main module.The package now uses exports; consumers should avoid private APIs.
Support for
Footnotenodes was removed; use GFM, which does not have inline notes.The
Htype was removed; useState.Support for the ancient
langform on code nodes with spaces was removed.The utility always returns a node; callers should expect an empty root instead of nothing.
Node.js 16 is now required.
The
onehelper was removed; custom handlers should usestate.one.Nodes passed through are now deep-cloned.
The function form of
Statewas removed; custom handlers should create nodes themselves and usestate.applyDataif needed.Definitions on
statenow use maps; custom handlers should expect maps.Callers should expect
undefinedrather thannull.
Security 1
mdast-util-to-hast has unsanitized class attribute
New APIs and options 1
Supported data fields were added to mdast
Data; pass correct values innode.data.
Behavior and default changes 1
Use the function form of
footnoteBackLabelfor internationalization.
Tooling 1
Smarter types are provided for
passThrough; type mdast and hast nodes by extending the content interfaces.
Fixes and other changes 3
Fixes backreferences in later footnote definitions.
Fixes support for spaces in class names.
Content is now kept around for
hNameon text.
mdast-util-to-hast 122 changes
Breaking changes 1
Footnotes now match how GitHub renders them.
New APIs and options 1
A new option lets developers configure footnotes to match how GitHub renders them.
mdast-util-to-hast 114 changes
Breaking changes 3
Support for the deprecated allowDangerousHTML option was removed.
The package now uses ESM.
Footnote rendering now matches Pandoc.
Tooling 1
JSDoc-based types were added.