Skip to content

Commit

Permalink
9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 27, 2023
1 parent 72e68d2 commit 6360bc2
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 9 deletions.
51 changes: 47 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,44 @@

All notable changes will be documented in this file.

## 9.0.0 - unreleased
## 9.0.0 - 2023-09-27

* [`b67d714`](https://github.com/remarkjs/react-markdown/commit/b67d714)
Change to require Node.js 16\
**migrate**: update too
* [`ec2b134`](https://github.com/remarkjs/react-markdown/commit/ec2b134)
Change to require React 18\
**migrate**: update too
* [`bf5824f`](https://github.com/remarkjs/react-markdown/commit/bf5824f)
Change to use `exports`\
**migrate**: don’t use private APIs
* [`c383a45`](https://github.com/remarkjs/react-markdown/commit/c383a45)
Update `@types/hast`, utilities, plugins, etc\
**migrate**: update too
* [`eca5e6b`](https://github.com/remarkjs/react-markdown/commit/eca5e6b)
[`08ead9e`](https://github.com/remarkjs/react-markdown/commit/08ead9e)
Replace `transformImageUri`, `transformLinkUri` w/ `urlTransform`\
**migrate**: see “Add `urlTransform`” below
* [`de29396`](https://github.com/remarkjs/react-markdown/commit/de29396)
Remove `linkTarget` option\
**migrate**: see “Remove `linkTarget`” below
* [`4346276`](https://github.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://github.com/remarkjs/react-markdown/commit/c0dfbd6)
Remove UMD bundle from package\
**migrate**: use `esm.sh` or a CDN or so
* [`e12b5e9`](https://github.com/remarkjs/react-markdown/commit/e12b5e9)
Remove `prop-types`\
**migrate**: use TypeScript
* [`4eb7aa0`](https://github.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://github.com/remarkjs/react-markdown/commit/8aabf74)
Change to improve error messages\
**migrate**: expect better messages

### Add `urlTransform`

Expand All @@ -12,7 +49,13 @@ 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 `includeElementIndex` option
### Remove `linkTarget`

The `linkTarget` option was removed; you should likely not set targets.
If you want to, use
[`rehype-external-links`](https://github.com/rehypejs/rehype-external-links).

### Remove `includeElementIndex`

The `includeElementIndex` option was removed, so `index` is never passed to
components.
Expand All @@ -39,13 +82,13 @@ function rehypePluginAddingIndex() {
}
```

### Remove `rawSourcePos` option
### 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` option
### Remove `sourcePos`

The `sourcePos` option was removed, so `data-sourcepos` is never passed to
elements.
Expand Down
7 changes: 4 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,17 @@ const deprecations = [
to: 'disallowedElements'
},
{from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},
{from: 'includeElementIndex', id: '#remove-includeelementindex-option'},
{from: 'includeElementIndex', id: '#remove-includeelementindex'},
{
from: 'includeNodeIndex',
id: 'change-includenodeindex-to-includeelementindex'
},
{from: 'linkTarget', id: 'remove-linktarget'},
{from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},
{from: 'rawSourcePos', id: '#remove-rawsourcepos-option'},
{from: 'rawSourcePos', id: '#remove-rawsourcepos'},
{from: 'renderers', id: 'change-renderers-to-components', to: 'components'},
{from: 'source', id: 'change-source-to-children', to: 'children'},
{from: 'sourcePos', id: '#remove-sourcepos-option'},
{from: 'sourcePos', id: '#remove-sourcepos'},
{from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},
{from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}
]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-markdown",
"version": "8.0.7",
"version": "9.0.0",
"description": "React component to render markdown",
"license": "MIT",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ npm install react-markdown
In Deno with [`esm.sh`][esmsh]:

```js
import Markdown from 'https://esm.sh/react-markdown@8'
import Markdown from 'https://esm.sh/react-markdown@9'
```

In browsers with [`esm.sh`][esmsh]:
Expand Down

0 comments on commit 6360bc2

Please sign in to comment.