Skip to content

v16.0.0

Latest
Compare
Choose a tag to compare
@azu azu released this 07 Feb 13:00
· 47 commits to master since this release
906f28e

What's Changed

Breaking Changes

  • BREAKING CHANGE: update to marked 12 by @azu in #80

This release upgrade marked. The marked of this version includes a big change.

  • support marked extension by using onInit option and marked.use()
  • remove @types/marked
  • update to jsdom 24
  • drop Node.js 16 support
    • require Node.js 18+

Migration from safe-marked v15

marked removed old options.

The default behavior of the safe-marked has also changed. I think that using the next plugin will probably result in the same result.

import { createMarkdown } from "safe-marked";
+ import { gfmHeadingId } from "marked-gfm-heading-id";
+ import { mangle } from "marked-mangle";
const markdown = createMarkdown({
    marked: {
+        // Add plugin to marked
+        onInit(marked) {
+            marked.use(gfmHeadingId());
+            marked.use(mangle());
+        }
    }
});
const html = markdown(`# Header

<iframe src="https://example.com"></iframe>
This is [CommonMark](https://commonmark.org/) text.
`);
console.log(html);

Dependency Updates

  • chore(deps): update actions/checkout action to v4 by @renovate in #70
  • chore(deps): update actions/setup-node action to v4 by @renovate in #74

Full Changelog: v15.0.0...v16.0.0