v6.0.0
The breaking change lives in datocms-html-to-structured-text; the other packages have no behavior changes.
datocms-html-to-structured-text (breaking)
- ESM-only.
require('datocms-html-to-structured-text')no longer works — consume viaimport(native ESM, a bundler, or TypeScript withmodule: "NodeNext"). If you need CommonJS, pin to^5.1.16. - Minimum Node.js is 18.
- All upstream
hast/unist/parse5deps upgraded to their current ESM-only majors (rehype-minify-whitespace6,hast-util-*3–8,parse58,unist-util-visitreplacesunist-utils-core). - The
HastNode,HastElementNode,HastRootNode,HastTextNode, andHastPropertiestype aliases were removed — import the equivalents (Nodes,Element,Root,Text,Properties) from@types/hast. parse5ToStructuredText's parameter type changed fromparse5.DocumenttoDefaultTreeAdapterMap['document'](parse5 v8 dropped the namespace export).parse5v8 has no default export — useimport { parse } from 'parse5'.- The
preprocesshook is now typed as(hast: Root) => void; mutate the tree in place. - Manual
.d.tsshims undersrc/typings/are gone — every upstream dep now ships its own types.
Other packages
All other packages (datocms-structured-text-utils, datocms-to-html-string, datocms-to-dom-nodes, datocms-to-plain-text, datocms-contentful-to-structured-text, datocms-slate-utils, datocms-generic-html-renderer, datocms-dastdown) are republished at 6.0.0 for version-alignment under lerna fixed mode. No source or runtime changes.
Internal tooling
- Bumped
typescript4.1 → 5.4,jest26 → 29,ts-jest26 → 29,eslint7 → 8,@typescript-eslint/*4 → 8.