Skip to content

Add engine property in package.json #6185

@aspeddro

Description

@aspeddro

Some breaking changes in the rescript binary node may not be captured. We can add the engines property with engine-strict to catch errors on CI.

The format -check command (#5760) introduced in v10.1.0 broke the requirements described in the documentation.

Node.js version >= 10

Issue: rescript-lang/rescript-lang.org#675

Example:

package.json:

{
  "engineStrict": true,
  "engines": {
    "node": ">=18"
  }
} 

Run on CI (node v16):

npm i rescript-*.tgz --engine-strict
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Required: {"node":">=18"}
npm ERR! notsup Actual:   {"npm":"8.19.3","node":"v16.19.1"}

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pedro/.npm/_logs/2023-04-20T20_04_38_734Z-debug-0.log

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions