dependencies: Upgrade emoji-datasource from 4.0.4 to 5.0.1.

The “Smileys & People” category has been split into “Smilys & Emotion”
and “People & Body”.

Also, fix generate_sha1sum_emoji to read the emoji-datasource-google
version from yarn.lock, since package.json only gives a version range.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-02-04 20:45:02 -08:00
parent f4b02ce31e
commit e88fac499f
6 changed files with 34 additions and 25 deletions

View File

@ -7,7 +7,7 @@ run_test('initialize', () => {
emoji_picker.initialize();
const complete_emoji_catalog = _.sortBy(emoji_picker.complete_emoji_catalog, 'name');
assert.equal(complete_emoji_catalog.length, 9);
assert.equal(complete_emoji_catalog.length, 10);
assert.equal(_.keys(emoji.emojis_by_name).length, 1037);
function assert_emoji_category(ele, icon, num) {
@ -24,13 +24,14 @@ run_test('initialize', () => {
check_emojis(false);
}
}
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-car', 177);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-hashtag', 181);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-smile-o', 260);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-thumbs-o-up', 6);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-lightbulb-o', 159);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-cutlery', 89);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-car', 170);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-hashtag', 180);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-smile-o', 129);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-star-o', 6);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-thumbs-o-up', 102);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-lightbulb-o', 191);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-cutlery', 92);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-cog', 1);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-leaf', 107);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-soccer-ball-o', 58);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-leaf', 104);
assert_emoji_category(complete_emoji_catalog.pop(), 'fa-soccer-ball-o', 63);
});

View File

@ -19,9 +19,9 @@
"clipboard": "^2.0.4",
"core-js": "^3.0.1",
"css-loader": "^3.2.0",
"emoji-datasource-google": "^4.0.4",
"emoji-datasource-google": "^5.0.1",
"emoji-datasource-google-blob": "npm:emoji-datasource-google@^3.0.0",
"emoji-datasource-twitter": "^4.0.4",
"emoji-datasource-twitter": "^5.0.1",
"error-stack-parser": "^2.0.2",
"expose-loader": "^0.7.5",
"file-loader": "^4.0.0",

View File

@ -318,10 +318,17 @@ def generate_sha1sum_emoji(zulip_path):
dependency_data = parsed_package_file['dependencies']
if 'emoji-datasource-google' in dependency_data:
emoji_datasource_version = dependency_data['emoji-datasource-google'].encode('utf-8')
with open(os.path.join(zulip_path, "yarn.lock")) as fp:
(emoji_datasource_version,) = re.findall(
r"^emoji-datasource-google@"
+ re.escape(dependency_data["emoji-datasource-google"])
+ r':\n version "(.*)"',
fp.read(),
re.M,
)
else:
emoji_datasource_version = b"0"
sha.update(emoji_datasource_version)
emoji_datasource_version = "0"
sha.update(emoji_datasource_version.encode())
return sha.hexdigest()

View File

@ -29,8 +29,9 @@ let edit_message_id = null;
function get_all_emoji_categories() {
return [
{ name: "Popular", icon: "fa-thumbs-o-up" },
{ name: "Smileys & People", icon: "fa-smile-o" },
{ name: "Popular", icon: "fa-star-o" },
{ name: "Smileys & Emotion", icon: "fa-smile-o" },
{ name: "People & Body", icon: "fa-thumbs-o-up" },
{ name: "Animals & Nature", icon: "fa-leaf" },
{ name: "Food & Drink", icon: "fa-cutlery" },
{ name: "Activities", icon: "fa-soccer-ball-o" },

View File

@ -26,4 +26,4 @@ LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.org/2019/12/13/zulip-2-1-relea
# historical commits sharing the same major version, in which case a
# minor version bump suffices.
PROVISION_VERSION = '67.3'
PROVISION_VERSION = '68.0'

View File

@ -3727,15 +3727,15 @@ elliptic@^6.0.0:
resolved "https://registry.yarnpkg.com/emoji-datasource-google/-/emoji-datasource-google-3.0.0.tgz#d6f77b56385338e10667d2b150dbe9f9b5a4e921"
integrity sha1-1vd7VjhTOOEGZ9KxUNvp+bWk6SE=
emoji-datasource-google@^4.0.4:
version "4.1.0"
resolved "https://registry.yarnpkg.com/emoji-datasource-google/-/emoji-datasource-google-4.1.0.tgz#d69be74d48c76ee2bb9fcb4e7920f27fa12dde9e"
integrity sha1-1pvnTUjHbuK7n8tOeSDyf6Et3p4=
emoji-datasource-google@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/emoji-datasource-google/-/emoji-datasource-google-5.0.1.tgz#81ac5bdbbd153976196a516d840e04303f19375d"
integrity sha512-JLlz6tcuNRqg/BUhfWjWmOAaj8VhBvF7E88yRblMh+6c3IBmSeAqlYbepsavS1QPEhhvZICGUkch7+yxWTrRlQ==
emoji-datasource-twitter@^4.0.4:
version "4.1.0"
resolved "https://registry.yarnpkg.com/emoji-datasource-twitter/-/emoji-datasource-twitter-4.1.0.tgz#e374a6ec87e071561e47b07ddb00b3bf4326d2a2"
integrity sha1-43Sm7IfgcVYeR7B92wCzv0Mm0qI=
emoji-datasource-twitter@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/emoji-datasource-twitter/-/emoji-datasource-twitter-5.0.1.tgz#a4e1c85e4def8235cadbcd85fbce32a2335d165c"
integrity sha512-PiQav2Y6V/P3FjA6p5GJRhzbINv/yc6pn/YCuyJFmk/ZZzI++COXyPCC7SUv9HUeKnJWK+gdj1josUK0vCjvvA==
emoji-regex@^7.0.1:
version "7.0.3"