roarr icon indicating copy to clipboard operation
roarr copied to clipboard

Package version 7.15.3 has a node engine version breaking change

Open amirilovic opened this issue 1 year ago • 1 comments

Hi, I noticed that in the engines section in package.json changed:

from:

 "engines": {
    "node": ">=12.0"
  },

to:

 "engines": {
    "node": ">=18.0"
  },

This can be considered a breaking change as it can break package install for dependant packages.

We had a problem with running cy2:

yarn global add [email protected]
cy2 run --browser chrome --parallel ....

The above script started failing two days ago as our CI agent as it runs node with version 16.x.x.

The error that we got was:

error [email protected]: The engine "node" is incompatible with this module. Expected version ">=18.0". Got "16.18.1"

in the end for us the fix was to use yarn --ignore-engines install flag.

I noticed that npm just issues a warning but executes the script.

amirilovic avatar Oct 31 '23 11:10 amirilovic

This is absolutely a breaking change. We can not release updates for a site using Slonik because Slonik (we're on 33.0.3 at the moment) requires Roarr with a caret for version number, meaning all "minor" and "patch" versions are OK to update. So it attempts to update from 7.15.1 and this breaks the build since we're still on Node 16.

Both Roarr and Slonik should upgrade the major version number for such changes (ref https://github.com/gajus/slonik/compare/v37.0.2...v37.0.3 )

hallvors avatar Feb 06 '24 17:02 hallvors