Scripts: Enhance check-engines to consider "latest" versions #14201
Labels
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
Needs Dev
Ready for, and needs developer efforts
[Tool] WP Scripts
/packages/scripts
[Type] Enhancement
A suggestion for improvement.
Previously: #12721
Related: #14192 (comment)
Currently,
wp-scripts check-engines
is hard-coded to default to Node>=10.0.0
and npm>=6.0.0
:gutenberg/packages/scripts/scripts/check-engines.js
Lines 23 to 24 in 62f81e1
This doesn't faithfully represent the versions Gutenberg expects, which are respectively "latest Node LTS" and "latest npm version"
https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#getting-started
If the
check-engines
script is intended to adhere to this recommendation, it should ideally do so in a way which doesn't require manual updates.It does not appear that the underlying
check-node-version
project supports this, but perhaps part of the script can be to retrieve the latest versions information.data[ 'dist-tags' ].latest
result from https://registry.npmjs.org/npm JSON blobdata
, firstversion
of sorted by date, filtered bylts
value equal to the current LTS codename (currently "Dubnium", may need to be manually updated) from https://nodejs.org/dist/index.jsoncc @gziolo @ntwb @adamsilverstein
The text was updated successfully, but these errors were encountered: