Make WordPress Core

Changeset 59071

Timestamp:
09/20/2024 12:50:51 AM (6 months ago)
Author:
peterwilsoncc
Message:

External Libraries: Test registered script versions match package.json.

Expands tests to ensure the version number of packages updated via NPM matches the version number used for registering the script in the script loader.

This adds tests for (by their registered name in WordPress):

  • backbone
  • clipboard
  • hoverIntent
  • hoverintent-js
  • imagesloaded
  • jquery-color
  • jquery-core
  • jquery-form
  • masonry
  • react-jsx-runtime
  • underscore
  • wp-polyfill-dom-rect
  • wp-polyfill-element-closest
  • wp-polyfill-fetch
  • wp-polyfill-formdata
  • wp-polyfill-inert
  • wp-polyfill-node-contains
  • wp-polyfill-object-fit
  • wp-polyfill-url

This expands on the earlier tests introduced for:

  • lodash
  • moment
  • react
  • react-dom
  • regenerator-runtime

An additional test is added to ensure that the data provider for these tests is maintained as libraries are added via package.json.

@wordpress/* scripts are excluded from these tests as wp-scripts generates a version number automatically based on the file's contents.

Additionally, the version of element-closest listed in package.json is updated to use a fixed version rather than a range. This reflects the current practice of WordPress to define the specific version in core. For the avoidance of doubt, this does not affect the version shipped in WordPress.

Follow up to [57185].

Props peterwilsoncc, jorbin.
Fixes #61855.

Location:
trunk
Files:
3 edited

Changeset view not shown, since the total size (4.3 MB) exceeds 4.0 MB

Note: See TracChangeset for help on using the changeset viewer.