WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/17/2020 05:38:40 PM (7 months ago)
Author:
SergeyBiryukov
Message:

External Libraries: Update Moment.js to 2.26.0.

Changelog: https://github.com/moment/moment/compare/2.22.2...2.26.0

This commit also fixes a deprecation warning regarding the usage of moment.locale() to set locale properties.

As of Moment.js 2.12.0, moment.locale() is deprecated and moment.updateLocale() should be used instead.

Additionally, minimize moment.js as part of build process to remove the source map reference.

This avoids a sourceMappingURL being in the minified file, as we don't ship source maps.

Props yoancutillas, SergeyBiryukov.
Fixes #50408.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r48067 r48075  
    9696        'react'                       => '16.9.0',
    9797        'react-dom'                   => '16.9.0',
    98         'moment'                      => '2.22.2',
     98        'moment'                      => '2.26.0',
    9999        'lodash'                      => '4.17.15',
    100100        'wp-polyfill-fetch'           => '3.0.0',
     
    140140        'moment',
    141141        sprintf(
    142             "moment.locale( '%s', %s );",
     142            "moment.updateLocale( '%s', %s );",
    143143            get_user_locale(),
    144144            wp_json_encode(
Note: See TracChangeset for help on using the changeset viewer.