Make WordPress Core

Changeset 63983


Ignore:
Timestamp:
09/28/2026 11:22:05 PM (13 hours ago)
Author:
peterwilsoncc
Message:

External Libraries: Update jQuery Migrate to 3.6.0.

Updates jQuery Migrate from 3.4.1 to 3.6.0. This also removes the library from the committed src/js/_enqueues/vendor/jquery/ directory in favour of updating via NPM.

This is the first step in the upgrade path for jQuery 4.0.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/13787.

Props clorith, jorbin, mukesh27, westonruter.
Fixes #66203.
See #60478.

Location:
trunk
Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r63919 r63983  
    371371                                                [ WORKING_DIR + 'wp-includes/js/jquery/jquery.js' ]: [ './node_modules/jquery/dist/jquery.js' ],
    372372                                                [ WORKING_DIR + 'wp-includes/js/jquery/jquery.min.js' ]: [ './node_modules/jquery/dist/jquery.min.js' ],
     373                                                [ WORKING_DIR + 'wp-includes/js/jquery/jquery-migrate.js' ]: [ './node_modules/jquery-migrate/dist/jquery-migrate.js' ],
     374                                                [ WORKING_DIR + 'wp-includes/js/jquery/jquery-migrate.min.js' ]: [ './node_modules/jquery-migrate/dist/jquery-migrate.min.js' ],
    373375                                                [ WORKING_DIR + 'wp-includes/js/jquery/jquery.form.js' ]: [ './node_modules/jquery-form/src/jquery.form.js' ],
    374376                                                [ WORKING_DIR + 'wp-includes/js/jquery/jquery.color.min.js' ]: [ './node_modules/jquery-color/dist/jquery.color.min.js' ],
    … …  
    16041606                                        {
    16051607                                                expand: true,
     1608                                                cwd: BUILD_DIR + 'wp-includes/js/jquery',
     1609                                                src: [
     1610                                                        'jquery-migrate.js',
     1611                                                        'jquery-migrate.min.js'
     1612                                                ],
     1613                                                dest: BUILD_DIR + 'wp-includes/js/jquery/'
     1614                                        },
     1615                                        {
     1616                                                expand: true,
    16061617                                                cwd: BUILD_DIR + 'wp-includes/js/dist/',
    16071618                                                src: [ '*.js' ],
  • trunk/package-lock.json

    r63784 r63983  
    2626                                "jquery-form": "4.3.0",
    2727                                "jquery-hoverintent": "1.10.2",
     28                                "jquery-migrate": "3.6.0",
    2829                                "jsonlint": "1.6.3",
    2930                                "lodash": "4.18.1",
    … …  
    2008020081                        }
    2008120082                },
     20083                "node_modules/jquery-migrate": {
     20084                        "version": "3.6.0",
     20085                        "resolved": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-3.6.0.tgz",
     20086                        "integrity": "sha512-2k3GMQXXEellCOkj8tczgCd/Y0KMm7LErz4rE6CkHIZV1JTUDlgs7XFN+GpwGKXDQtw/HsjtJuE+CS8IfEOnPg==",
     20087                        "license": "MIT",
     20088                        "peerDependencies": {
     20089                                "jquery": ">=3 <4"
     20090                        }
     20091                },
    2008220092                "node_modules/js-library-detector": {
    2008320093                        "version": "6.7.0",
  • trunk/package.json

    r63784 r63983  
    112112                "jquery-form": "4.3.0",
    113113                "jquery-hoverintent": "1.10.2",
     114                "jquery-migrate": "3.6.0",
    114115                "jsonlint": "1.6.3",
    115116                "lodash": "4.18.1",
  • trunk/src/wp-includes/script-loader.php

    r63620 r63983  
    907907        $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '3.7.1' );
    908908        $scripts->add( 'jquery-core', "/wp-includes/js/jquery/jquery$suffix.js", array(), '3.7.1' );
    909         $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '3.4.1' );
     909        $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '3.6.0' );
    910910
    911911        /*
  • trunk/tests/phpunit/tests/dependencies/jquery.php

    r55565 r63983  
    3838                        $this->assertSame( $jquery_scripts[ $dep ], $o->src );
    3939                }
     40        }
     41
     42        /**
     43         * Ensure the required jQuery files exist on the file system.
     44         *
     45         * @ticket 60478
     46         *
     47         * @dataProvider data_jquery_files_exist
     48         *
     49         * @param non-falsy-string $file_name The file name the should exist.
     50         */
     51        public function test_jquery_files_exist( string $file_name ) {
     52                $this->assertFileExists( ABSPATH . "/wp-includes/js/jquery/{$file_name}" );
     53        }
     54
     55        /**
     56         * Data provider for {@see self::test_jquery_files_exist()}.
     57         *
     58         * @return array<non-falsy-string, array{ 0: non-falsy-string }>
     59         */
     60        public function data_jquery_files_exist(): array {
     61                return array(
     62                        'jquery'             => array( 'jquery.js' ),
     63                        'jquery-min'         => array( 'jquery.min.js' ),
     64                        'jquery-migrate'     => array( 'jquery-migrate.js' ),
     65                        'jquery-migrate-min' => array( 'jquery-migrate.min.js' ),
     66                );
    4067        }
    4168
  • trunk/tests/phpunit/tests/dependencies/scripts.php

    r63936 r63983  
    41734173         * @ticket 61855
    41744174         * @ticket 60048
     4175         * @ticket 60478
    41754176         *
    41764177         * @covers ::wp_default_scripts
    … …  
    42344235                        'jquery-form'                      => array( 'jquery-form' ),
    42354236                        'jquery-hoverintent'               => array( 'jquery-hoverintent', 'hoverIntent' ),
     4237                        'jquery-migrate'                   => array( 'jquery-migrate' ),
    42364238                        'htmlhint'                         => array( 'htmlhint' ),
    42374239                        'jsonlint'                         => array( 'jsonlint' ),
Note: See TracChangeset for help on using the changeset viewer.