Make WordPress Core


Ignore:
Timestamp:
01/30/2025 08:42:03 PM (13 months ago)
Author:
jorbin
Message:

External Libraries: Append .1 to react/react-dom versions.

In 6.7, [58775] changed the way react and react-dom are bundled in Core. This commit resulted in some changes to the built files that are distributed in WordPress even though the actual version of the libraries remained the same. The result can be a blank white screen when trying to edit a post when those two script files are heavily cached.

This uses .1 as the appendage to prevent issues with third party code expecting the version number in the form /^[\d\.]+$/.

Updates include tests in Tests_Dependencies_Scripts::test_vendor_script_versions_registered_manually to include the modified version used for cache busting.

Reviewed by jorbin.
Merges [59536] and [59540] to 6.7 branch.

Props levskipg, get_dave, smerriman, jdnd, juanwp22, seanlanglands, robertstaddon, azaozz, peterwilsoncc, desrosj.
Fixes #62422.

Location:
branches/6.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.7

  • branches/6.7/src/wp-includes/script-loader.php

    r59135 r59741  
    107107
    108108    $vendor_scripts_versions = array(
    109         'react'                       => '18.3.1',
    110         'react-dom'                   => '18.3.1',
     109        'react'                       => '18.3.1.1', // Final .1 due to switch to UMD build, can be removed in the next update.
     110        'react-dom'                   => '18.3.1.1', // Final .1 due to switch to UMD build, can be removed in the next update.
    111111        'react-jsx-runtime'           => '18.3.1',
    112112        'regenerator-runtime'         => '0.14.1',
Note: See TracChangeset for help on using the changeset viewer.