diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93a25a88..2d35aa56 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 cache: "yarn" - name: Install dependencies and Build run: yarn install --frozen-lockfile diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 029a21dc..1c3bb3c0 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 cache: "yarn" - name: Run performance tests run: ./reassure-tests.sh diff --git a/package.json b/package.json index b763b960..7c4199c9 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@testing-library/jest-native": "5.4.2", "@testing-library/react-native": "12.1.2", "@types/jest": "29.5.1", - "@types/marked": "4.3.1", + "@types/marked": "5.0.0", "@types/node": "18.16.16", "@types/react": "18.2.7", "@types/react-native": "0.72.2", @@ -160,9 +160,12 @@ "dependencies": { "@jsamr/counter-style": "2.0.2", "@jsamr/react-native-li": "2.3.1", - "marked": "4.3.0", + "marked": "5.0.3", "react-native-svg": "13.9.0", "react-native-table-component": "1.2.2", "svg-parser": "2.0.4" + }, + "engines": { + "node": ">=18" } } diff --git a/src/hooks/useMarkdown.ts b/src/hooks/useMarkdown.ts index a8ddc910..c79910a0 100644 --- a/src/hooks/useMarkdown.ts +++ b/src/hooks/useMarkdown.ts @@ -37,7 +37,6 @@ const useMarkdown = ( const elements = useMemo(() => { const tokens = marked.lexer(value, { - mangle: false, gfm: true, tokenizer: options?.tokenizer as Tokenizer, }); diff --git a/yarn.lock b/yarn.lock index ea8a70a4..bf2e97b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3457,10 +3457,10 @@ dependencies: "@types/node" "*" -"@types/marked@4.3.1": - version "4.3.1" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.3.1.tgz#45fb6dfd47afb595766c71ed7749ead23f137de3" - integrity sha512-vSSbKZFbNktrQ15v7o1EaH78EbWV+sPQbPjHG+Cp8CaNcPFUEfjZ0Iml/V0bFDwsTlYe8o6XC5Hfdp91cqPV2g== +"@types/marked@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-5.0.0.tgz#3235b9133054e6586eedabfb77aa7d4a4bafbfcf" + integrity sha512-YcZe50jhltsCq7rc9MNZC/4QB/OnA2Pd6hrOSTOFajtabN+38slqgDDCeE/0F83SjkKBQcsZUj7VLWR0H5cKRA== "@types/minimist@^1.2.0": version "1.2.2"