Skip to content
This repository was archived by the owner on May 20, 2024. It is now read-only.

Commit 4c4a171

Browse files
nicksellenNick Sellen
authored andcommitted
Update emoji (#2714)
Emoji's broke because maxcdn stopped hosting the assets (see https://github.com/twitter/twemoji). We can't just upgrade the library as Elon Musk's changes at twitter mean they don't support it any more. We could just change the asset URL but I thought we might as well update to a maintained fork (https://github.com/jdecked/twemoji), and get emoji v15 in the process 🫨 Backend: https://codeberg.org/karrot/karrot-backend/pulls/1295 Reviewed-on: https://codeberg.org/karrot/karrot-frontend/pulls/2714 Co-authored-by: Nick Sellen <git@nicksellen.co.uk> Co-committed-by: Nick Sellen <git@nicksellen.co.uk>
1 parent c9dd100 commit 4c4a171

5 files changed

Lines changed: 26 additions & 26 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"@quasar/extras": "^1.16.5",
4646
"@sentry/vue": "^7.59.2",
4747
"@tanstack/vue-query": "^4.29.25",
48+
"@twemoji/api": "^15.1.0",
4849
"@vuelidate/core": "^2.0.3",
4950
"@vuelidate/validators": "^2.0.3",
5051
"@vueuse/core": "^10.2.1",
@@ -64,7 +65,7 @@
6465
"livekit-client": "^1.15.5",
6566
"loglevel": "^1.8.1",
6667
"markdown-it": "^13.0.1",
67-
"markdown-it-emoji": "^2.0.2",
68+
"markdown-it-emoji": "^3.0.0",
6869
"markdown-it-link-attributes": "^4.0.1",
6970
"markdown-it-regexp": "^0.4.0",
7071
"mitt": "^3.0.1",
@@ -73,7 +74,6 @@
7374
"rollup": "^3.26.3",
7475
"rrule": "^2.7.2",
7576
"sortablejs": "^1.15.0",
76-
"twemoji": "^14.0.2",
7777
"v-tooltip": "^2.1.3",
7878
"vite": "^4.4.4",
7979
"vue": "^3.3.4",

src/messages/components/ConversationAddReactionInner.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</template>
2828

2929
<script>
30-
import emojiList from 'markdown-it-emoji/lib/data/full.json'
30+
import emojiList from 'markdown-it-emoji/lib/data/full.mjs'
3131
import {
3232
QInput,
3333
QIcon,

src/messages/components/EmojiButton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
</template>
1515

1616
<script>
17-
import emojiList from 'markdown-it-emoji/lib/data/full.json'
17+
import twemoji from '@twemoji/api'
18+
import emojiList from 'markdown-it-emoji/lib/data/full.mjs'
1819
import { QBtn } from 'quasar'
19-
import twemoji from 'twemoji'
2020
2121
const EMOJI_CACHE = {}
2222
function getEmojiElement (name) {

src/utils/components/markdownRenderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import twemoji from '@twemoji/api'
12
import markdownIt from 'markdown-it'
2-
import emoji from 'markdown-it-emoji'
3+
import { full as emoji } from 'markdown-it-emoji'
34
import defaultEmojiShortcuts from 'markdown-it-emoji/lib/data/shortcuts'
45
import markdownLinkAttributes from 'markdown-it-link-attributes'
56
import RegexPlugin from 'markdown-it-regexp'
67
import utils from 'markdown-it-regexp/lib/utils'
7-
import twemoji from 'twemoji'
88

99
// Override to pass the env through...
1010
RegexPlugin.prototype.render = function (tokens, id, options, env) {

yarn.lock

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3230,6 +3230,21 @@
32303230
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
32313231
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
32323232

3233+
"@twemoji/api@^15.1.0":
3234+
version "15.1.0"
3235+
resolved "https://registry.yarnpkg.com/@twemoji/api/-/api-15.1.0.tgz#66fc74c74accbcb6376d977560a03bba5215923c"
3236+
integrity sha512-CySXR4/e6vY0z9lC2tW9EVjsH6zzz2/LQvLRMwwpHsDI4xcaweSIP+LcESf1Mq7w2/zcrrhG4ozniMvpSsEXag==
3237+
dependencies:
3238+
"@twemoji/parser" "15.1.0"
3239+
fs-extra "^8.0.1"
3240+
jsonfile "^5.0.0"
3241+
universalify "^0.1.2"
3242+
3243+
"@twemoji/parser@15.1.0":
3244+
version "15.1.0"
3245+
resolved "https://registry.yarnpkg.com/@twemoji/parser/-/parser-15.1.0.tgz#ad83b69fcd1fbcb705022f2b85d73e127ad5f335"
3246+
integrity sha512-3HTiSxPvkWUJ4kZeCvwyKlIwkpTUfBOk6igpBBRQni58ceQMv5YK4smkc8vX/eqOlMMNER/9qobv+Q6Q8LVrqA==
3247+
32333248
"@types/aria-query@^5.0.1":
32343249
version "5.0.1"
32353250
resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.1.tgz#3286741fb8f1e1580ac28784add4c7a1d49bdfbc"
@@ -8767,10 +8782,10 @@ map-or-similar@^1.5.0:
87678782
resolved "https://registry.yarnpkg.com/map-or-similar/-/map-or-similar-1.5.0.tgz#6de2653174adfb5d9edc33c69d3e92a1b76faf08"
87688783
integrity sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==
87698784

8770-
markdown-it-emoji@^2.0.2:
8771-
version "2.0.2"
8772-
resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz#cd42421c2fda1537d9cc12b9923f5c8aeb9029c8"
8773-
integrity sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ==
8785+
markdown-it-emoji@^3.0.0:
8786+
version "3.0.0"
8787+
resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-3.0.0.tgz#8475a04d671d7c93f931b76fb90c582768b7f0b5"
8788+
integrity sha512-+rUD93bXHubA4arpEZO3q80so0qgoFJEKRkRbjKX8RTdca89v2kfyF+xR3i2sQTwql9tpPZPOQN5B+PunspXRg==
87748789

87758790
markdown-it-link-attributes@^4.0.1:
87768791
version "4.0.1"
@@ -11837,21 +11852,6 @@ tunnel-agent@^0.6.0:
1183711852
dependencies:
1183811853
safe-buffer "^5.0.1"
1183911854

11840-
twemoji-parser@14.0.0:
11841-
version "14.0.0"
11842-
resolved "https://registry.yarnpkg.com/twemoji-parser/-/twemoji-parser-14.0.0.tgz#13dabcb6d3a261d9efbf58a1666b182033bf2b62"
11843-
integrity sha512-9DUOTGLOWs0pFWnh1p6NF+C3CkQ96PWmEFwhOVmT3WbecRC+68AIqpsnJXygfkFcp4aXbOp8Dwbhh/HQgvoRxA==
11844-
11845-
twemoji@^14.0.2:
11846-
version "14.0.2"
11847-
resolved "https://registry.yarnpkg.com/twemoji/-/twemoji-14.0.2.tgz#c53adb01dab22bf4870f648ca8cc347ce99ee37e"
11848-
integrity sha512-BzOoXIe1QVdmsUmZ54xbEH+8AgtOKUiG53zO5vVP2iUu6h5u9lN15NcuS6te4OY96qx0H7JK9vjjl9WQbkTRuA==
11849-
dependencies:
11850-
fs-extra "^8.0.1"
11851-
jsonfile "^5.0.0"
11852-
twemoji-parser "14.0.0"
11853-
universalify "^0.1.2"
11854-
1185511855
type-check@^0.4.0, type-check@~0.4.0:
1185611856
version "0.4.0"
1185711857
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"

0 commit comments

Comments
 (0)