Tags
2.9.9: Be prepared for future 7TV v3 changes (2nd)
> 2.9.8 was first published with a minor misunderstanding of what value to use. Sorry about that.
**NOTE:** Only the 2.9.x releases are now supported for security releases.
(And maybe very breaking things like this release is preventing.)
A breaking 3.x is releasing soon.
This release updates all dependencies as far as possible, and has a
change for an upcoming 7TV API change.
It was announced that `/v3/users/:platform/:platform_id` will stop
providing the user's `emote-set` directly in its response.
It will be required "in the near future" to first call that endpoint and
then call `/v3/emote-sets/:emote_set_id`, like we do for Global (who has
`global` as its "id").
Please check out the
[2.9.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.9.0)
to see what's new in 2.9.x.
Artifacts
2.9.8: Be prepared for future 7TV v3 changes
**NOTE:** Only the 2.9.x releases are now supported for security releases.
(And maybe very breaking things like this release is preventing.)
A breaking 3.x is releasing soon.
This release updates all dependencies as far as possible, and has a
change for an upcoming 7TV API change.
It was announced that `/v3/users/:platform/:platform_id` will stop
providing the user's `emote-set` directly in its response.
It will be required "in the near future" to first call that endpoint and
then call `/v3/emote-sets/:emote_set_id`, like we do for Global (who has
`global` as its "id").
Please check out the
[2.9.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.9.0)
to see what's new in 2.9.x.
Artifacts
3.0.0-beta.7: Add an `allowNSFW` option to EmoteParser
**3.x introduces breaking changes!**
Please read the release notes of 3.0.0-beta.1!
You should also probably take a look at beta.2, beta.3, beta.4, beta.5, and
beta.6's changelogs.
This seventh beta makes one more **BREAKING CHANGE** compared to before:
- The `EmoteParser` now has an `allowNSFW` option, set to `false` by default.
This prevents rendering "NSFW" emotes using `EmoteParser.parse()`, which is a
flag currently only available to emotes from 7TV when they are flagged
"Sexual"/"Twitch disallowed" or they are unlisted.
- Unlisted 7TV emotes are now setting the `nsfw` attribute to `true`.
- Migrated to pnpm v11.
- Updated Twurple to 8.1.4.
- And updated some devDeps.
Artifacts
3.0.0-beta.6: Change default RegEx to be more broad
**3.x introduces breaking changes!**
Please read the release notes of 3.0.0-beta.1!
You should also probably take a look at beta.2, beta.3, beta.4, and beta.5's
changelogs.
This sixth beta makes one more change to the new default RegEx:
- By default, we now use `/([^\s]+)/g` to match emotes (fixes #75).
- Updated to Twurple 8.1.3.
- And updated some devDeps.
Artifacts
3.0.0-beta.5: Docs and minor fixes
**3.x introduces breaking changes!**
Please read the release notes of 3.0.0-beta.1!
You should also probably take a look at beta.2, beta.3, and beta.4's changelogs.
This fifth beta doesn't bring much but it's still some neat changes:
- Added JSDocs to the TS types, as some tools might be looking for hints
there (and hopefully it looks better on JSR too)!
- Learned about `@linkcode` in JSDocs, so there's a bunch of them now.
- Changed how I check that you don't init the base `Emote` object with
something that should cause less issues. Nobody reported it to me, but
I've seen forks/patches in the wild who changed this so there you go.
- Linked this project to Rita.moe's SonarQube Server.
- Various improvements to the docs in general.
- And updated some devDeps.
Artifacts
2.9.7: Fix TwitchEmote.animated and bump deps
**NOTE:** Only the 2.9.x releases are now supported for security releases.
A breaking 3.x is releasing soon.
This release updates all dependencies as far as possible,
but also includes a fix for `TwitchEmote`s where the `animated` property
was always set to false, due to an incorrect check.
Please check out the
[2.9.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.9.0)
to see what's new in 2.9.x.
Artifacts
3.0.0-beta.4: Fix types
**3.x introduces breaking changes!**
Please read the release notes of 3.0.0-beta.1!
You should also probably take a look at beta.2's and beta.3's changelogs.
This fourth beta has one possible breaking change, plus revised TS types
and JSDocs.
- If you somehow used `EmoteFetcher.globalChannel`, it has now been removed.
- Types were seriously out-of-sync. They now reflect better what's
actually in our classes and have all the new stuff.
- JSDocs were also fixed.
- Did some reordering and formatting.
Artifacts
3.0.0-beta.3: Fixes and more emote properties
**3.x introduces breaking changes!**
Please read the release notes of 3.0.0-beta.1!
A fix, an internal change, and a new feature in this third beta.
- Added an action to fail if not all package versions are aligned.
- Updated `actions/checkout` to v6.
- Bump deps, it should remove security alerts about flatted.
- More docs changes, mostly making sure to use traditional English,
and adding more details (plus the new features).
- Move from 7TV's v3 REST to their v3 GraphQL.
- Added new properties to 7TV emotes: `nsfw` and `zeroWidth`.
(Exports were updated.)
- Added new property to FFZ emotes: `zeroWidth`.
(Exports were updated.)
- Twitch animated emotes were not properly flagged as such.
- Parser has new variables to use in your templates, they return
"true" or "false": `{is-animated}`, `{is-nsfw}`, `{is-zero-width}`.
- Tests were updated to check for more emote's attributes.
(This caught the bug with Twitch animated emotes.)
Artifacts
3.0.0-beta.2: Documentation and formating
**3.x introduces breaking changes!**
Please read the release notes of 3.0.0-beta.1!
Minor things in this second beta:
- Updated Action, it should now automatically release pre-releases too.
- Bump deps, it should remove security alerts about minimatch.
- Improved documentation with a section that presents our two main objects and the important methods to use this library.
- Also fixed some grammar and typos.
- Improved code style and usage with an update to our ESLint rules and SonarQube suggesting changes.
Artifacts
3.0.0-beta.1: Breaking changes and modernization
**This release has breaking changes!**
You can find the commit history for this beta.1 in this PR:
https://github.com/mkody/twitch-emoticons/pull/60
- Node.js 20 is required; we've set the minimum to 20.18.1.
*This library is now an ECMAScript module, so you can use proper `import {...} from '...'` imports.*
- The initialization of `EmoteFetcher` changed to only use an object as the first parameter for options.
- API keys for Twitch must now be set with `twitchAppID` and `twitchAppSecret` properties.
- The previously available `apiClient` is now set in this object too.
- The defaults for `EmoteParser` changed to use the `html` template, and it doesn't require `:colons:` by default (using `/(\w+)/` to match any words).
- The default `html` template doesn't have `twitch-emote-{size}` anymore in its `class` attribute.
*The `size` isn't consistent between the different sources, so it can't reliably be used.*
- The `EmoteFetcher.fetchSevenTVEmotes()`, `Emote.toLink()`, and `EmoteParse.parse()` methods now have their options as an object.
- `fetcher.fetchSevenTVEmotes(null, { format: 'avif' })` - The first parameter is still the Twitch user ID (or `null` for global).
- `emote.toLink({ size: 1, forceStatic: true, themeMode: 'light' })`
- `parser.parse('Kappa', { size: 2, forceStatic: true, themeMode: 'dark' })` - The first parameter is still the input text.
- The `owner` getter for `Emote`s has been removed.
*It isn't reliable to get the `Channel` object, more so with 3rd-party providers since emotes might be owned by a channel that we never fetched (for shared/public emotes).*
- If you've exported 7TV emotes, do note that the `sizes` array changed to not include the leading `x.<format>`.
- **More may come for the final release, as this is still a work in progress.**
Other stuff:
- Bump all deps, including Twurple to 8.x (requires node 20 and ESM).
- Remove Axios, use native `fetch()`.
- Complete some enhancement issues that I've left on the side for too long (fixes #37, fixes #38).
- Move to [neostandard](https://github.com/neostandard/neostandard) style code, just a personal choice.
- Prepare for release [on JSR](https://jsr.io/docs/publishing-packages).
Previews for browser usage are already set up ("normal", ESM, userscript):
- https://s.kdy.ch/twitch-emoticons/index.html
- https://s.kdy.ch/twitch-emoticons/index.esm.html
- https://s.kdy.ch/twitch-emoticons/userscript.html
Artifacts
2.9.6: Dependencies update
**NOTE:** Only the 2.9.x releases are now supported for security releases.
A breaking 3.x is releasing soon.
This is a maintenance release, no changes to the library.
- Updated axios to 1.13.5.
- Updated devDependencies.
- Security vuls from peer-dependencies were fixed in pnpm-lock.
- Tests were updated for 7TV's seasonal emotes.
Please check out the
[2.9.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.9.0)
to see what's new in 2.9.x.
Artifacts
2.9.5: Fix typings and deps update
- Thanks @mulekick for finding and fixing the typing for Collection
(PR #57, closes #56)
- Updated axios to 1.13.2.
- Updated devDependencies.
- Updated GitHub Actions.
- Updated config for the docs.
- Now building and testing on Node 24, using pnpm 10.24.0.
Please check out the
[2.9.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.9.0)
to see what's new in 2.9.x.
Artifacts
2.9.4: Dependencies update
This is a maintenance release, no changes to the library.
- Updated dependencies, mainly:
- `@twurple/*` to 7.4.0
- `axios` to 1.12.2
- Update Github Actions tags
- Added `@throws` tags for docs
- Added JSDoc and tests for `_validateOptions`
- Update tests and snapshots for 7TV's Halloween emotes
Please check out the
[2.9.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.9.0)
to see what's new in 2.9.x.
Artifacts
2.9.3: Dependencies update
This is a maintenance release, no changes to the library.
Please check out the
[2.9.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.9.0)
to see what's new in 2.9.x.
Artifacts
2.9.2: Dependencies update
This is a maintenance release, no changes to the library.
Please check out the
[2.9.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.9.0)
to see what's new in 2.9.x.
Artifacts
2.9.1: Dependencies update
This is a maintenance release, no changes to the library.
Please check out the
[2.9.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.9.0)
to see what's new in 2.9.x.
Artifacts
2.9.0: Support renamed 7TV channel emotes
When you add a 7TV emote to your channel, the platform gives you the option to
use a different name than the one set by the emote uploader.
An oversight led to the library to still use the original name and not the
renamed version when fetching the channel's emotes.
For example, the original "fubukiYabe" has been renamed to "YABE" in my chat.
Before: "YABE" would not be parsed, only "fubukiYabe".
Now: "YABE" works. But note that "fubukiYabe" doesn't, which is to be expected!
Artifacts
2.8.10: Dependencies update
⚠️ Minimal Node version was set to 18.
This is a maintenance release, no changes to the library.
Please check out the
[2.8.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.0)
for the what's new in 2.8.x and the
[2.8.3 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.3)
about the experimental ESM bundle.
Artifacts
2.8.9: Dependencies update
This is just a maintenance release, no changes to the library.
Please check out the
[2.8.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.0)
for the what's new in 2.8.x and the
[2.8.3 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.3)
about the experimental ESM bundle.
Artifacts
2.8.8: Dependencies update
This is just a maintenance release, no changes to the library.
Please check out the
[2.8.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.0)
for the what's new in 2.8.x and the
[2.8.3 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.3)
about the experimental ESM bundle.
Artifacts
2.8.7: Dependencies update
This release contains a security update for `follow-redirects`.
See: CVE-2024-28849 ; GHSA-cxjh-pqwp-8mfp
All other deps have been updated too, including Twurple to 7.1.0.
GitHub Actions workflows have been updated too.
Artifacts
2.8.6: Dependencies update
This is just a maintenance release, no changes to the library.
Please check out the
[2.8.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.0)
for the what's new in 2.8.x and the
[2.8.3 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.3)
about the experimental ESM bundle.
Artifacts
2.8.5: Dependencies update
This is just a maintenance release, no changes to the library.
Happy new year!
Please check out the
[2.8.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.0)
for the what's new in 2.8.x and the
[2.8.3 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.3)
about the experimental ESM bundle.
Artifacts
2.8.4: Dependencies update
One of our dependencies - Axios - got a security update.
We're releasing 2.8.4 to clear those big red warnings.
Please check out the
[2.8.0 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.0)
for the what's new in 2.8.x and the
[2.8.3 release notes](https://github.com/mkody/twitch-emoticons/releases/tag/2.8.3)
about the experimental ESM bundle.
Artifacts
2.8.3: Update dependencies and experimental bundle
This release is pretty much only updates to our dependencies.
The project is also now being tested using the Jest framework!
Better than the custom solution from upstream.
**[EXPERIMENTAL]** There's also a bundled ESM version available.
Check out this quick POC and its source code:
https://s.kdy.ch/twitch-emoticons/
(This is a republishing of 2.8.2 but with a proper .npmignore)
Artifacts
2.8.1: Update typings
The new `options` parameter in EmoteFetcher wasn't referenced.
This release also includes a now working "contributors" field in
package.json, and the `json` parameter in EmoteFetcher.fromObject() has
been renamed to `emotesArray`.
Please look at the 2.8.0 release notes for what's new in 2.8.x.
Artifacts
2.8.0: toObject, fromObject, use your ApiClient
This release, in addition to upgrading our Twurple to 7.x, brings three new features:
- `Emote.toObject()` (#31 - @Tzahi12345): You can export the data of an emote for caching or offline use.
```js
const emote = emoteFetcher.emotes.get('Kappa').toObject();
/*
{
id: '25',
type: 'twitch',
code: 'Kappa',
animated: false,
channel_id: null,
set: undefined
}
*/
```
- `Fetcher.fromObject()` (#31 - @Tzahi12345): You can import an array of emotes directly into the fetcher.
```js
emoteFetcher.fromObject([emote]);
```
- The `EmoteFetcher` now accepts an object as a third parameter for options. (#33)
The only option for now is `apiClient` and it allows you to use your own `@twurple/api`'s `ApiClient` object, in case you already have one or want to manage authentification without app tokens.
Note that the first two parameters of `EmoteFetcher` will be unused in this case and can be left as `null`.
```js
const { ApiClient } = require('@twurple/api');
const { StaticAuthProvider } = require('@twurple/auth');
const authProvider = new StaticAuthProvider('<your client id>', '<your token>');
const apiClient = new ApiClient({ authProvider });
const fetcher = new EmoteFetcher(null, null, { apiClient });
```
Artifacts
2.7.1: Owner emote might be null; Use `axios` for requests
This release handles the case where 7TV or FFZ emotes might not have an `owner`
object. When it happens, the `owner` property for the emote will be `null`.
This was already the case for BTTV. Check for nullable values!
Typings where updated/fixed to reflect that.
This project also switched to `axios` to make API requests to the 3rd party
emotes services.
`got` 12.x requires us to switch to ESM but I'm not 100% comfortable in
doing so yet. And `axios` got better since the last time I checked.
This change should be transparent for everyone.
Artifacts
2.7.0: BTTV WEBP; FFZ global, animated and modifier emotes support
This release introduces quite some changes.
- An `animated` property is now present on emotes if they are supposed to be animated.
- We now load the WEBP version of BetterTTV emotes.
- The `SEVENTV` constant is now called `SevenTV` - in case you used it.
- The package now supports animated emotes from FrankerFaceZ. They are hosted at a different CDN address.
- Added support to load the FFZ global emotes.
- When you fetch any FFZ global or channel emotes, the package will fetch the list of "modifiers" emotes once.
- They will be removed from the output as they are not supposed to be shown.
- Modifier emotes who are supposed to be hidden have a `modifier` property set to `true`.
- Support to actually add a class to modified emotes is not planned.
- Note that there's nothing in place for the BTTV modifiers.
- Updated twurple to 6.0.9.
Artifacts
This is a maintenance release.
Updated dependencies:
- twurple: 5.2.7 => 6.0.6
Updated devDependecies:
- docdash: 2.0.0 => 2.0.1
- eslint: 8.29.0 => 8.35.0
- jsdoc: 4.0.0 => 4.0.2
Note: got is held back on 11.x since 12.x requires ESM.
Artifacts
This release supports Twitch's new Emotes CDN URL template. This new template can now return an `image/gif` for animated emotes.
Dependecies were also updated.
Artifacts
Twitch emotes now fetched via Twitch Helix API
This package now requires to pass a Twitch Client ID and a Client Secret
to `EmoteFetcher` before fetching Twitch emotes.
See the updated "Example" in README.
To create a Twitch app: https://dev.twitch.tv/console/apps/create