@mkody/twitch-emoticons 2.9.5 → 2.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SECURITY.md +3 -2
- package/dist/TwitchEmoticons.min.js +11 -11
- package/dist/TwitchEmoticons.min.js.map +4 -4
- package/docs/index.html +1 -1
- package/docs/struct_TwitchEmote.js.html +3 -3
- package/package.json +10 -10
- package/src/struct/TwitchEmote.js +3 -3
- package/test/SevenTV.test.js +4 -4
- package/test/__snapshots__/ToFromObject.test.js.snap +1 -1
package/docs/index.html
CHANGED
|
@@ -83,13 +83,13 @@ class TwitchEmote extends Emote {
|
|
|
83
83
|
* If emote is animated.
|
|
84
84
|
* @type {boolean}
|
|
85
85
|
*/
|
|
86
|
-
this.animated = 'animated'
|
|
86
|
+
this.animated = data.formats.includes('animated');
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* The image type of the emote.
|
|
90
90
|
* @type {string}
|
|
91
91
|
*/
|
|
92
|
-
this.imageType = 'animated'
|
|
92
|
+
this.imageType = data.formats.includes('animated') ? 'gif' : 'png';
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/**
|
|
@@ -126,7 +126,7 @@ class TwitchEmote extends Emote {
|
|
|
126
126
|
code: emoteObject.code,
|
|
127
127
|
animated: emoteObject.animated,
|
|
128
128
|
emoticon_set: emoteObject.set,
|
|
129
|
-
formats: emoteObject.animated ?
|
|
129
|
+
formats: emoteObject.animated ? ['static', 'animated'] : ['static']
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mkody/twitch-emoticons",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.7",
|
|
4
4
|
"description": "Gets Twitch, BTTV, FFZ and 7TV emotes as well as parsing text to emotes!",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "typings/index.d.ts",
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@twurple/api": "^7.4.0",
|
|
30
30
|
"@twurple/auth": "^7.4.0",
|
|
31
|
-
"axios": "^1.13.
|
|
31
|
+
"axios": "^1.13.6"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@eslint/js": "^
|
|
35
|
-
"@jest/globals": "^30.
|
|
34
|
+
"@eslint/js": "^10.0.1",
|
|
35
|
+
"@jest/globals": "^30.3.0",
|
|
36
36
|
"@microsoft/eslint-formatter-sarif": "^3.1.0",
|
|
37
37
|
"docdash": "^2.0.2",
|
|
38
|
-
"esbuild": "^0.27.
|
|
39
|
-
"eslint": "^
|
|
40
|
-
"eslint-plugin-jsdoc": "^
|
|
41
|
-
"globals": "^
|
|
42
|
-
"jest": "^30.
|
|
38
|
+
"esbuild": "^0.27.4",
|
|
39
|
+
"eslint": "^10.0.3",
|
|
40
|
+
"eslint-plugin-jsdoc": "^62.8.0",
|
|
41
|
+
"globals": "^17.4.0",
|
|
42
|
+
"jest": "^30.3.0",
|
|
43
43
|
"jsdoc": "^4.0.5"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"node": ">=18.0.0",
|
|
66
66
|
"pnpm": ">=9"
|
|
67
67
|
},
|
|
68
|
-
"packageManager": "pnpm@10.
|
|
68
|
+
"packageManager": "pnpm@10.32.1",
|
|
69
69
|
"pnpm": {
|
|
70
70
|
"onlyBuiltDependencies": [
|
|
71
71
|
"esbuild",
|
|
@@ -36,13 +36,13 @@ class TwitchEmote extends Emote {
|
|
|
36
36
|
* If emote is animated.
|
|
37
37
|
* @type {boolean}
|
|
38
38
|
*/
|
|
39
|
-
this.animated = 'animated'
|
|
39
|
+
this.animated = data.formats.includes('animated');
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* The image type of the emote.
|
|
43
43
|
* @type {string}
|
|
44
44
|
*/
|
|
45
|
-
this.imageType = 'animated'
|
|
45
|
+
this.imageType = data.formats.includes('animated') ? 'gif' : 'png';
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -79,7 +79,7 @@ class TwitchEmote extends Emote {
|
|
|
79
79
|
code: emoteObject.code,
|
|
80
80
|
animated: emoteObject.animated,
|
|
81
81
|
emoticon_set: emoteObject.set,
|
|
82
|
-
formats: emoteObject.animated ?
|
|
82
|
+
formats: emoteObject.animated ? ['static', 'animated'] : ['static']
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
}
|
package/test/SevenTV.test.js
CHANGED
|
@@ -15,12 +15,12 @@ describe('Test 7TV emotes', () => {
|
|
|
15
15
|
|
|
16
16
|
test('Get emote (EZ)', () => {
|
|
17
17
|
const emote = emoteFetcher.emotes.get('EZ');
|
|
18
|
-
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/
|
|
18
|
+
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/01GB4CK01800090V9B3D8CGEEX/3x.webp');
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
test('Parse string with emote (EZ)', () => {
|
|
22
22
|
const text = emoteParser.parse('This is a test string with :EZ: in it.');
|
|
23
|
-
expect(text).toBe('This is a test string with .toBe('This is a test string with  in it.');
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
|
|
@@ -37,12 +37,12 @@ describe('Test 7TV emotes', () => {
|
|
|
37
37
|
|
|
38
38
|
test('Get emote (Clap)', () => {
|
|
39
39
|
const emote = emoteFetcher.emotes.get('Clap');
|
|
40
|
-
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/
|
|
40
|
+
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/01GAM8EFQ00004MXFXAJYKA859/3x.avif');
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
test('Parse string with emote (Clap)', () => {
|
|
44
44
|
const text = emoteParser.parse('This is a test string with :Clap: in it.');
|
|
45
|
-
expect(text).toBe('This is a test string with .toBe('This is a test string with  in it.');
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
|