Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Feb 13, 2025
1 parent aed0010 commit c44e246
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 161 deletions.
38 changes: 20 additions & 18 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!--lint disable media-style-->

# Changelog

All notable changes will be documented in this file.
Expand Down Expand Up @@ -64,7 +66,7 @@ Write a plugin to pass `index`:
<details>
<summary>Show example of plugin</summary>

```jsx
```js
import {visit} from 'unist-util-visit'

function rehypePluginAddingIndex() {
Expand Down Expand Up @@ -99,7 +101,7 @@ Write a plugin to pass `index`:
<details>
<summary>Show example of plugin</summary>

```jsx
```js
import {stringifyPosition} from 'unist-util-stringify-position'
import {visit} from 'unist-util-visit'

Expand Down Expand Up @@ -333,7 +335,7 @@ for more on components.

Before (**broken**):

```jsx
```js
<Markdown
renderers={{
// Use a fancy hr
Expand All @@ -344,7 +346,7 @@ Before (**broken**):

Now (**fixed**):

```jsx
```js
<Markdown
components={{
// Use a fancy hr
Expand Down Expand Up @@ -422,7 +424,7 @@ for more plugins.
<details>
<summary>Show example of feature</summary>

```jsx
```js
import rehypeHighlight from 'rehype-highlight'

<Markdown rehypePlugins={[rehypeHighlight]}>{`~~~js
Expand Down Expand Up @@ -454,15 +456,15 @@ too.

Before (**broken**):

```jsx
```js
import MarkdownWithHtml from 'react-markdown/with-html'

<MarkdownWithHtml>{`# Hello, <i>world</i>!`}</MarkdownWithHtml>
```

Now (**fixed**):

```jsx
```js
import Markdown from 'react-markdown'
import rehypeRaw from 'rehype-raw'
import rehypeSanitize from 'rehype-sanitize'
Expand All @@ -481,20 +483,20 @@ Instead of passing a `source` pass `children` instead:

Before (**broken**):

```jsx
```js
<Markdown source="some\nmarkdown"></Markdown>
```

Now (**fixed**):

```jsx
```js
<Markdown>{`some
markdown`}</Markdown>
```

Or (**also fixed**):

```jsx
```js
<Markdown children={`some
markdown`} />
```
Expand All @@ -513,7 +515,7 @@ names: `allowNode` to `allowElement`, `allowedTypes` to `allowedElements`, and

Before (**broken**):

```jsx
```js
<Markdown
// Skip images
disallowedTypes={['image']}
Expand All @@ -522,7 +524,7 @@ Before (**broken**):

Now (**fixed**):

```jsx
```js
<Markdown
// Skip images
disallowedElements={['img']}
Expand All @@ -533,7 +535,7 @@ Now (**fixed**):

Before (**broken**):

```jsx
```js
<Markdown
// Skip h1
allowNode={(node) => node.type !== 'heading' || node.depth !== 1}
Expand All @@ -542,7 +544,7 @@ Before (**broken**):

Now (**fixed**):

```jsx
```js
<Markdown
// Skip h1
allowElement={(element) => element.tagName !== 'h1'}
Expand All @@ -561,7 +563,7 @@ to components also changed from being based on markdown to being based on HTML.

Before (**broken**):

```jsx
```js
<Markdown
includeNodeIndex={true}
renderers={{
Expand All @@ -572,7 +574,7 @@ Before (**broken**):

Now (**fixed**):

```jsx
```js
<Markdown
includeElementIndex={true}
components={{
Expand Down Expand Up @@ -654,13 +656,13 @@ The breaking change is for renderers which blindly spread their props to an
underlying component/tag.
For instance:

```jsx
```js
<ReactMarkdown renderers={{link: props => <a {...props} />}} … />
```

Should now be written as:

```jsx
```js
<ReactMarkdown renderers={{link: ({node, ...props}) => <a {...props} />}} … />
```

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"c8": "^10.0.0",
"esbuild": "^0.24.0",
"esbuild": "^0.25.0",
"eslint-plugin-react": "^7.0.0",
"prettier": "^3.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"rehype-raw": "^7.0.0",
"remark-cli": "^12.0.0",
"remark-gfm": "^4.0.0",
"remark-preset-wooorm": "^10.0.0",
"remark-preset-wooorm": "^11.0.0",
"remark-toc": "^9.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
Expand Down
Loading

0 comments on commit c44e246

Please sign in to comment.