WordPress/gutenberg

Scripts: Enhance check-engines to consider "latest" versions

Open

#14201 opened on Mar 1, 2019

View on GitHub
 (4 comments) (0 reactions) (0 assignees)JavaScript (9,607 stars) (3,893 forks)batch import
Good First IssueNeeds Dev[Tool] WP Scripts[Type] Enhancement

Description

Previously: #12721 Related: https://github.com/WordPress/gutenberg/pull/14192#issuecomment-468732835

Currently, wp-scripts check-engines is hard-coded to default to Node >=10.0.0 and npm >=6.0.0:

https://github.com/WordPress/gutenberg/blob/62f81e10f92a1ec2bdd71c4fe0e249c1e5cb8ccd/packages/scripts/scripts/check-engines.js#L23-L24

This doesn't faithfully represent the versions Gutenberg expects, which are respectively "latest Node LTS" and "latest npm version"

You should be running a Node version matching the current active LTS release or newer for this plugin to work correctly.

You also should have the latest release of npm installed.

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.

cc @gziolo @ntwb @adamsilverstein

Contributor guide