Skip to content

Commit

Permalink
upgrade to emoji 15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eramdam authored and iamcal committed Nov 13, 2023
1 parent fb8d0f2 commit 08a80d2
Show file tree
Hide file tree
Showing 16 changed files with 2,270 additions and 2,197 deletions.
1 change: 0 additions & 1 deletion build/build.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
'google' => 2,
'twitter' => 4,
'facebook' => 8,
'messenger' => 16,
);


Expand Down
2 changes: 1 addition & 1 deletion build/emoji-data
Submodule emoji-data updated 12184 files
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function(config) {
files: [
'test/preamble.js',
'lib/emoji.min.js',
'test/*.js'
"test/*.js",
],
exclude: [
],
Expand Down
4,432 changes: 2,249 additions & 2,183 deletions lib/emoji.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/emoji.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lib"
],
"dependencies": {
"emoji-datasource": "7.0.2"
"emoji-datasource": "15.0.1"
},
"devDependencies": {
"jasmine-core": "~3.7",
Expand Down
1 change: 1 addition & 0 deletions test/aliases.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ describe("Aliases", function(){
var emoji = new EmojiConvertor();

emoji.img_set = 'apple';
emoji.replace_mode = 'css';
emoji.img_sets.apple.path = '/';
emoji.use_css_imgs = false;
emoji.colons_mode = false;
Expand Down
1 change: 1 addition & 0 deletions test/colons.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ describe("Colons replacer", function(){
var emoji = new EmojiConvertor();

emoji.img_set = 'apple';
emoji.replace_mode = 'css';
emoji.img_sets.apple.path = '/';
emoji.use_css_imgs = false;
emoji.colons_mode = false;
Expand Down
1 change: 1 addition & 0 deletions test/emoticons.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ describe("Emoticons replacer", function(){
var emoji = new EmojiConvertor();

emoji.img_set = 'apple';
emoji.replace_mode = 'css';
emoji.img_sets.apple.path = '/';
emoji.use_css_imgs = false;
emoji.colons_mode = false;
Expand Down
3 changes: 2 additions & 1 deletion test/fallbacks.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe("Fallbacks", function(){
emoji.img_sets.twitter.sheet = '/t.png';
emoji.img_sets.facebook.sheet = '/f.png';

emoji.replace_mode = 'css';
emoji.use_css_imgs = false;
emoji.colons_mode = false;
emoji.text_mode = false;
Expand All @@ -31,7 +32,7 @@ describe("Fallbacks", function(){

var short_name_a = ':woman-golfing:';
var codepoints_a = '1f3cc-fe0f-200d-2640-fe0f';
var positions_a = '15.254237288135593% 74.57627118644068%';
var positions_a = '15% 58.333333333333336%';


it("falls back correctly with images", function(){
Expand Down
3 changes: 2 additions & 1 deletion test/modes.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe("Correctly supports different modes", function(){
var emoji = new EmojiConvertor();

emoji.img_set = 'apple';
emoji.replace_mode = 'css';
emoji.img_sets.apple.path = '/';
emoji.img_sets.apple.sheet = '/sheet.png';
emoji.colons_mode = false;
Expand All @@ -19,7 +20,7 @@ describe("Correctly supports different modes", function(){
emoji.use_sheet = true;
emoji.use_css_imgs = false;

expect(emoji.replace_colons(':cloud:')).toBe(emoji_sheet_cp_path('2601-fe0f', '/sheet.png', '93.22033898305085% 76.27118644067797%'));
expect(emoji.replace_colons(':cloud:')).toBe(emoji_sheet_cp_path('2601-fe0f', '/sheet.png', '95% 18.333333333333332%'));
});

it("Uses CSS classes with CSS background-sizing support", function(){
Expand Down
5 changes: 3 additions & 2 deletions test/obsoletes.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ describe("Obsoletes", function(){
emoji.img_sets.google.path = '/g/';
emoji.img_sets.google.sheet = '/g.png';

emoji.replace_mode = 'css';
emoji.use_css_imgs = false;
emoji.colons_mode = false;
emoji.text_mode = false;
emoji.include_title = false;
emoji.allow_native = false;
emoji.avoid_ms_emoji = true;

var ok_woman_pos = '57.6271186440678% 42.3728813559322%';
var ok_man_pos = '57.6271186440678% 52.54237288135593%';
var ok_woman_pos = '55% 88.33333333333333%';
var ok_man_pos = '55% 98.33333333333333%';

it("converts unified to the new form", function(){

Expand Down
2 changes: 1 addition & 1 deletion test/preamble.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ function emoji_image_cp_path(cp, path, img_cp){
}

function emoji_sheet_cp_path(cp, path, b_pos){
var bg_size = '6000%';
var bg_size = '6100%';
return '<span class="emoji-outer emoji-sizer"><span class="emoji-inner" style="background: url('+path+');background-position:'+b_pos+';background-size:'+bg_size+' '+bg_size+'" data-codepoints="'+cp+'"></span></span>';
}
1 change: 1 addition & 0 deletions test/skin_variations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ describe("Skin variations", function(){
var emoji = new EmojiConvertor();

emoji.img_set = 'apple';
emoji.replace_mode = 'css';
emoji.img_sets.apple.path = '/';
emoji.use_css_imgs = false;
emoji.colons_mode = false;
Expand Down
1 change: 1 addition & 0 deletions test/unified.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ describe("Unified replacer", function(){
var emoji = new EmojiConvertor();

emoji.img_set = 'apple';
emoji.replace_mode = 'css';
emoji.img_sets.apple.path = '/';
emoji.use_css_imgs = false;
emoji.colons_mode = false;
Expand Down

0 comments on commit 08a80d2

Please sign in to comment.