mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-01 11:43:49 +00:00
fix(deps): update dependency marked to v16 (#5284)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: qwerty287 <qwerty287@posteo.de> Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
parent
2fbc1eb424
commit
4ff8928005
6 changed files with 19 additions and 18 deletions
|
@ -18,7 +18,7 @@
|
|||
"axios": "^1.7.9",
|
||||
"concurrently": "^9.1.2",
|
||||
"isomorphic-dompurify": "^2.19.0",
|
||||
"marked": "^15.0.5",
|
||||
"marked": "^16.0.0",
|
||||
"slugify": "^1.6.6",
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.7.2"
|
||||
|
|
|
@ -40,7 +40,7 @@ async function loadContent(): Promise<Content> {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
const docsBody = markdown.getContent(docsContent);
|
||||
const docsBody = await markdown.getContent(docsContent);
|
||||
|
||||
if (!docsHeader.name) {
|
||||
return undefined;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import DOMPurify from 'isomorphic-dompurify';
|
||||
import { marked } from 'marked';
|
||||
import { parse as YAMLParse } from 'yaml';
|
||||
|
||||
const tokens = ['---', '---'];
|
||||
|
@ -19,10 +18,12 @@ export function getRawHeader(data: string): string {
|
|||
return header[1];
|
||||
}
|
||||
|
||||
export function getContent(data: string): string {
|
||||
export async function getContent(data: string): Promise<string> {
|
||||
const marked = await import('marked')
|
||||
|
||||
const content = data.replace(regexContent, '').replace(/<!--(.*?)-->/gm, '');
|
||||
if (!content) {
|
||||
throw new Error("Can't get the content");
|
||||
}
|
||||
return DOMPurify.sanitize(marked(content) as string);
|
||||
return DOMPurify.sanitize(marked.marked(content) as string);
|
||||
}
|
||||
|
|
|
@ -107,8 +107,8 @@ importers:
|
|||
specifier: ^2.19.0
|
||||
version: 2.25.0
|
||||
marked:
|
||||
specifier: ^15.0.5
|
||||
version: 15.0.12
|
||||
specifier: ^16.0.0
|
||||
version: 16.0.0
|
||||
slugify:
|
||||
specifier: ^1.6.6
|
||||
version: 1.6.6
|
||||
|
@ -3768,9 +3768,9 @@ packages:
|
|||
markdown-table@3.0.4:
|
||||
resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}
|
||||
|
||||
marked@15.0.12:
|
||||
resolution: {integrity: sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==}
|
||||
engines: {node: '>= 18'}
|
||||
marked@16.0.0:
|
||||
resolution: {integrity: sha512-MUKMXDjsD/eptB7GPzxo4xcnLS6oo7/RHimUMHEDRhUooPwmN9BEpMl7AEOJv3bmso169wHI2wUF9VQgL7zfmA==}
|
||||
engines: {node: '>= 20'}
|
||||
hasBin: true
|
||||
|
||||
marked@4.3.0:
|
||||
|
@ -10539,7 +10539,7 @@ snapshots:
|
|||
|
||||
markdown-table@3.0.4: {}
|
||||
|
||||
marked@15.0.12: {}
|
||||
marked@16.0.0: {}
|
||||
|
||||
marked@4.3.0: {}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"fuse.js": "^7.0.0",
|
||||
"js-base64": "^3.7.7",
|
||||
"lodash": "^4.17.21",
|
||||
"marked": "^15.0.5",
|
||||
"marked": "^16.0.0",
|
||||
"node-emoji": "^2.2.0",
|
||||
"pinia": "^3.0.0",
|
||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||
|
|
|
@ -42,8 +42,8 @@ importers:
|
|||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
marked:
|
||||
specifier: ^15.0.5
|
||||
version: 15.0.12
|
||||
specifier: ^16.0.0
|
||||
version: 16.0.0
|
||||
node-emoji:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0
|
||||
|
@ -2131,9 +2131,9 @@ packages:
|
|||
markdown-table@3.0.4:
|
||||
resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}
|
||||
|
||||
marked@15.0.12:
|
||||
resolution: {integrity: sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==}
|
||||
engines: {node: '>= 18'}
|
||||
marked@16.0.0:
|
||||
resolution: {integrity: sha512-MUKMXDjsD/eptB7GPzxo4xcnLS6oo7/RHimUMHEDRhUooPwmN9BEpMl7AEOJv3bmso169wHI2wUF9VQgL7zfmA==}
|
||||
engines: {node: '>= 20'}
|
||||
hasBin: true
|
||||
|
||||
mdast-util-find-and-replace@3.0.2:
|
||||
|
@ -5092,7 +5092,7 @@ snapshots:
|
|||
|
||||
markdown-table@3.0.4: {}
|
||||
|
||||
marked@15.0.12: {}
|
||||
marked@16.0.0: {}
|
||||
|
||||
mdast-util-find-and-replace@3.0.2:
|
||||
dependencies:
|
||||
|
|
Loading…
Reference in a new issue