[wp-trac] [WordPress Trac] #61855: Test package versions of default scripts match package.json
WordPress Trac
noreply at wordpress.org
Fri Sep 20 00:51:07 UTC 2024
#61855: Test package versions of default scripts match package.json
--------------------------------------+----------------------------
Reporter: peterwilsoncc | Owner: peterwilsoncc
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.7
Component: External Libraries | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses: javascript
--------------------------------------+----------------------------
Changes (by peterwilsoncc):
* owner: (none) => peterwilsoncc
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"59071" 59071]:
{{{
#!CommitTicketReference repository="" revision="59071"
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.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61855#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list