npm / mdast-util-to-markdown
mdast-util-to-markdown
What changed in mdast-util-to-markdown 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-27.
9 breaking3 new APIs and options4 performance1 tooling15 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmdast-util-to-markdown 230 changes
Breaking changes 8
The option was removed; other bullets are now always used.
The
Contexttype alias was removed; useStateinstead.The package now uses an exports map; consumers should not use private APIs.
The default changed to true, so fenced code is used unless you explicitly set it to false.
The default changed from
'tab'(size) to'one'.The ancient undocumented support for the numeric value 1 was removed; use
'one'instead.Node.js 16 is now required.
The
SafeOptionstype alias was removed; useInfoinstead.
New APIs and options 3
Unsafe patterns can now specify afterNode, allowing developers to configure this additional pattern property.
Unsafe patterns can now specify beforeNode, allowing developers to configure this additional pattern property.
Unsafe patterns can now specify unicode, allowing developers to configure this additional pattern property.
Performance 4
Performance is improved for many touching attention runs.
Improved performance when processing text.
Improved performance for unpairable attention.
Fixes quadratic position lookup.
Fixes and other changes 15
Empty attention is dropped.
Fixes handling of empty after and before values in unsafe patterns.
Fixed escaping ampersands in info, meta, and related output.
Fixed escaping after an unsafe character.
Fixed edge cases around escaping and encoding.
Fixed links whose text would otherwise form definitions.
Fixed joining impossible things in tight list items.
Fixed recursion in wrapped attention when there is no attention.
Fixes handling of astral characters, such as emoji, around attention.
Fixes forming attention in complex cases.
Fixes escaping in autolinks.
Fixes encoding a break before attention.
Fixes handling around kinds of HTML.
Fixes unnecessary escaping of intraword underscores.
Fixes encoding line endings and blank lines in paragraphs.
mdast-util-to-markdown 12 changes
Breaking changes 1
The package switches to ESM, affecting how developers import and use it.
Tooling 1
Types are added using JSDoc, allowing developers to use type information for the package.