Skip to content

Commit fc65a10

Browse files
authored
Merge pull request #24 from matrix-org/langleyd/web_emoji_151
Bump emojibase emoji version to 15.1 for web
2 parents cbda50b + 9b80428 commit fc65a10

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/workflows/ios.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
build:
1010
name: Validate Swift
11-
runs-on: macos-12
11+
runs-on: macos-14
1212

1313
concurrency:
1414
# When running on main, use the sha to allow all runs of this workflow to run concurrently.
@@ -18,8 +18,8 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v3
21-
- name: Set XCode 14.2
22-
run: sudo xcode-select -switch /Applications/Xcode_14.2.app
21+
- name: Set XCode 15.2
22+
run: sudo xcode-select -switch /Applications/Xcode_15.2.app
2323

2424
- name: Tests
2525
run: exec ./platforms/ios/ios-tests.sh

platforms/ios/ios-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -eo pipefail
55
xcodebuild test \
66
-scheme Emojibase \
77
-sdk iphonesimulator \
8-
-destination 'platform=iOS Simulator,name=iPhone 14,OS=16.2'
8+
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17.2'

src/emoji.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface Emoji extends Omit<CompactEmoji, "shortcodes"> {
2424
shortcodes: string[];
2525
}
2626

27-
const MAX_EMOJI_VERSION_WEB = 15.0;
27+
const MAX_EMOJI_VERSION_WEB = 15.1;
2828

2929
// The unicode is stored without the variant selector
3030
const UNICODE_TO_EMOJI = new Map<string, Emoji>(); // not exported as gets for it are handled by getEmojiFromUnicode
@@ -77,7 +77,7 @@ export const DATA_BY_CATEGORY: Record<string, Emoji[]> = {
7777
// in unison with twemoji.
7878
const MAX_EMOJI_VERSION: number =
7979
parseFloat(<string>process.env.MAX_EMOJI_VERSION) || MAX_EMOJI_VERSION_WEB;
80-
console.log(`emojibase MAX_EMOJI_VERSION ${MAX_EMOJI_VERSION}`);
80+
8181
// The compact version of emojibase does not have version stored on the emoji object
8282
// but there does existing a map of version to emoji.
8383
// Create a map of emoji to version so that we can lookup an emoji version and filter.

test/emoji-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ describe("Emojis", () => {
4141
expect(getEmojiFromUnicode("🙂")?.hexcode).toBe("1F642");
4242
});
4343

44-
it("that emojis with version greater than MAX_EMOJI_VERSION_WEB are not included", async () => {
45-
expect(getEmojiFromUnicode("🙂‍↔️")?.hexcode).toBeUndefined();
44+
it("that emojis with MAX_EMOJI_VERSION_WEB == 15.1 are included", async () => {
45+
expect(getEmojiFromUnicode("🙂‍↔️")?.hexcode).toBe("1F642-200D-2194-FE0F");
4646
});
4747

4848
it("that emojis with version===1 should work", async () => {

0 commit comments

Comments
 (0)