WordPress/gutenberg

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

已關閉

#14,201 建立於 2019年3月1日

 (4 則留言) (0 個反應) (0 位負責人)JavaScript (3,893 個分叉)batch import
Good First IssueNeeds Dev[Tool] WP Scripts[Type] Enhancement

倉庫指標

星標
 (9,607 顆星)
PR 合併指標
 (平均合併 12天 18小時) (30 天內合併 509 個 PR)

描述

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

貢獻者指南