Emoji: Upgrade Twemoji to 12.1.2.
This upgrade adds support for the transgender flag: 🏳️⚧️ There's some additional housekeeping in this commit: - Twemoji recently rearranged their repository and package, so `Gruntfile.js` needed tweaking to allow for that. - As only new files were added in this Twemoji release, the CDN version didn't need updating. Fixes #47852. git-svn-id: https://develop.svn.wordpress.org/trunk@45769 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0d9ec05d2c
commit
c645936163
@ -173,7 +173,7 @@ module.exports = function(grunt) {
|
||||
[ WORKING_DIR + 'wp-includes/js/jquery/jquery-migrate.min.js' ]: [ './node_modules/jquery-migrate/dist/jquery-migrate.min.js' ],
|
||||
[ WORKING_DIR + 'wp-includes/js/jquery/jquery.form.js' ]: [ './node_modules/jquery-form/src/jquery.form.js' ],
|
||||
[ WORKING_DIR + 'wp-includes/js/masonry.min.js' ]: [ './node_modules/masonry-layout/dist/masonry.pkgd.min.js' ],
|
||||
[ WORKING_DIR + 'wp-includes/js/twemoji.js' ]: [ './node_modules/twemoji/2/twemoji.js' ],
|
||||
[ WORKING_DIR + 'wp-includes/js/twemoji.js' ]: [ './node_modules/twemoji/dist/twemoji.js' ],
|
||||
[ WORKING_DIR + 'wp-includes/js/underscore.js' ]: [ './node_modules/underscore/underscore.js' ],
|
||||
},
|
||||
{
|
||||
@ -1021,7 +1021,7 @@ module.exports = function(grunt) {
|
||||
grunt.log.writeln( 'Fetching list of Twemoji files...' );
|
||||
|
||||
// Fetch a list of the files that Twemoji supplies
|
||||
files = spawn( 'svn', [ 'ls', 'https://github.com/twitter/twemoji.git/branches/gh-pages/2/assets' ] );
|
||||
files = spawn( 'svn', [ 'ls', 'https://github.com/twitter/twemoji.git/trunk/assets/svg' ] );
|
||||
if ( 0 !== files.status ) {
|
||||
grunt.fatal( 'Unable to fetch Twemoji file list' );
|
||||
}
|
||||
@ -1029,7 +1029,7 @@ module.exports = function(grunt) {
|
||||
entities = files.stdout.toString();
|
||||
|
||||
// Tidy up the file list
|
||||
entities = entities.replace( /\.ai/g, '' );
|
||||
entities = entities.replace( /\.svg/g, '' );
|
||||
entities = entities.replace( /^$/g, '' );
|
||||
|
||||
// Convert the emoji entities to HTML entities
|
||||
|
68
package-lock.json
generated
68
package-lock.json
generated
@ -11196,16 +11196,14 @@
|
||||
}
|
||||
},
|
||||
"grunt-patch-wordpress": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/grunt-patch-wordpress/-/grunt-patch-wordpress-1.0.0.tgz",
|
||||
"integrity": "sha512-2wvtOqxMhiu7QCujEAvFFvLfUYec0fKDvFRnwKUSHizl5eH8cgXv6t0yc7W4yEeito/u8v8r8fzDHRhXLkIXzA==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/grunt-patch-wordpress/-/grunt-patch-wordpress-2.0.0.tgz",
|
||||
"integrity": "sha512-9iCcgsZjBY6XPT25yFkln+7o/roy3zwF+RfrTZaTNVGXR1eEVWIPfjF0DJKMTvaqVIPXQyUq2uJ7/D65rAxiuA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"grunt": ">=0.4.5",
|
||||
"grunt": "^1.0.3",
|
||||
"inquirer": "^5.1.0",
|
||||
"request": "^2.83.0",
|
||||
"underscore": "~1.8.3",
|
||||
"underscore.string": "~3.3.4",
|
||||
"xmlrpc": "^1.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -21245,17 +21243,56 @@
|
||||
"dev": true
|
||||
},
|
||||
"twemoji": {
|
||||
"version": "12.0.1",
|
||||
"resolved": "https://registry.npmjs.org/twemoji/-/twemoji-12.0.1.tgz",
|
||||
"integrity": "sha512-9jFbDzI4M7wQFX++QQp+t9wHupjL0WdOnE2pNAmJwxchQKw0yRhZD8qm+teHJQdeuvZMu9eJR7RVEpZPPbbYPw==",
|
||||
"version": "12.1.2",
|
||||
"resolved": "https://registry.npmjs.org/twemoji/-/twemoji-12.1.2.tgz",
|
||||
"integrity": "sha512-myi1YKL4nXBWorlmHDxHxHTCpel0e0jGtWQwwab0XyCAf3r9PnkZX0c+IAnPW+K6+TKXBJulMRPifeMhiPKYuw==",
|
||||
"requires": {
|
||||
"twemoji-parser": "12.0.0"
|
||||
"fs-extra": "^8.0.1",
|
||||
"jsonfile": "^5.0.0",
|
||||
"twemoji-parser": "12.1.0",
|
||||
"universalify": "^0.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"fs-extra": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
||||
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^4.0.0",
|
||||
"universalify": "^0.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonfile": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.1.tgz",
|
||||
"integrity": "sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw=="
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz",
|
||||
"integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6",
|
||||
"universalify": "^0.1.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"twemoji-parser": {
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-12.0.0.tgz",
|
||||
"integrity": "sha512-JWZHBY32zKXo6GQ/JIQGLbbSQ5a3k+NHh5VkQ5AJFA++6cr+EtErj1aG8H4K7x8GwQ9/YzArNBQ06ryvKZL+WQ=="
|
||||
"version": "12.1.0",
|
||||
"resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-12.1.0.tgz",
|
||||
"integrity": "sha512-jaHYltumP/E8nR+YzRrY753j9dEpL3zH8+pDXgf9h/10wHeW/9IIjs6mZ1Z/Syh8rIaOQObev1BAX/AinFmuOg=="
|
||||
},
|
||||
"type-check": {
|
||||
"version": "0.3.2",
|
||||
@ -21540,6 +21577,11 @@
|
||||
"unist-util-is": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"universalify": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
|
||||
},
|
||||
"unpipe": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||
|
@ -118,7 +118,7 @@
|
||||
"polyfill-library": "3.27.4",
|
||||
"react": "16.8.4",
|
||||
"react-dom": "16.8.4",
|
||||
"twemoji": "12.0.1",
|
||||
"twemoji": "12.1.2",
|
||||
"underscore": "1.8.3",
|
||||
"whatwg-fetch": "3.0.0"
|
||||
},
|
||||
|
@ -68,6 +68,22 @@
|
||||
|
||||
switch ( type ) {
|
||||
case 'flag':
|
||||
/*
|
||||
* Test for Transgender flag compatibility. This flag is shortlisted for the Emoji 13 spec,
|
||||
* but has landed in Twemoji early, so we can add support for it, too.
|
||||
*
|
||||
* To test for support, we try to render it, and compare the rendering to how it would look if
|
||||
* the browser doesn't render it correctly (white flag emoji + transgender symbol).
|
||||
*/
|
||||
isIdentical = emojiSetsRenderIdentically(
|
||||
[ 0x1F3F3, 0xFE0F, 0x200D, 0x26A7, 0xFE0F ],
|
||||
[ 0x1F3F3, 0xFE0F, 0x200B, 0x26A7, 0xFE0F ]
|
||||
);
|
||||
|
||||
if ( isIdentical ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test for UN flag compatibility. This is the least supported of the letter locale flags,
|
||||
* so gives us an easy test for full support.
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user