Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/long-mirrors-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Updates emoji-toolkit dependency to version 9.0.0 for newer emoji support
2 changes: 1 addition & 1 deletion apps/meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"drachtio-srf": "patch:drachtio-srf@npm%3A5.0.12#~/.yarn/patches/drachtio-srf-npm-5.0.12-b0b1afaad6.patch",
"ejson": "^2.2.3",
"emailreplyparser": "^0.0.5",
"emoji-toolkit": "^7.0.1",
"emoji-toolkit": "^9.0.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check npm registry for emoji-toolkit version 9.0.0 availability
echo "=== Checking npm registry for emoji-toolkit v9.x versions ==="
curl -s https://registry.npmjs.org/emoji-toolkit | jq -r '.versions | keys[] | select(startswith("9."))' | sort -V

echo -e "\n=== Checking if v9.0.0 specifically exists ==="
curl -s https://registry.npmjs.org/emoji-toolkit/9.0.0 | jq -r '.version, .dist.tarball' 2>/dev/null || echo "Version not found or error occurred"

echo -e "\n=== Checking recent versions ==="
curl -s https://registry.npmjs.org/emoji-toolkit | jq -r '.versions | keys[]' | tail -20

Repository: RocketChat/Rocket.Chat

Length of output: 414


🌐 Web query:

emoji-toolkit v9.0.0 breaking changes release notes changelog

💡 Result:

Summary — emoji-toolkit v9.0.0

  • Brought the toolkit up to date with JoyPixels 9.0 (Emoji set) and Unicode 15.1. [1]
  • See the GitHub release notes for v9.0.0 (short entry: "This update brings the toolkit up to date with JoyPixels 9.0, Unicode 15.1"). [1]
  • Related JoyPixels 9.0 design/emoji changes (Emoji 15.1 support, many redesigned emojis and flag format changes) are documented on the JoyPixels/Emojipedia posts. [2]
  • npm package info for emoji-toolkit (shows v9.0.x series). [3]

Links / sources
[1] GitHub — joypixels/emoji-toolkit releases (v9.0.0 entry). (github.com)
[2] JoyPixels / JoyPixels 9.0 (Emoji 15.1 changelog / blog). (blog.emojipedia.org)
[3] npm package page for emoji-toolkit (versions / release info). (npmjs.com)

If you want, I can extract the exact files changed in the v9.0.0 tag (diff), or paste the full release text/assets.

Citations:


🏁 Script executed:

#!/bin/bash
# Check how emoji-toolkit is being used in the codebase
echo "=== Searching for emoji-toolkit imports and usage ==="
rg "emoji-toolkit|emojione" --type js --type ts -l

echo -e "\n=== Checking package.json for current emoji-toolkit version ==="
grep -A2 -B2 "emoji-toolkit" apps/meteor/package.json

Repository: RocketChat/Rocket.Chat

Length of output: 1663


🌐 Web query:

emoji-toolkit v7 to v9 API breaking changes migration guide

💡 Result:

Here’s a concise migration checklist and the important breaking changes when moving emoji-toolkit (JoyPixels) from v7 → v9, with links to the project sources to verify details.

Quick summary (actionable items)

  • Update package and names: replace any legacy "emojione" identifiers with "joypixels" / emoji-toolkit (library was rebranded). Install emoji-toolkit@^9.0.0. [1][2]
  • Data file changes: adopt the newer emoji JSON structure (categories.json, subcategory added; sort_order is globally unique). Update any code that assumed the old CSV/column names or earlier JSON layouts. [2][3]
  • Shortname / alias changes: some primary shortnames were renamed (many older shortnames moved into aliases). Update lookups that assume a particular primary shortname. Use the alias list in emoji JSON to maintain backwards compatibility. [2]
  • Unicode / sequence handling: newer versions add many Unicode sequences (skin tones, gender combos, new emoji). Ensure your parser recognizes non-qualified/qualified sequences and uses the toolkit’s output codepoint attributes if you rely on native Unicode generation. [2]
  • API/class renames: if you used emojione-specific class/file names, switch to JoyPixels/emoji-toolkit equivalents per the UPGRADE docs. Search your code for "emojione" and replace. [1]
  • Asset paths / image sets: file names/paths and available image sets (PNG/sprites) may differ between releases — verify your build/static asset references and update to the v9 image set if you host images locally or change CDN paths. [1][3]
  • Behavior changes to expect: newer releases update emoji mapping (aliases, shortnames), and add/modify fields (e.g., subcategory). Run integration tests that cover: shortname → emoji lookup, unicode generation, image URL generation, skin-tone combinations, and replacement in HTML/text. [2][3]

