[wp-trac] [WordPress Trac] #48293: Update Twemoji to version 12.1.3

WordPress Trac noreply at wordpress.org
Sun Nov 3 21:22:17 UTC 2019


#48293: Update Twemoji to version 12.1.3
----------------------------------------+-----------------------
 Reporter:  desrosj                     |       Owner:  matstars
     Type:  feature request             |      Status:  assigned
 Priority:  normal                      |   Milestone:  5.4
Component:  Emoji                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+-----------------------

Comment (by matstars):

 @desrosj @pento @dd32

 The latest version of Twemoji
 (https://github.com/twitter/twemoji/releases/tag/v12.0.4) includes some
 replacement emojis and no new ones. This is validated by doing a diff
 versus the latest s.w.org CDN's
 `https://s.w.org/images/core/emoji/12.0.0-1/72x72` and
 `https://s.w.org/images/core/emoji/12.0.0-1/svg` (analogous) directories
 compared to the Twemoji release, and seeing that it's all modifications
 (no adds or deletes).

 Looks like to me that we have two paths that we can go down:

 1. We could replace the assets from the latest Twemoji release in the path
 that is serving the current CDN, i.e.
 `https://s.w.org/images/core/emoji/12.0.0-1/72x72` and
 `https://s.w.org/images/core/emoji/12.0.0-1/svg` and then, if possible,
 purge the CDN cache on all URLs beginning with   those paths. Even if we
 do this, given the current cache TTL is ten years (`cache-control: max-
 age=315360000`). Anything that has the assets cached will not see the
 changed emoji for a long time without any other intervention. This is
 rather easy I'd imagine, would require updating the 22 or so diffed assets
 in place where the current assets are stored that are being served by CDN.
 After doing that, I believe the only update in code would be changing the
 package.lock and re-running npm install.

 2. We can add the whole updated image-set including the 12.1.3 changes
 into a new directory on the CDN, i.e.
 `https://s.w.org/images/core/emoji/12.1.3/72x72/` and
 `https://s.w.org/images/core/emoji/12.1.3/svg/` and serve the new assets
 from there -- a corresponding update of the URLs being referenced need to
 be updated, i.e. replace the four or so places where the 12.0.0-1 is
 referenced in code, e.g.,

 {{{
 'baseUrl' => apply_filters( 'emoji_url',
 'https://s.w.org/images/core/emoji/12.0.4/72x72/' ),
 }}}

 to

 {{{
 'baseUrl' => apply_filters( 'emoji_url',
 'https://s.w.org/images/core/emoji/12.0.0-1/72x72/' ),
 }}}

 along with updating the package.lock and re-running npm install. Without
 any institutional knowledge, the second option makes the most sense as it
 is cut and dry and less likely to see inconsistencies, but I am not sure
 if doing so would be labor intensive or would require any additional work.

 Let me know your thoughts.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48293#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list