-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripts: Enhance check-engines to consider "latest" versions #14201
Comments
I wonder if this could be added as an enhancement to the existing https://github.com/tclindner/npm-package-json-lint/wiki/valid-values-engines |
I like this proposal. It would be very helpful. The very naive implementation we have at the moment was very easy to implement. It runs as |
That's true. Another thought which had occurred to me is that we set something up which acts similar to Greenkeeper in automating pull requests to bump the version once a new one becomes available. It just seemed a bit cumbersome / more involved to implement this way.
How then would it be captured? Is the idea that
Update to my own comment: If we wanted this fully automated, the Node Release WG does publish a JSON file with the current LTS codenames: https://github.com/nodejs/Release/blob/eb91c94/schedule.json#L46-L52 |
As of #28143, It still would be great to implement the solution that would allow to pass a flag like |
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: