Spaces:
Running
Running
Liam Dyer
commited on
Commit
•
305971b
1
Parent(s):
f12455d
Update marked from v4 to v12 (#1015)
Browse files- package-lock.json +17 -26
- package.json +2 -3
- src/lib/components/chat/ChatMessage.svelte +3 -3
package-lock.json
CHANGED
@@ -23,7 +23,8 @@
|
|
23 |
"ip-address": "^9.0.5",
|
24 |
"jsdom": "^22.0.0",
|
25 |
"json5": "^2.2.3",
|
26 |
-
"marked": "^
|
|
|
27 |
"mongodb": "^5.8.0",
|
28 |
"nanoid": "^4.0.2",
|
29 |
"openid-client": "^5.4.2",
|
@@ -47,7 +48,6 @@
|
|
47 |
"@sveltejs/kit": "^1.30.4",
|
48 |
"@tailwindcss/typography": "^0.5.9",
|
49 |
"@types/jsdom": "^21.1.1",
|
50 |
-
"@types/marked": "^4.0.8",
|
51 |
"@types/minimist": "^1.2.5",
|
52 |
"@types/parquetjs": "^0.10.3",
|
53 |
"@types/uuid": "^9.0.8",
|
@@ -56,7 +56,6 @@
|
|
56 |
"eslint": "^8.28.0",
|
57 |
"eslint-config-prettier": "^8.5.0",
|
58 |
"eslint-plugin-svelte": "^2.30.0",
|
59 |
-
"marked-katex-extension": "^3.0.6",
|
60 |
"minimist": "^1.2.8",
|
61 |
"prettier": "^2.8.0",
|
62 |
"prettier-plugin-svelte": "^2.10.1",
|
@@ -2031,22 +2030,15 @@
|
|
2031 |
"dev": true
|
2032 |
},
|
2033 |
"node_modules/@types/katex": {
|
2034 |
-
"version": "0.16.
|
2035 |
-
"resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.
|
2036 |
-
"integrity": "sha512-
|
2037 |
-
"dev": true
|
2038 |
},
|
2039 |
"node_modules/@types/long": {
|
2040 |
"version": "4.0.2",
|
2041 |
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz",
|
2042 |
"integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA=="
|
2043 |
},
|
2044 |
-
"node_modules/@types/marked": {
|
2045 |
-
"version": "4.0.8",
|
2046 |
-
"resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.0.8.tgz",
|
2047 |
-
"integrity": "sha512-HVNzMT5QlWCOdeuBsgXP8EZzKUf0+AXzN+sLmjvaB3ZlLqO+e4u0uXrdw9ub69wBKFs+c6/pA4r9sy6cCDvImw==",
|
2048 |
-
"dev": true
|
2049 |
-
},
|
2050 |
"node_modules/@types/minimist": {
|
2051 |
"version": "1.2.5",
|
2052 |
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz",
|
@@ -4932,11 +4924,11 @@
|
|
4932 |
"version": "0.16.10",
|
4933 |
"resolved": "https://registry.npmjs.org/katex/-/katex-0.16.10.tgz",
|
4934 |
"integrity": "sha512-ZiqaC04tp2O5utMsl2TEZTXxa6WSC4yo0fv5ML++D3QZv/vx2Mct0mTlRx3O+uUkjfuAgOkzsCmq5MiUEsDDdA==",
|
4935 |
-
"dev": true,
|
4936 |
"funding": [
|
4937 |
"https://opencollective.com/katex",
|
4938 |
"https://github.com/sponsors/katex"
|
4939 |
],
|
|
|
4940 |
"dependencies": {
|
4941 |
"commander": "^8.3.0"
|
4942 |
},
|
@@ -4948,7 +4940,7 @@
|
|
4948 |
"version": "8.3.0",
|
4949 |
"resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
|
4950 |
"integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
|
4951 |
-
"
|
4952 |
"engines": {
|
4953 |
"node": ">= 12"
|
4954 |
}
|
@@ -5128,27 +5120,26 @@
|
|
5128 |
"devOptional": true
|
5129 |
},
|
5130 |
"node_modules/marked": {
|
5131 |
-
"version": "
|
5132 |
-
"resolved": "https://registry.npmjs.org/marked/-/marked-
|
5133 |
-
"integrity": "sha512-
|
5134 |
"bin": {
|
5135 |
"marked": "bin/marked.js"
|
5136 |
},
|
5137 |
"engines": {
|
5138 |
-
"node": ">=
|
5139 |
}
|
5140 |
},
|
5141 |
"node_modules/marked-katex-extension": {
|
5142 |
-
"version": "
|
5143 |
-
"resolved": "https://registry.npmjs.org/marked-katex-extension/-/marked-katex-extension-
|
5144 |
-
"integrity": "sha512-
|
5145 |
-
"dev": true,
|
5146 |
"dependencies": {
|
5147 |
-
"@types/katex": "^0.16.
|
5148 |
-
"katex": "^0.16.8"
|
5149 |
},
|
5150 |
"peerDependencies": {
|
5151 |
-
"
|
|
|
5152 |
}
|
5153 |
},
|
5154 |
"node_modules/md5": {
|
|
|
23 |
"ip-address": "^9.0.5",
|
24 |
"jsdom": "^22.0.0",
|
25 |
"json5": "^2.2.3",
|
26 |
+
"marked": "^12.0.1",
|
27 |
+
"marked-katex-extension": "^5.0.1",
|
28 |
"mongodb": "^5.8.0",
|
29 |
"nanoid": "^4.0.2",
|
30 |
"openid-client": "^5.4.2",
|
|
|
48 |
"@sveltejs/kit": "^1.30.4",
|
49 |
"@tailwindcss/typography": "^0.5.9",
|
50 |
"@types/jsdom": "^21.1.1",
|
|
|
51 |
"@types/minimist": "^1.2.5",
|
52 |
"@types/parquetjs": "^0.10.3",
|
53 |
"@types/uuid": "^9.0.8",
|
|
|
56 |
"eslint": "^8.28.0",
|
57 |
"eslint-config-prettier": "^8.5.0",
|
58 |
"eslint-plugin-svelte": "^2.30.0",
|
|
|
59 |
"minimist": "^1.2.8",
|
60 |
"prettier": "^2.8.0",
|
61 |
"prettier-plugin-svelte": "^2.10.1",
|
|
|
2030 |
"dev": true
|
2031 |
},
|
2032 |
"node_modules/@types/katex": {
|
2033 |
+
"version": "0.16.7",
|
2034 |
+
"resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz",
|
2035 |
+
"integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ=="
|
|
|
2036 |
},
|
2037 |
"node_modules/@types/long": {
|
2038 |
"version": "4.0.2",
|
2039 |
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz",
|
2040 |
"integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA=="
|
2041 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
2042 |
"node_modules/@types/minimist": {
|
2043 |
"version": "1.2.5",
|
2044 |
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz",
|
|
|
4924 |
"version": "0.16.10",
|
4925 |
"resolved": "https://registry.npmjs.org/katex/-/katex-0.16.10.tgz",
|
4926 |
"integrity": "sha512-ZiqaC04tp2O5utMsl2TEZTXxa6WSC4yo0fv5ML++D3QZv/vx2Mct0mTlRx3O+uUkjfuAgOkzsCmq5MiUEsDDdA==",
|
|
|
4927 |
"funding": [
|
4928 |
"https://opencollective.com/katex",
|
4929 |
"https://github.com/sponsors/katex"
|
4930 |
],
|
4931 |
+
"peer": true,
|
4932 |
"dependencies": {
|
4933 |
"commander": "^8.3.0"
|
4934 |
},
|
|
|
4940 |
"version": "8.3.0",
|
4941 |
"resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
|
4942 |
"integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
|
4943 |
+
"peer": true,
|
4944 |
"engines": {
|
4945 |
"node": ">= 12"
|
4946 |
}
|
|
|
5120 |
"devOptional": true
|
5121 |
},
|
5122 |
"node_modules/marked": {
|
5123 |
+
"version": "12.0.1",
|
5124 |
+
"resolved": "https://registry.npmjs.org/marked/-/marked-12.0.1.tgz",
|
5125 |
+
"integrity": "sha512-Y1/V2yafOcOdWQCX0XpAKXzDakPOpn6U0YLxTJs3cww6VxOzZV1BTOOYWLvH3gX38cq+iLwljHHTnMtlDfg01Q==",
|
5126 |
"bin": {
|
5127 |
"marked": "bin/marked.js"
|
5128 |
},
|
5129 |
"engines": {
|
5130 |
+
"node": ">= 18"
|
5131 |
}
|
5132 |
},
|
5133 |
"node_modules/marked-katex-extension": {
|
5134 |
+
"version": "5.0.1",
|
5135 |
+
"resolved": "https://registry.npmjs.org/marked-katex-extension/-/marked-katex-extension-5.0.1.tgz",
|
5136 |
+
"integrity": "sha512-4HYoazLdDpzaEcjKSo334lM4tS38lySWXXwctiN2Bo4Pw3sfuhF0CSiUf92GCGSZiVeTB3diulCGGFdhlKz1zQ==",
|
|
|
5137 |
"dependencies": {
|
5138 |
+
"@types/katex": "^0.16.7"
|
|
|
5139 |
},
|
5140 |
"peerDependencies": {
|
5141 |
+
"katex": ">=0.16 <0.17",
|
5142 |
+
"marked": ">=4 <13"
|
5143 |
}
|
5144 |
},
|
5145 |
"node_modules/md5": {
|
package.json
CHANGED
@@ -24,7 +24,6 @@
|
|
24 |
"@sveltejs/kit": "^1.30.4",
|
25 |
"@tailwindcss/typography": "^0.5.9",
|
26 |
"@types/jsdom": "^21.1.1",
|
27 |
-
"@types/marked": "^4.0.8",
|
28 |
"@types/minimist": "^1.2.5",
|
29 |
"@types/parquetjs": "^0.10.3",
|
30 |
"@types/uuid": "^9.0.8",
|
@@ -33,7 +32,6 @@
|
|
33 |
"eslint": "^8.28.0",
|
34 |
"eslint-config-prettier": "^8.5.0",
|
35 |
"eslint-plugin-svelte": "^2.30.0",
|
36 |
-
"marked-katex-extension": "^3.0.6",
|
37 |
"minimist": "^1.2.8",
|
38 |
"prettier": "^2.8.0",
|
39 |
"prettier-plugin-svelte": "^2.10.1",
|
@@ -65,7 +63,8 @@
|
|
65 |
"ip-address": "^9.0.5",
|
66 |
"jsdom": "^22.0.0",
|
67 |
"json5": "^2.2.3",
|
68 |
-
"marked": "^
|
|
|
69 |
"mongodb": "^5.8.0",
|
70 |
"nanoid": "^4.0.2",
|
71 |
"openid-client": "^5.4.2",
|
|
|
24 |
"@sveltejs/kit": "^1.30.4",
|
25 |
"@tailwindcss/typography": "^0.5.9",
|
26 |
"@types/jsdom": "^21.1.1",
|
|
|
27 |
"@types/minimist": "^1.2.5",
|
28 |
"@types/parquetjs": "^0.10.3",
|
29 |
"@types/uuid": "^9.0.8",
|
|
|
32 |
"eslint": "^8.28.0",
|
33 |
"eslint-config-prettier": "^8.5.0",
|
34 |
"eslint-plugin-svelte": "^2.30.0",
|
|
|
35 |
"minimist": "^1.2.8",
|
36 |
"prettier": "^2.8.0",
|
37 |
"prettier-plugin-svelte": "^2.10.1",
|
|
|
63 |
"ip-address": "^9.0.5",
|
64 |
"jsdom": "^22.0.0",
|
65 |
"json5": "^2.2.3",
|
66 |
+
"marked": "^12.0.1",
|
67 |
+
"marked-katex-extension": "^5.0.1",
|
68 |
"mongodb": "^5.8.0",
|
69 |
"nanoid": "^4.0.2",
|
70 |
"openid-client": "^5.4.2",
|
src/lib/components/chat/ChatMessage.svelte
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<script lang="ts">
|
2 |
-
import { marked } from "marked";
|
3 |
import markedKatex from "marked-katex-extension";
|
4 |
import type { Message } from "$lib/types/Message";
|
5 |
import { afterUpdate, createEventDispatcher, tick } from "svelte";
|
@@ -82,11 +82,11 @@
|
|
82 |
};
|
83 |
|
84 |
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
85 |
-
const { extensions, ...defaults } = marked.getDefaults() as
|
86 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
87 |
extensions: any;
|
88 |
};
|
89 |
-
const options:
|
90 |
...defaults,
|
91 |
gfm: true,
|
92 |
breaks: true,
|
|
|
1 |
<script lang="ts">
|
2 |
+
import { marked, type MarkedOptions } from "marked";
|
3 |
import markedKatex from "marked-katex-extension";
|
4 |
import type { Message } from "$lib/types/Message";
|
5 |
import { afterUpdate, createEventDispatcher, tick } from "svelte";
|
|
|
82 |
};
|
83 |
|
84 |
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
85 |
+
const { extensions, ...defaults } = marked.getDefaults() as MarkedOptions & {
|
86 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
87 |
extensions: any;
|
88 |
};
|
89 |
+
const options: MarkedOptions = {
|
90 |
...defaults,
|
91 |
gfm: true,
|
92 |
breaks: true,
|