#60048 closed enhancement (fixed)
Fix the declared Lodash version
| Reported by: | jadpm | Owned by: | jorbin |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5 |
| Component: | External Libraries | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | javascript |
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.
3 years ago
#1
- Keywords has-patch added
#2
@
3 years ago
- Milestone Awaiting Review → 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.
3 years 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.
3 years ago
#5
Thanks! This was merged in https://core.trac.wordpress.org/changeset/57185
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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