Minimal migration steps

  1. Upgrade package:
    • npm: npm install emoji-toolkit@^9 --save. Verify package version. [3]
  2. Grep/replace legacy identifiers:
    • Replace "emojione" occurrences with "joypixels" / "emoji-toolkit" in your codebase and build scripts. [1]
  3. Update data handling:
    • Load categories.json (new) and update any code that relied on previous CSV column names (alpha_code → alpha_code/aliases, etc.). Adjust for subcategory and global sort_order. [2]
  4. Update shortname lookups:
    • If you relied on specific primary shortnames, consult emoji.json / aliases to map old shortnames to the new primary shortnames. Prefer resolving via aliases array to maintain compatibility. [2]
  5. Test Unicode sequences & skin tones:
    • Validate that composite sequences (ZWJ, skin tone modifiers) are handled correctly and that your native output generation uses the toolkit’s output codepoint attributes when needed. [2]
  6. Verify assets:
    • Update image/sprite URLs and licensing if you use JoyPixels artwork (verify free vs. paid license per your usage). [1][3]
  7. Run full regression on emoji-related features.

References

  • emoji-toolkit (JoyPixels) repository (README / UPGRADE doc / files). [1]
  • yarn/npm changelog and release notes showing v8 changes and data-structure changes (aliases, categories). [2][4]
  • npm package page for emoji-toolkit (current versions and install instructions). [3]

If you want, I can:

  • produce a repo-wide codemod (sed/ts-morph) to rename identifiers and update asset paths,
  • or generate a short script to map old shortnames → new primary shortnames using the toolkit’s emoji.json. Which would you prefer?

Sources
[1] joypixels/emoji-toolkit — GitHub repository (README + UPGRADE).
[2] emoji-toolkit changelog / package history (yarn/npm changelog entries showing v8/v7 notes).
[3] emoji-toolkit — npm package page (current versions & install info).


🏁 Script executed:

#!/bin/bash
# Check a few key files to understand how emoji-toolkit is actually being used
echo "=== Checking emoji-toolkit type definitions ==="
cat ee/packages/pdf-worker/src/types/emoji-toolkit.ts

echo -e "\n=== Checking main emoji-emojione library usage ==="
head -50 apps/meteor/app/emoji-emojione/server/lib.ts

echo -e "\n=== Checking emoji parser usage ==="
head -50 apps/meteor/app/emoji/client/emojiParser.ts

Repository: RocketChat/Rocket.Chat

Length of output: 3560


emoji-toolkit v9.0.0 requires substantial refactoring—current integration is incompatible with the breaking changes.

Version 9.0.0 exists and is stable, but the upgrade introduces major breaking changes that are not reflected in the current codebase:

  • Rebranding & naming: Library renamed from "emojione" to "joypixels"/"emoji-toolkit". The codebase still references emoji.packages.emojione, expects .emojione CSS classes, and uses legacy "emojione" identifiers throughout.
  • Data structure changes: Categories, aliases, and shortname mappings were reorganized. The current code assumes the old structure.
  • API surface: The type definitions only expose toShort(), but no comprehensive API definition exists to verify compatibility with the broader emoji-toolkit v9 API.

Before merging, either:

  1. Revert to emoji-toolkit v7 (or v8) until a full migration to emoji-toolkit v9 is planned, or
  2. Implement the breaking changes: rename emoji.packages.emojioneemoji.packages.joypixels, update CSS class selectors (.emojione.emoji), and refactor emoji data loading to match the v9 structure.

No active security vulnerabilities were found for v9.0.0.

🤖 Prompt for AI Agents
In @apps/meteor/package.json at line 196, Your package.json currently pins
"emoji-toolkit": "^9.0.0" but the codebase still uses legacy emojione
identifiers (e.g., emoji.packages.emojione, ".emojione" CSS classes and old data
structures/aliases and relies on APIs like toShort()); either downgrade the
dependency to a compatible v7/v8 in package.json or update the code to the v9
API by renaming references from emoji.packages.emojione to
emoji.packages.joypixels, replace CSS selectors ".emojione" with the new
".emoji" (or v9 equivalent), and refactor any emoji data-loading/mapping logic
to match v9’s reorganized categories/aliases/shortname structures and available
methods.

"emojione": "^4.5.0",
"esl": "^11.2.1",
"eventemitter3": "^5.0.1",
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9530,7 +9530,7 @@ __metadata:
drachtio-srf: "patch:drachtio-srf@npm%3A5.0.12#~/.yarn/patches/drachtio-srf-npm-5.0.12-b0b1afaad6.patch"
ejson: "npm:^2.2.3"
emailreplyparser: "npm:^0.0.5"
emoji-toolkit: "npm:^7.0.1"
emoji-toolkit: "npm:^9.0.0"
emojione: "npm:^4.5.0"
emojione-assets: "npm:^4.5.0"
esl: "npm:^11.2.1"
Expand Down Expand Up @@ -20429,6 +20429,13 @@ __metadata:
languageName: node
linkType: hard

"emoji-toolkit@npm:^9.0.0":
version: 9.0.1
resolution: "emoji-toolkit@npm:9.0.1"
checksum: 10/e2dd3edda04f3b6c0850512438cca8952a2750f04d884b9939850e08a77c296c36b824a298eca42cdce6cd6027df52684e4753cf3d1856a0e5a24560f084d5ee
languageName: node
linkType: hard

"emojione-assets@npm:^4.5.0":
version: 4.5.0
resolution: "emojione-assets@npm:4.5.0"
Expand Down