chore(deps): update dependency marked to v7 (#5112)

* chore(deps): update dependency marked to v7

* add changeset

* fix types

* add changeset

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
This commit is contained in:
renovate[bot] 2023-08-18 13:14:14 +01:00 committed by GitHub
parent 4b58ea6d98
commit 1cefee7fc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 22 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/chatbot": minor
"gradio": minor
---
feat:chore(deps): update dependency marked to v7

View File

@ -16,11 +16,10 @@
"@gradio/utils": "workspace:^",
"@types/dompurify": "^3.0.2",
"@types/katex": "^0.16.0",
"@types/marked": "^5.0.0",
"@types/prismjs": "1.26.0",
"dompurify": "^3.0.3",
"katex": "^0.16.7",
"marked": "^5.0.1",
"marked": "^7.0.0",
"marked-highlight": "^2.0.1",
"prismjs": "1.29.0"
},

View File

@ -1,4 +1,4 @@
import { marked, Renderer } from "marked";
import { marked, type Renderer } from "marked";
import { markedHighlight } from "marked-highlight";
import Prism from "prismjs";
import "prismjs/components/prism-python";
@ -61,9 +61,7 @@ function escape(html: string, encode?: boolean): string {
return html;
}
const renderer: Partial<
Omit<marked.Renderer<false>, "constructor" | "options">
> = {
const renderer: Partial<Omit<Renderer, "constructor" | "options">> = {
code(
this: Renderer,
code: string,

25
pnpm-lock.yaml generated
View File

@ -1,4 +1,4 @@
lockfileVersion: '6.1'
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
@ -589,9 +589,6 @@ importers:
'@types/katex':
specifier: ^0.16.0
version: 0.16.0
'@types/marked':
specifier: ^5.0.0
version: 5.0.0
'@types/prismjs':
specifier: 1.26.0
version: 1.26.0
@ -602,11 +599,11 @@ importers:
specifier: ^0.16.7
version: 0.16.7
marked:
specifier: ^5.0.1
version: 5.0.1
specifier: ^7.0.0
version: 7.0.0
marked-highlight:
specifier: ^2.0.1
version: 2.0.1(marked@5.0.1)
version: 2.0.1(marked@7.0.0)
prismjs:
specifier: 1.29.0
version: 1.29.0
@ -6816,10 +6813,6 @@ packages:
resolution: {integrity: sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==}
dev: true
/@types/marked@5.0.0:
resolution: {integrity: sha512-YcZe50jhltsCq7rc9MNZC/4QB/OnA2Pd6hrOSTOFajtabN+38slqgDDCeE/0F83SjkKBQcsZUj7VLWR0H5cKRA==}
dev: false
/@types/mdx@2.0.5:
resolution: {integrity: sha512-76CqzuD6Q7LC+AtbPqrvD9AqsN0k8bsYo2bM2J8pmNldP1aIPAbzUQ7QbobyXL4eLr1wK5x8FZFe8eF/ubRuBg==}
dev: true
@ -11354,17 +11347,17 @@ packages:
react: 18.2.0
dev: true
/marked-highlight@2.0.1(marked@5.0.1):
/marked-highlight@2.0.1(marked@7.0.0):
resolution: {integrity: sha512-LDUfR/zDvD+dJ+lQOWHkxvBLNxiXcaN8pBtwJ/i4pI0bkDC/Ef6Mz1qUrAuHXfnpdr2rabdMpVFhqFuU+5Mskg==}
peerDependencies:
marked: ^4 || ^5
dependencies:
marked: 5.0.1
marked: 7.0.0
dev: false
/marked@5.0.1:
resolution: {integrity: sha512-Nn9peC4lvIZdcfp8Uze6xk4ZYowkcj/K6+e/6rLHadhtjqeip/bYRxMgt3124IGGJ3RPs2uX5YVmAGbUutY18g==}
engines: {node: '>= 18'}
/marked@7.0.0:
resolution: {integrity: sha512-7Gv1Ry8tqR352ElQOQfxdGpIh8kNZh/yYjNCxAQCN1DDbY4bCTG3qDCSkZWlRElSseeEILDxkY/G9w7cgziBNw==}
engines: {node: '>= 16'}
hasBin: true
dev: false