From 48baac32989fd5b2b278ac1032c382df862b8e46 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 14 Sep 2024 13:03:39 +0000 Subject: [PATCH 1/2] chore(deps): update dependency @types/marked to v6 --- client/package.json | 2 +- pnpm-lock.yaml | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/package.json b/client/package.json index 482d6b12..7b76b3b2 100644 --- a/client/package.json +++ b/client/package.json @@ -43,7 +43,7 @@ "@types/debug": "4.1.12", "@types/dompurify": "2.4.0", "@types/event-source-polyfill": "1.0.5", - "@types/marked": "4.3.2", + "@types/marked": "6.0.0", "@types/node": "^20.0.0", "@types/react": "^18.0.26", "@types/react-dom": "^18.0.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6baae2a0..70341fd7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -94,8 +94,8 @@ importers: specifier: 1.0.5 version: 1.0.5 '@types/marked': - specifier: 4.3.2 - version: 4.3.2 + specifier: 6.0.0 + version: 6.0.0 '@types/node': specifier: ^20.0.0 version: 20.16.5 @@ -2694,8 +2694,9 @@ packages: '@types/lodash@4.17.7': resolution: {integrity: sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==} - '@types/marked@4.3.2': - resolution: {integrity: sha512-a79Yc3TOk6dGdituy8hmTTJXjOkZ7zsFYV10L337ttq/rec8lRMDBpV7fL3uLx6TgbFCa5DU/h8FmIBQPSbU0w==} + '@types/marked@6.0.0': + resolution: {integrity: sha512-jmjpa4BwUsmhxcfsgUit/7A9KbrC48Q0q8KvnY107ogcjGgTFDlIL3RpihNpx2Mu1hM4mdFQjoVc4O6JoGKHsA==} + deprecated: This is a stub types definition. marked provides its own type definitions, so you do not need this installed. '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} @@ -11094,7 +11095,9 @@ snapshots: '@types/lodash@4.17.7': {} - '@types/marked@4.3.2': {} + '@types/marked@6.0.0': + dependencies: + marked: 4.3.0 '@types/mdast@4.0.4': dependencies: From 5e629d60edbb996dbf7197fbea973770d9c2fc2d Mon Sep 17 00:00:00 2001 From: John Brunton <1276413+jbrunton@users.noreply.github.com> Date: Sat, 14 Sep 2024 15:36:59 +0100 Subject: [PATCH 2/2] chore: update marked --- client/package.json | 3 +-- .../room/molecules/formatted-message.tsx | 2 +- pnpm-lock.yaml | 23 +++++-------------- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/client/package.json b/client/package.json index 7b76b3b2..ca620cca 100644 --- a/client/package.json +++ b/client/package.json @@ -30,7 +30,7 @@ "event-source-polyfill": "1.0.31", "framer-motion": "8.5.5", "highlight.js": "11.10.0", - "marked": "4.3.0", + "marked": "14.1.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "4.12.0", @@ -43,7 +43,6 @@ "@types/debug": "4.1.12", "@types/dompurify": "2.4.0", "@types/event-source-polyfill": "1.0.5", - "@types/marked": "6.0.0", "@types/node": "^20.0.0", "@types/react": "^18.0.26", "@types/react-dom": "^18.0.9", diff --git a/client/src/features/room/molecules/formatted-message.tsx b/client/src/features/room/molecules/formatted-message.tsx index 1e835e43..1f7623fb 100644 --- a/client/src/features/room/molecules/formatted-message.tsx +++ b/client/src/features/room/molecules/formatted-message.tsx @@ -22,5 +22,5 @@ marked.setOptions({ }) const formatContent = (content: string) => { - return DOMPurify.sanitize(marked.parse(content)) + return DOMPurify.sanitize(marked.parse(content, { async: false })) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70341fd7..5e62f0b6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 11.10.0 version: 11.10.0 marked: - specifier: 4.3.0 - version: 4.3.0 + specifier: 14.1.2 + version: 14.1.2 react: specifier: ^18.2.0 version: 18.3.1 @@ -93,9 +93,6 @@ importers: '@types/event-source-polyfill': specifier: 1.0.5 version: 1.0.5 - '@types/marked': - specifier: 6.0.0 - version: 6.0.0 '@types/node': specifier: ^20.0.0 version: 20.16.5 @@ -2694,10 +2691,6 @@ packages: '@types/lodash@4.17.7': resolution: {integrity: sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==} - '@types/marked@6.0.0': - resolution: {integrity: sha512-jmjpa4BwUsmhxcfsgUit/7A9KbrC48Q0q8KvnY107ogcjGgTFDlIL3RpihNpx2Mu1hM4mdFQjoVc4O6JoGKHsA==} - deprecated: This is a stub types definition. marked provides its own type definitions, so you do not need this installed. - '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} @@ -5482,9 +5475,9 @@ packages: resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} hasBin: true - marked@4.3.0: - resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==} - engines: {node: '>= 12'} + marked@14.1.2: + resolution: {integrity: sha512-f3r0yqpz31VXiDB/wj9GaOB0a2PRLQl6vJmXiFrniNwjkKdvakqJRULhjFKJpxOchlCRiG5fcacoUZY5Xa6PEQ==} + engines: {node: '>= 18'} hasBin: true mdast-util-to-hast@13.2.0: @@ -11095,10 +11088,6 @@ snapshots: '@types/lodash@4.17.7': {} - '@types/marked@6.0.0': - dependencies: - marked: 4.3.0 - '@types/mdast@4.0.4': dependencies: '@types/unist': 3.0.3 @@ -14706,7 +14695,7 @@ snapshots: punycode.js: 2.3.1 uc.micro: 2.1.0 - marked@4.3.0: {} + marked@14.1.2: {} mdast-util-to-hast@13.2.0: dependencies: