Skip to content

Commit 6360bc2

Browse files
committed
9.0.0
1 parent 72e68d2 commit 6360bc2

File tree

4 files changed

+53
-9
lines changed

4 files changed

+53
-9
lines changed

changelog.md

+47-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,44 @@
22

33
All notable changes will be documented in this file.
44

5-
## 9.0.0 - unreleased
5+
## 9.0.0 - 2023-09-27
6+
7+
* [`b67d714`](https://github.com/remarkjs/react-markdown/commit/b67d714)
8+
Change to require Node.js 16\
9+
**migrate**: update too
10+
* [`ec2b134`](https://github.com/remarkjs/react-markdown/commit/ec2b134)
11+
Change to require React 18\
12+
**migrate**: update too
13+
* [`bf5824f`](https://github.com/remarkjs/react-markdown/commit/bf5824f)
14+
Change to use `exports`\
15+
**migrate**: don’t use private APIs
16+
* [`c383a45`](https://github.com/remarkjs/react-markdown/commit/c383a45)
17+
Update `@types/hast`, utilities, plugins, etc\
18+
**migrate**: update too
19+
* [`eca5e6b`](https://github.com/remarkjs/react-markdown/commit/eca5e6b)
20+
[`08ead9e`](https://github.com/remarkjs/react-markdown/commit/08ead9e)
21+
Replace `transformImageUri`, `transformLinkUri` w/ `urlTransform`\
22+
**migrate**: see “Add `urlTransform`” below
23+
* [`de29396`](https://github.com/remarkjs/react-markdown/commit/de29396)
24+
Remove `linkTarget` option\
25+
**migrate**: see “Remove `linkTarget`” below
26+
* [`4346276`](https://github.com/remarkjs/react-markdown/commit/4346276)
27+
Remove support for passing custom props to components\
28+
**migrate**: see “Remove `includeElementIndex`”, “Remove `rawSourcePos`”,
29+
“Remove `sourcePos`”, “Remove extra props passed to certain components”
30+
below
31+
* [`c0dfbd6`](https://github.com/remarkjs/react-markdown/commit/c0dfbd6)
32+
Remove UMD bundle from package\
33+
**migrate**: use `esm.sh` or a CDN or so
34+
* [`e12b5e9`](https://github.com/remarkjs/react-markdown/commit/e12b5e9)
35+
Remove `prop-types`\
36+
**migrate**: use TypeScript
37+
* [`4eb7aa0`](https://github.com/remarkjs/react-markdown/commit/4eb7aa0)
38+
Change to throw errors for removed props\
39+
**migrate**: don’t pass options that don’t do things
40+
* [`8aabf74`](https://github.com/remarkjs/react-markdown/commit/8aabf74)
41+
Change to improve error messages\
42+
**migrate**: expect better messages
643

744
### Add `urlTransform`
845

@@ -12,7 +49,13 @@ you might want to change (or which might be unsafe so *we* make them safe).
1249
And their name and APIs were a bit weird.
1350
You can use the new `urlTransform` prop instead to change all your URLs.
1451

15-
### Remove `includeElementIndex` option
52+
### Remove `linkTarget`
53+
54+
The `linkTarget` option was removed; you should likely not set targets.
55+
If you want to, use
56+
[`rehype-external-links`](https://github.com/rehypejs/rehype-external-links).
57+
58+
### Remove `includeElementIndex`
1659

1760
The `includeElementIndex` option was removed, so `index` is never passed to
1861
components.
@@ -39,13 +82,13 @@ function rehypePluginAddingIndex() {
3982
}
4083
```
4184

42-
### Remove `rawSourcePos` option
85+
### Remove `rawSourcePos`
4386

4487
The `rawSourcePos` option was removed, so `sourcePos` is never passed to
4588
components.
4689
All components are passed `node`, so you can get `node.position` from them.
4790

48-
### Remove `sourcePos` option
91+
### Remove `sourcePos`
4992

5093
The `sourcePos` option was removed, so `data-sourcepos` is never passed to
5194
elements.

lib/index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,17 @@ const deprecations = [
124124
to: 'disallowedElements'
125125
},
126126
{from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},
127-
{from: 'includeElementIndex', id: '#remove-includeelementindex-option'},
127+
{from: 'includeElementIndex', id: '#remove-includeelementindex'},
128128
{
129129
from: 'includeNodeIndex',
130130
id: 'change-includenodeindex-to-includeelementindex'
131131
},
132+
{from: 'linkTarget', id: 'remove-linktarget'},
132133
{from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},
133-
{from: 'rawSourcePos', id: '#remove-rawsourcepos-option'},
134+
{from: 'rawSourcePos', id: '#remove-rawsourcepos'},
134135
{from: 'renderers', id: 'change-renderers-to-components', to: 'components'},
135136
{from: 'source', id: 'change-source-to-children', to: 'children'},
136-
{from: 'sourcePos', id: '#remove-sourcepos-option'},
137+
{from: 'sourcePos', id: '#remove-sourcepos'},
137138
{from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},
138139
{from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}
139140
]

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-markdown",
3-
"version": "8.0.7",
3+
"version": "9.0.0",
44
"description": "React component to render markdown",
55
"license": "MIT",
66
"keywords": [

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ npm install react-markdown
100100
In Deno with [`esm.sh`][esmsh]:
101101

102102
```js
103-
import Markdown from 'https://esm.sh/react-markdown@8'
103+
import Markdown from 'https://esm.sh/react-markdown@9'
104104
```
105105

106106
In browsers with [`esm.sh`][esmsh]:

0 commit comments

Comments
 (0)