marko-js / marko

A declarative, HTML-based language that makes building web apps fun

Home Page:https://markojs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specify Node Engine Constraint in package.json

han3zeng opened this issue · comments

commented

Description

I think it would be better to specify "engines": { "node": "18 || 20" } in package.json for the following packages:
@marko
@marko/compiler
@marko/babel-utils
@marko/translator-default

Why

The four packages all depend on @luxass/strip-json-comments@^1.1.1 either directly or indirectly. The package defines "engines": { "node": ">=18" } in package.json. Including node engine constraint in package.json of marko-packages, it could benefit all users in two ways.

Firstly, if users update multiple packages at once and encounter an Unsupported Engine error, they could easily identify the direct dependencies that caused the issue. Secondly, in my case, I rely on Renovate for automated dependency updates. The platform has a setting call constraintsFiltering which allows developers to filter out all Unsupported Engine packages during updates. The feature only works on direct dependencies, so if we specify the engine constraint, developers using the platform can have a smoother automation process.

Possible Implementation & Open Questions

#2097

Is this something you're interested in working on?

Yes