diff --git a/changelog.md b/changelog.md index 06335805..e4ab4b1d 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,13 @@ All notable changes will be documented in this file. +## 8.0.0 - 2022-01-17 + +### Change `plugins` to `remarkPlugins` + +This removes the already deprecated option `plugins`. +It’s renamed to `remarkPlugins`. + ## 7.0.1 - 2021-08-26 * [`ec387c2`](https://github.com/remarkjs/react-markdown/commit/ec387c2) diff --git a/lib/react-markdown.js b/lib/react-markdown.js index 58ef8169..6dbb085c 100644 --- a/lib/react-markdown.js +++ b/lib/react-markdown.js @@ -10,7 +10,6 @@ * @property {string} children * * @typedef PluginOptions - * @property {PluggableList} [plugins=[]] **deprecated**: use `remarkPlugins` instead * @property {PluggableList} [remarkPlugins=[]] * @property {PluggableList} [rehypePlugins=[]] * @property {import('remark-rehype').Options} [remarkRehypeOptions={}] @@ -42,6 +41,7 @@ const changelog = /** @type {Record} */ const deprecated = { + plugins: {to: 'plugins', id: 'change-plugins-to-remarkplugins'}, renderers: {to: 'components', id: 'change-renderers-to-components'}, astPlugins: {id: 'remove-buggy-html-in-markdown-parser'}, allowDangerousHtml: {id: 'remove-buggy-html-in-markdown-parser'}, @@ -86,8 +86,7 @@ export function ReactMarkdown(options) { const processor = unified() .use(remarkParse) - // TODO: deprecate `plugins` in v8.0.0. - .use(options.remarkPlugins || options.plugins || []) + .use(options.remarkPlugins || []) .use(remarkRehype, { ...options.remarkRehypeOptions, allowDangerousHtml: true