remarkjs/react-markdown (react-markdown)
### [`v9.0.1`](https://togithub.com/remarkjs/react-markdown/releases/tag/9.0.1)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/9.0.0...9.0.1)
- [`d8e3787`](https://togithub.com/remarkjs/react-markdown/commit/d8e3787) Fix double encoding in new url transform
- [`55d8d83`](https://togithub.com/remarkjs/react-markdown/commit/55d8d83) Refactor docs to use `createRoot`
**Full Changelog**: https://github.com/remarkjs/react-markdown/compare/9.0.0...9.0.1
### [`v9.0.0`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#900---2023-09-27)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/8.0.7...9.0.0)
- [`b67d714`](https://togithub.com/remarkjs/react-markdown/commit/b67d714)
Change to require Node.js 16\
**migrate**: update too
- [`ec2b134`](https://togithub.com/remarkjs/react-markdown/commit/ec2b134)
Change to require React 18\
**migrate**: update too
- [`bf5824f`](https://togithub.com/remarkjs/react-markdown/commit/bf5824f)
Change to use `exports`\
**migrate**: don’t use private APIs
- [`c383a45`](https://togithub.com/remarkjs/react-markdown/commit/c383a45)
Update `@types/hast`, utilities, plugins, etc\
**migrate**: update too
- [`eca5e6b`](https://togithub.com/remarkjs/react-markdown/commit/eca5e6b)
[`08ead9e`](https://togithub.com/remarkjs/react-markdown/commit/08ead9e)
Replace `transformImageUri`, `transformLinkUri` w/ `urlTransform`\
**migrate**: see “Add `urlTransform`” below
- [`de29396`](https://togithub.com/remarkjs/react-markdown/commit/de29396)
Remove `linkTarget` option\
**migrate**: see “Remove `linkTarget`” below
- [`4346276`](https://togithub.com/remarkjs/react-markdown/commit/4346276)
Remove support for passing custom props to components\
**migrate**: see “Remove `includeElementIndex`”, “Remove `rawSourcePos`”,
“Remove `sourcePos`”, “Remove extra props passed to certain components”
below
- [`c0dfbd6`](https://togithub.com/remarkjs/react-markdown/commit/c0dfbd6)
Remove UMD bundle from package\
**migrate**: use `esm.sh` or a CDN or so
- [`e12b5e9`](https://togithub.com/remarkjs/react-markdown/commit/e12b5e9)
Remove `prop-types`\
**migrate**: use TypeScript
- [`4eb7aa0`](https://togithub.com/remarkjs/react-markdown/commit/4eb7aa0)
Change to throw errors for removed props\
**migrate**: don’t pass options that don’t do things
- [`8aabf74`](https://togithub.com/remarkjs/react-markdown/commit/8aabf74)
Change to improve error messages\
**migrate**: expect better messages
##### Add `urlTransform`
The `transformImageUri` and `transformLinkUri` were removed.
Having two functions is a bit much, particularly because there are more URLs
you might want to change (or which might be unsafe so *we* make them safe).
And their name and APIs were a bit weird.
You can use the new `urlTransform` prop instead to change all your URLs.
##### Remove `linkTarget`
The `linkTarget` option was removed; you should likely not set targets.
If you want to, use
[`rehype-external-links`](https://togithub.com/rehypejs/rehype-external-links).
##### Remove `includeElementIndex`
The `includeElementIndex` option was removed, so `index` is never passed to
components.
Write a plugin to pass `index`:
Show example of plugin
```jsx
import {visit} from 'unist-util-visit'
function rehypePluginAddingIndex() {
/**
* @param {import('hast').Root} tree
* @returns {undefined}
*/
return function (tree) {
visit(tree, function (node, index) {
if (node.type === 'element' && typeof index === 'number') {
node.properties === index
}
})
}
}
```
##### Remove `rawSourcePos`
The `rawSourcePos` option was removed, so `sourcePos` is never passed to
components.
All components are passed `node`, so you can get `node.position` from them.
##### Remove `sourcePos`
The `sourcePos` option was removed, so `data-sourcepos` is never passed to
elements.
Write a plugin to pass `index`:
Show example of plugin
```jsx
import {stringifyPosition} from 'unist-util-stringify-position'
import {visit} from 'unist-util-visit'
function rehypePluginAddingIndex() {
/**
* @param {import('hast').Root} tree
* @returns {undefined}
*/
return function (tree) {
visit(tree, function (node) {
if (node.type === 'element') {
node.properties.dataSourcepos = stringifyPosition(node.position)
}
})
}
}
```
##### Remove extra props passed to certain components
When overwriting components, these props are no longer passed:
- `inline` on `code`
— create a plugin or use `pre` for the block
- `level` on `h1`, `h2`, `h3`, `h4`, `h5`, `h6`
— check `node.tagName` instead
- `checked` on `li`
— check `task-list-item` class or check `props.children`
- `index` on `li`
— create a plugin
- `ordered` on `li`
— create a plugin or check the parent
- `depth` on `ol`, `ul`
— create a plugin
- `ordered` on `ol`, `ul`
— check `node.tagName` instead
- `isHeader` on `td`, `th`
— check `node.tagName` instead
- `isHeader` on `tr`
— create a plugin or check children
### [`v8.0.7`](https://togithub.com/remarkjs/react-markdown/releases/tag/8.0.7)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/8.0.6...8.0.7)
##### Perf
- [`c289176`](https://togithub.com/remarkjs/react-markdown/commit/c289176) Fix performance for keys
by [@wooorm](https://togithub.com/wooorm) in [https://github.com/remarkjs/react-markdown/pull/738](https://togithub.com/remarkjs/react-markdown/pull/738)
##### Docs
- [`9034dbd`](https://togithub.com/remarkjs/react-markdown/commit/9034dbd) Fix types in syntax highlight example
by [@dlqqq](https://togithub.com/dlqqq) in [https://github.com/remarkjs/react-markdown/pull/736](https://togithub.com/remarkjs/react-markdown/pull/736)
**Full Changelog**: https://github.com/remarkjs/react-markdown/compare/8.0.6...8.0.7
### [`v8.0.6`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#806---2023-03-20)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/8.0.5...8.0.6)
- [`33ab015`](https://togithub.com/remarkjs/react-markdown/commit/33ab015)
Update to TS 5\
by [**@Methuselah96**](https://togithub.com/Methuselah96)
in [#734](https://togithub.com/remarkjs/react-markdown/issues/734)
### [`v8.0.5`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#805---2023-01-17)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/8.0.4...8.0.5)
- [`d640d40`](https://togithub.com/remarkjs/react-markdown/commit/d640d40)
Update to use `node16` module resolution in `tsconfig.json`\
by [**@ChristianMurphy**](https://togithub.com/ChristianMurphy)
in [#723](https://togithub.com/remarkjs/react-markdown/pull/723)
- [`402fea3`](https://togithub.com/remarkjs/react-markdown/commit/402fea3)
Fix typo in `plugins` deprecation message\
by [**@marc2332**](https://togithub.com/marc2332)
in [#719](https://togithub.com/remarkjs/react-markdown/pull/719)
- [`4f98f73`](https://togithub.com/remarkjs/react-markdown/commit/4f98f73)
Remove deprecated and unneeded `defaultProps`\
by [**@Lepozepo**](https://togithub.com/Lepozepo)
in [#718](https://togithub.com/remarkjs/react-markdown/pull/718)
### [`v8.0.4`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#804---2022-12-01)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/8.0.3...8.0.4)
- [`9b20440`](https://togithub.com/remarkjs/react-markdown/commit/9b20440)
Fix type of `td`, `th` props\
by [**@lucasassisrosa**](https://togithub.com/lucasassisrosa)
in [#714](https://togithub.com/remarkjs/react-markdown/pull/714)
- [`cfe075b`](https://togithub.com/remarkjs/react-markdown/commit/cfe075b)
Add clarification of `alt` on `img` in docs\
by [**@cballenar**](https://togithub.com/cballenar)
in [#692](https://togithub.com/remarkjs/react-markdown/pull/692)
### [`v8.0.3`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#803---2022-04-20)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/8.0.2...8.0.3)
- [`a2fb833`](https://togithub.com/remarkjs/react-markdown/commit/a2fb833)
Fix prop types of plugins\
by [**@starpit**](https://togithub.com/starpit)
in [#683](https://togithub.com/remarkjs/react-markdown/pull/683)
### [`v8.0.2`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#802---2022-03-31)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/8.0.1...8.0.2)
- [`2712227`](https://togithub.com/remarkjs/react-markdown/commit/2712227)
Update `react-is`
- [`704c3c6`](https://togithub.com/remarkjs/react-markdown/commit/704c3c6)
Fix TypeScript bug by adding workaround\
by [**@Methuselah96**](https://togithub.com/Methuselah96)
in [#676](https://togithub.com/remarkjs/react-markdown/pull/676)
### [`v8.0.1`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#801---2022-03-14)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/8.0.0...8.0.1)
- [`c23ecf6`](https://togithub.com/remarkjs/react-markdown/commit/c23ecf6)
Add missing dependency for types\
by [**@Methuselah96**](https://togithub.com/Methuselah96)
in [#675](https://togithub.com/remarkjs/react-markdown/pull/675)
### [`v8.0.0`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#800---2022-01-17)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/7.1.2...8.0.0)
- [`cd845c9`](https://togithub.com/remarkjs/react-markdown/commit/cd845c9)
Remove deprecated `plugins` option\
(**migrate by renaming it to `remarkPlugins`**)
- [`36e4916`](https://togithub.com/remarkjs/react-markdown/commit/36e4916)
Update [`remark-rehype`](https://togithub.com/remarkjs/remark-rehype),
add support for passing it options\
by [**@peolic**](https://togithub.com/peolic)
in [#669](https://togithub.com/remarkjs/react-markdown/pull/669)\
(**migrate by removing `remark-footnotes` and updating `remark-gfm` if you
were using them, otherwise you shouldn’t notice this**)
### [`v7.1.2`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#712---2022-01-02)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/7.1.1...7.1.2)
- [`656a4fa`](https://togithub.com/remarkjs/react-markdown/commit/656a4fa)
Fix `ref` in types\
by [**@ChristianMurphy**](https://togithub.com/ChristianMurphy)
in [#668](https://togithub.com/remarkjs/react-markdown/pull/668)
### [`v7.1.1`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#711---2021-11-29)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/7.1.0...7.1.1)
- [`4185f06`](https://togithub.com/remarkjs/react-markdown/commit/4185f06)
Add improved docs\
by [**@wooorm**](https://togithub.com/wooorm)
in [#657](https://togithub.com/remarkjs/react-markdown/pull/657)
### [`v7.1.0`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#710---2021-10-21)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/7.0.1...7.1.0)
- [`7b8a829`](https://togithub.com/remarkjs/react-markdown/commit/7b8a829)
Add support for `SpecialComponents` to be any `ComponentType`\
by [**@Methuselah96**](https://togithub.com/Methuselah96)
in [#640](https://togithub.com/remarkjs/react-markdown/pull/640)
- [`a7c26fc`](https://togithub.com/remarkjs/react-markdown/commit/a7c26fc)
Remove warning on whitespace in tables
### [`v7.0.1`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#701---2021-08-26)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/7.0.0...7.0.1)
- [`ec387c2`](https://togithub.com/remarkjs/react-markdown/commit/ec387c2)
Add improved type for `linkTarget` as string
- [`5af6bc7`](https://togithub.com/remarkjs/react-markdown/commit/5af6bc7)
Fix to correctly compile intrinsic types
### [`v7.0.0`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#700---2021-08-13)
[Compare Source](https://togithub.com/remarkjs/react-markdown/compare/6.0.3...7.0.0)
Welcome to version 7.
This a major release and therefore contains breaking changes.
##### Breaking changes
- [`01b11fe`](https://togithub.com/remarkjs/react-markdown/commit/01b11fe)
[`c613efd`](https://togithub.com/remarkjs/react-markdown/commit/c613efd)
[`a1e1c3f`](https://togithub.com/remarkjs/react-markdown/commit/a1e1c3f)
[`aeee9ac`](https://togithub.com/remarkjs/react-markdown/commit/aeee9ac)
Use ESM
(please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c))
- [`3dffd6a`](https://togithub.com/remarkjs/react-markdown/commit/3dffd6a)
Update dependencies
(upgrade all your plugins and this should go fine)
##### Internals
- [`8b5481c`](https://togithub.com/remarkjs/react-markdown/commit/8b5481c)
[`fb1b512`](https://togithub.com/remarkjs/react-markdown/commit/fb1b512)
[`144af79`](https://togithub.com/remarkjs/react-markdown/commit/144af79)
Replace `jest` with `uvu`
- [`8c572df`](https://togithub.com/remarkjs/react-markdown/commit/8c572df)
Replace `rollup` with `esbuild`
- [`8737eac`](https://togithub.com/remarkjs/react-markdown/commit/8737eac)
[`28d4c75`](https://togithub.com/remarkjs/react-markdown/commit/28d4c75)
[`b2dd046`](https://togithub.com/remarkjs/react-markdown/commit/b2dd046)
Refactor code-style
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^6.0.3
->^9.0.0
Release Notes
remarkjs/react-markdown (react-markdown)
### [`v9.0.1`](https://togithub.com/remarkjs/react-markdown/releases/tag/9.0.1) [Compare Source](https://togithub.com/remarkjs/react-markdown/compare/9.0.0...9.0.1) - [`d8e3787`](https://togithub.com/remarkjs/react-markdown/commit/d8e3787) Fix double encoding in new url transform - [`55d8d83`](https://togithub.com/remarkjs/react-markdown/commit/55d8d83) Refactor docs to use `createRoot` **Full Changelog**: https://github.com/remarkjs/react-markdown/compare/9.0.0...9.0.1 ### [`v9.0.0`](https://togithub.com/remarkjs/react-markdown/blob/HEAD/changelog.md#900---2023-09-27) [Compare Source](https://togithub.com/remarkjs/react-markdown/compare/8.0.7...9.0.0) - [`b67d714`](https://togithub.com/remarkjs/react-markdown/commit/b67d714) Change to require Node.js 16\ **migrate**: update too - [`ec2b134`](https://togithub.com/remarkjs/react-markdown/commit/ec2b134) Change to require React 18\ **migrate**: update too - [`bf5824f`](https://togithub.com/remarkjs/react-markdown/commit/bf5824f) Change to use `exports`\ **migrate**: don’t use private APIs - [`c383a45`](https://togithub.com/remarkjs/react-markdown/commit/c383a45) Update `@types/hast`, utilities, plugins, etc\ **migrate**: update too - [`eca5e6b`](https://togithub.com/remarkjs/react-markdown/commit/eca5e6b) [`08ead9e`](https://togithub.com/remarkjs/react-markdown/commit/08ead9e) Replace `transformImageUri`, `transformLinkUri` w/ `urlTransform`\ **migrate**: see “Add `urlTransform`” below - [`de29396`](https://togithub.com/remarkjs/react-markdown/commit/de29396) Remove `linkTarget` option\ **migrate**: see “Remove `linkTarget`” below - [`4346276`](https://togithub.com/remarkjs/react-markdown/commit/4346276) Remove support for passing custom props to components\ **migrate**: see “Remove `includeElementIndex`”, “Remove `rawSourcePos`”, “Remove `sourcePos`”, “Remove extra props passed to certain components” below - [`c0dfbd6`](https://togithub.com/remarkjs/react-markdown/commit/c0dfbd6) Remove UMD bundle from package\ **migrate**: use `esm.sh` or a CDN or so - [`e12b5e9`](https://togithub.com/remarkjs/react-markdown/commit/e12b5e9) Remove `prop-types`\ **migrate**: use TypeScript - [`4eb7aa0`](https://togithub.com/remarkjs/react-markdown/commit/4eb7aa0) Change to throw errors for removed props\ **migrate**: don’t pass options that don’t do things - [`8aabf74`](https://togithub.com/remarkjs/react-markdown/commit/8aabf74) Change to improve error messages\ **migrate**: expect better messages ##### Add `urlTransform` The `transformImageUri` and `transformLinkUri` were removed. Having two functions is a bit much, particularly because there are more URLs you might want to change (or which might be unsafe so *we* make them safe). And their name and APIs were a bit weird. You can use the new `urlTransform` prop instead to change all your URLs. ##### Remove `linkTarget` The `linkTarget` option was removed; you should likely not set targets. If you want to, use [`rehype-external-links`](https://togithub.com/rehypejs/rehype-external-links). ##### Remove `includeElementIndex` The `includeElementIndex` option was removed, so `index` is never passed to components. Write a plugin to pass `index`:Show example of plugin
```jsx import {visit} from 'unist-util-visit' function rehypePluginAddingIndex() { /** * @param {import('hast').Root} tree * @returns {undefined} */ return function (tree) { visit(tree, function (node, index) { if (node.type === 'element' && typeof index === 'number') { node.properties === index } }) } } ```Show example of plugin
```jsx import {stringifyPosition} from 'unist-util-stringify-position' import {visit} from 'unist-util-visit' function rehypePluginAddingIndex() { /** * @param {import('hast').Root} tree * @returns {undefined} */ return function (tree) { visit(tree, function (node) { if (node.type === 'element') { node.properties.dataSourcepos = stringifyPosition(node.position) } }) } } ```Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.