#60048 closed enhancement (fixed)
Fix the declared Lodash version
Reported by: | jadpm | Owned by: | jorbin |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | External Libraries | Keywords: | has-patch has-unit-tests |
Focuses: | javascript | Cc: |
Description
The Lodash version stated in package.json
and loaded by Core is 4.17.21. However, we declare it as 4.17.19 in script-loader.php
.
Change History (9)
This ticket was mentioned in PR #5755 on WordPress/wordpress-develop by decodekult.
13 months ago
#1
- Keywords has-patch added
#2
@
13 months ago
- Milestone changed from Awaiting Review to 6.5
Good catch! And thanks for the PR.
It would be super cool if we could add a PHPUnit test that catches this in the future:
- Call
wp_default_packages_vendor
- Loop through the registered vendor scripts
- Compare their version with what's in
package.json
- Fail if there is a mismatch
This ticket was mentioned in PR #5757 on WordPress/wordpress-develop by @jorbin.
13 months ago
#3
- Keywords has-unit-tests added
See: https://core.trac.wordpress.org/ticket/60048
Based on @swissspidy's suggestion, I added a simple test to ensure the registered version is the same as the version loaded via package.json.
The test only includes a subset of scripts since the others are renamed. Rather than adjusting the way scripts are loaded, this makes the list of which scripts to test a hard-coded version.
This incorporates the fix from #5755.
#4
@
13 months ago
- Owner set to jorbin
- Resolution set to fixed
- Status changed from new to closed
In 57185:
13 months ago
#5
Thanks! This was merged in https://core.trac.wordpress.org/changeset/57185
Sync the declared version number with the one that is loaded. It seems that in the last library update, the declared version was not updated to match it.
Trac ticket: https://core.trac.wordpress.org/ticket/60048